Why does 7zip Ignore my InstallPath when making a SFX installer?

眉间皱痕 提交于 2019-11-30 04:18:59

问题


Currently, I am making a SFX with 7zip using the following config:

;!@Install@!UTF-8!
InstallPath="C:\\test"
GUIMode="2"
RunProgram="7z465.exe"
;!@InstallEnd@!

I then package 7z465.exe into Setup.7z, and then call the following line in a batch file:

copy /b "C:\Program Files\7-Zip\7zSD.sfx" + config.txt + ".\Release\Setup.7z" .\Release\Setup.exe

When I run the resulting Setup.exe, It extracts fine and launches the 7z465.exe as well, but it is still extracting to some 7zip temp folder for the current user and not C:\test!

Running as administrator seems to have no effect either.

Anyone have any idea why this is happening?


回答1:


Use modified 7zsd.sfx from http://7zsfx.solta.ru. InstallPath only works with the modified package.




回答2:


I never found out why this was happening, and after hours of struggling with it, I switched to WinRAR. Granted, its got some quirks of its own, but I was at least able to figure those out and get it running for my needs.

Would recommend WinRAR over 7z for SFX stuff.



来源:https://stackoverflow.com/questions/2568924/why-does-7zip-ignore-my-installpath-when-making-a-sfx-installer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!