7-Zip Portable [JPE] -complete-

Share, discuss and debug ready-made JauntePE launchers for non-portable applications.
Message
Author
crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#31 Post by crownixx »

Report for my 7-zip context menu portable

What we are attempting right now is what redllar want to implement in the JPE Desktop.
Image

There's nothing wrong if we could try to play with it first. Here is my 2nd attempt portablizing 7-zip context menu with several config changes from previous config. There will be no registry modification will be made in jauntePE virtualization but feel free to run the app in Guest account to be safe and protect your system. Besides, it will be big bonus if the portable work in the lowest privillage dont you think. I also included the source script for my autoit launcher if you want to know detail about how it works. It is basically just terminate normal explorer.exe with the help of nircmd commandline ->run jpe launcher to launch portablized explorer.exe -> terminate portablized explorer.exe -> run normal explorer.exe.
Download 7zipContextMenu-Portable.zip (1.3 MB)

This is the video demo as i got it working on my pc, hopefully on your pc too. For user who still wondering why creating 7-zip portable jpe version, you could also check the video demo out and find how jpe version work very differently from other portable version. We could also see other potential features we could benefit in jpe version even at very low limited privillage Guest account and these features could never be achieve by any other portable version AFAIK.
Download 7zipContextMenu Video Demo.7z (2.18 MB)


Please also try the right-click menu inside the 7-Zip File Manager as it work on mine and i'm using 4.64 version.

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#32 Post by m^(2) »

No, it's actually very strange that it doesn't work.
Instruction set is the same, I tried to hook 32 bit programs.

If redllar did minimum needed to make it work, everything should be OK, but he probably unnecessarily interacts with OS somewhere.

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#33 Post by crownixx »

m^(2) wrote:No, it's actually very strange that it doesn't work.
Instruction set is the same, I tried to hook 32 bit programs.

If redllar did minimum needed to make it work, everything should be OK, but he probably unnecessarily interacts with OS somewhere.
I'm sorry for not answering correctly, but the right person is already answer your problem. See the changelog here
http://portablefreeware.com/forums/viewtopic.php?t=4407

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#34 Post by m^(2) »

crownixx wrote:
m^(2) wrote:No, it's actually very strange that it doesn't work.
Instruction set is the same, I tried to hook 32 bit programs.

If redllar did minimum needed to make it work, everything should be OK, but he probably unnecessarily interacts with OS somewhere.
I'm sorry for not answering correctly, but the right person is already answer your problem. See the changelog here
http://portablefreeware.com/forums/viewtopic.php?t=4407
Yeah, I've see this already. But thanks for this mention anyway.

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#35 Post by crownixx »

crownixx wrote:Download 7zipContextMenu-Portable.zip (1.3 MB)
9 download with zero feedback. It is more better getting the answer "this is doesnt work" rather than zero feedback.

I have update my 7zip portable to development 3.
-change config setting to get the context menu function working inside the file manager
-I have difficulty to use "No Annoyer" function for 7zip since the installer is always changing it window title. So i use switchin the portable install config to have silent install. The bat file will be helping to identify the installer finish it's process. (nsis silent switch is too silent). The portable install config is also change to use Normal3.ini to get the context menu working
-update launcher and runtime dll to Build19

User avatar
joby_toss
Posts: 2970
Joined: Sat Feb 09, 2008 9:57 am
Location: Romania
Contact:

#36 Post by joby_toss »

It really works man, thank you !

User avatar
Lupo73
Posts: 1012
Joined: Mon Mar 19, 2007 8:55 am
Location: Italy
Contact:

#37 Post by Lupo73 »

