7-Zip Portable [JPE] -complete-

Share, discuss and debug ready-made JauntePE launchers for non-portable applications.
Message
Author
User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#46 Post by m^(2) »

crownixx wrote: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?
"%~dp0upx.exe"

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

#47 Post by crownixx »

i have no idea what %~dp0 is use for but looking forward to learn it. Thanks alot :D

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

#48 Post by m^(2) »

http://www.robvanderwoude.com/parameters.php

It's needed to get paths relative to your script position.

Some use .\, write only names etc., but that's incorrect, it's relative to current directory.

With this particular script it wouldn't be important, but doing it incorrectly is a really bad style.

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

#49 Post by crownixx »

Code: Select all

echo off
color 1a

cls
Title Portable Update
echo.
if not exist "%~dp0Setup.exe"  goto :Not Found
echo Step 1: Portable update is in progress.Please wait...
"%~dp0Portable install.exe"

cls
echo.
echo Step 2: Removing junk files
echo Press any key.
pause>nul
del /f /q "%~dp0..\App\ProgramFiles\7-Zip\Uninstall.exe"
rd /s /q "%~dp0..\App\Common"

cls
echo.
echo Step 3: Compressing the application
echo Press any key.
pause>nul
cd "%~dp0..\App\ProgramFiles\7-Zip"
for /r %%v in (*.exe *.dll) do "%~dp0upx.exe" --best --compress-icons=0 --nrv2e --crp-ms=999999 "%%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
This is my current batch. The "%~dp0Portable install.exe" is too fast currently i'm using pause to buy a time for next step to work. I try to use start /wait "%~dp0Portable install.exe" but it didn't work. Any other trick?

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

#50 Post by m^(2) »

What is this "Portable"?

Calling it should stop your batch until it quits.

Wait, I just got up. It's "Portable install.exe", right?

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

#51 Post by crownixx »

m^(2) wrote: Wait, I just got up. It's "Portable install.exe", right?
Yes, it's a jauntePE launcher to make the installer run portably. If i use start /wait, another cmd windows will be shown

For another story, i have update to Development 5. Hopefully it will be the last development stage and hopefully the jauntePE config ini is sufficient to cover all the 7-zip features.

For the 7zipContextMenu Portable feature, i have change it to be name 7-Zip JPE Desktop because we are attempting quite similar to redllar's JPE Desktop. If it works, i'll wait for new JPEPortable.exe launcher to come that will silently injecting the plugin and sit at systray. Feedback is needed or i'll assume this is not work.

On my own testing for 7-Zip JPE Desktop, context menu, icon association and file association is working on XP. Icon association and file association is working on Vista but the context menu does not appear.

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

#52 Post by m^(2) »

JPE runs app, sets hooks and quits, so waiting for it is wrong.
You need something from my collection:
http://localhostr.com/files/706768/wait.7z

It waits until specified process quits. Use it with the real exe, not JPE launcher.

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

#53 Post by crownixx »

You're right. It should be the injected installer that need to be wait, not the jpe launcher. How i could forget about that. Finally, got more friendly batch

Code: Select all

echo off
color 1a

cls
Title Portable Update
echo.
if not exist "%~dp0Setup.exe"  goto :Not Found
echo Step 1: Portable update is in progress.Please wait...
"%~dp0Portable install.exe"
WaitForProcessClose.exe "Setup.exe"
del /f /q "%~dp0..\App\ProgramFiles\7-Zip\Uninstall.exe"
rd /s /q "%~dp0..\App\Common"
cd "%~dp0..\App\ProgramFiles\7-Zip"
for /r %%v in (*.exe *.dll) do "%~dp0upx.exe" --best --compress-icons=0 --nrv2e --crp-ms=999999 "%%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
Thank you so much for your help m^(2)

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

#54 Post by crownixx »

I should report about this behaviour. In development 5, i attempt to use new settings in the explorer_jauntePE.ini: [Registry]Ini=..\..\7-Zip Portable_jauntePE.ini and [Filesystem]Ini=..\..\7-Zip Portable_jauntePE.ini to retrieve other similar runtime settings in 7-Zip Portable_jauntePE.ini. This will be much more easier instead of copying all the 7-Zip Portable_jauntePE.ini runtime settings and put into explorer_jauntePE.ini. Besides, the other advantage is we can share ShellDocApp pluggin settings to get the portable file association working on both 7z File Manager and the 7-Zip JPE Desktop.

In 7-Zip Portable_jauntePE.ini, i have exclude all Filesystem except 7-Zip folder in Program Files special folder. I also have exclude all child process except 7zG.exe, 7zFM.exe and 7z.exe.

After running the injected explorer.exe, the log file shows it successfully retrieve the same runtime settings as 7-Zip Portable_jauntePE.ini. Right click>Extract archive will call the child process 7zG.exe to execute in the injected explorer.exe. This was the odd came where the next line of log show the child process 7zG.exe doesn't use the runtime settings from the parent process which is the injected explorer.exe. As result if i right -click & extract the archive file to Desktop, the extracted file will be redirected to jauntePE sandbox which i don't want it to happen. Maybe redllar made this behavior by design.
The log file with the config files available here

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

#55 Post by crownixx »

7-Zip Portable jauntepe version is now comlete i think the current config should be working fine. The request of portable context menu extension which i attempt using the name 7-Zip Desktop got ZERO feedback so dont bother me with that anymore. It will be your DIY project and the files is available in Other\7-Zip Desktop

User avatar
Napiophelios
Posts: 610
Joined: Sun Mar 01, 2009 5:48 pm

#56 Post by Napiophelios »

crownixx wrote:7-Zip Portable jauntepe version is now comlete i think the current config should be working fine. The request of portable context menu extension which i attempt using the name 7-Zip Desktop got ZERO feedback so dont bother me with that anymore. It will be your DIY project and the files is available in Other\7-Zip Desktop
Well its a little late but I have been using your v5 with the context menus and it works flawlessly in my virtual machines thus far.
So long as the user doesnt make any file associations from within the actual 7Zip settings dialogue there are no errors detected with RegMech or CCleaner reg tool.
It works as well as the WinRAR UnPlugged as far as I'm concerned.
This is a true collector's item;simply irreplacable.
thank you :D

Post Reply