I have tested it and seem to work fine, but the fact that restart explorer.exe is not really good.. could not it cause problems?
I have found a new beta release of C.A.F.E. (not from portableapps, but from this page http://download.tuxfamily.org/nomadsofts/C.A.F.E./ ) that support also a portable modality for context menu and hotkeys. It could be useful for this purpose.. even if it need improvement, the code isn't complete and stable yet.

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#38 Post by crownixx »

Finally i got motivate back. Our feedback, response, comment and suggession will be important too for redllar to be in motivation. Thank you for the feedback guys :D
Lupo73 wrote: I have tested it and seem to work fine, but the fact that restart explorer.exe is not really good.. could not it cause problems?
You are right. When i googling about it, many said terminating explorer.exe is not recommended and only do so if we get error but don't know the side effect about it. Maybe that's why redllar still hold the JPE Desktop project. In his latest Known Limitation #8
8. Limitation/Problem: It's possible that injected-into only processes will crash when they're uninjected or when they terminate, when a runtime's IdentMode is set to 1 or 3 (3 is the default.) This can occur when the launcher's InjectOnly setting has been turned on.

Work around: Set the runtime's IdentMode to either 0 or 2 when turning on the launcher's InjectOnly setting. Set it to 0 if targeting 9x versions of MS Windows. Set it to 0 unless you really need window identification.

Reason: No code is in place to properly unhook the windows that get hooked when a runtime's IdentMode is set to 1 or 3. MS Windows also does not provide a safe/proper mechanism for de-subclassing a complicated chain of subclassed/de-subclassed/re-subclassed window callback procedures on any of its 2K or older versions, especially on 9x versions.
My 7z context menu portable is just to play around and prove the concept of redllar's JPE Desktop.
Lupo73 wrote:I have found a new beta release of C.A.F.E. (not from portableapps, but from this page http://download.tuxfamily.org/nomadsofts/C.A.F.E./ ) that support also a portable modality for context menu and hotkeys. It could be useful for this purpose.. even if it need improvement, the code isn't complete and stable yet.
C.A.F.E is a great software and been using it long time ago. But is it only for file assosiation? You can use it with 7-Zip portable[JPE], just point to the 7-Zip Portable.exe (jauntePE portable launcher)
Last edited by crownixx on Fri Jan 30, 2009 12:24 am, edited 1 time in total.

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#39 Post by crownixx »

Now in dev-4 added the jauntePE ShellDocApp plugin. This plugin will be used in an attempt to force the opening of a given file type with the given application instead of being opened by the shell's default application. Read more in readme.html > The Runtime Ini > Shell Usage

Since the 7-Zip has the file manager, we can manipulate the double-click of a file inside it with this plugin so that we will have similar feature available in Xenon File Manager and C.A.F.E. It means that double-click in any file type can be configure to open your own favorite application.

I built ShellDocApp Configure to simplify the file association configuration with the GUI interface. In the dev-4 package i have set .ini and .txt extension to be associated with notepad portable(taken from Notepad Examples) as the example. You can remove them if you want

User avatar
joby_toss
Posts: 2970
Joined: Sat Feb 09, 2008 9:57 am
Location: Romania
Contact:

#40 Post by joby_toss »

I've just realized something: I could really run out of "Thank you!"s following your topics! :)

User avatar
Lupo73
Posts: 1012
Joined: Mon Mar 19, 2007 8:55 am
Location: Italy
Contact:

#41 Post by Lupo73 »

Interesting.. I have created a recompiled release of CAFE, named Coffee :lol: ..that fix some small bugs of the official release and has more translations.. you can find it here http://www.lupopensuite.org/db/coffee.htm ..I don't know if could be useful for file association of jauntePE apps.
I found also useful this PortableFileAssociator http://portableapps.com/node/15583 ..that is able to make a portable association without restarting explorer..

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#42 Post by crownixx »

Lupo73 wrote:Interesting.. I have created a recompiled release of CAFE, named Coffee :lol: ..that fix some small bugs of the official release and has more translations.. you can find it here http://www.lupopensuite.org/db/coffee.htm ..I don't know if could be useful for file association of jauntePE apps.
Thank you. For now i'm using the configuration GUI quite similar to CAFE. I should note that the associated software is not necessarily jauntePE portable application. It can be any portable software.
Lupo73 wrote: I found also useful this PortableFileAssociator http://portableapps.com/node/15583 ..that is able to make a portable association without restarting explorer..
Yes, this is interesting. Previously i'm using the nircmd.exe shellrefresh command
shellrefresh
Initiate a general refersh for Windows Explorer. This refresh command can be useful if you make a change in the Registry related to the shell file types (For example, if you change the icon of .gif extension), and you want that your changes will take affect immediately.
After i look at the PortableFileAssociator script, this part is interesting

Code: Select all

_SHChangeNotify()

Func _SHChangeNotify()
	DllCall("shell32.dll", "none", "SHChangeNotify", _
						"long", 0x8000000, _
						"uint", BitOR(0x0, 0x1000), _
						"ptr", Chr(0), _
						"ptr", Chr(0) _
						)
EndFunc
I don't know what exactly the dll calling but googling at the term SHChangeNotify give some idea what it do. Probably it similar to the nircmd.exe shellrefresh command. This is a good news because after the injection (not restarting the explorer.exe anymore like previous in the video), i successfully get the 7z archive icon appear at Windows Explorer. I'm planning to put this feature in dev-5

For the portable update feature in dev-5, I also planning to make the UPX compressed after the silent install. Assuming you guys have the 7-Zip Portable [JPE] and know about run-me.bat, can someone help me correcting the script because i can't make it working. I'm not much expert in the batch script.

Code: Select all

echo off 
color 1a 
cls 
Title Portable Update
echo. 
if not exist "Setup.exe"  goto :Not Found
echo Portable update is in progress.Please wait...
"Portable install.exe"
for %%v in (*.exe *.dll) do upx "..\App\ProgramFiles\7-Zip\%%v"
cls 
echo. 
echo Portable update is done. You may quit now
pause
goto :exit

:Not Found
echo Setup.exe is not found. Place the 7-Zip installer in this directory 
echo and rename it to "Setup.exe"
pause
goto :exit

:exit
exit
Last edited by crownixx on Sat Feb 07, 2009 12:13 am, edited 1 time in total.

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#43 Post by crownixx »

~delete~

EDIT: Sorry, double posting
Last edited by crownixx on Sat Feb 07, 2009 12:16 am, edited 1 time in total.

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#44 Post by m^(2) »

Code: Select all

echo off
color 1a
cls
Title Portable Update
echo.
if not exist "%~dp0Setup.exe"  goto :Not Found
echo Portable update is in progress.Please wait...
"%~dp0Portable install.exe"
cd "%~dp0..\App\ProgramFiles\7-Zip"
for /r %%v in (*.exe *.dll) do upx --best "%%v"
cls
echo.
echo Portable update is done. 
echo Press any key.
pause>nul
goto :exit

:Not Found
echo Setup.exe is not found. Place the 7-Zip installer in this directory
echo and rename it to "Setup.exe"
echo Press any key.
pause>nul
goto :exit

:exit
exit
Is this one better? You didn't specify what should it do too precisely. ;)

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#45 Post by crownixx »

That's quite fast. Thank you m^(2)
Your script is working but the upx.exe also need to be in the "..\App\ProgramFiles\7-Zip" folder. Is there is a way the upx compressed can be done if the upx.exe in the same dir of the run-me.bat script?

Post Reply