CypherBit Posted April 3, 2005 Posted April 3, 2005 I'm trying to use the below code to extract the content of FileZilla.exe (a 7-zip SFX archive) to %ProgramFiles%:REG ADD %KEY%\005 /VE /D "Performing Additional Tasks" /fREG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\FileZilla.exe -y /q /r:n -o%programfiles%" /fIt gets added to my RunOnceEx (in registry) no problem but when I reboot and the extraction should begin it extracts to C:\Program not C:\Program Files.I thought I'll just enclose in inverted commas like this:REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\FileZilla.exe -y /q /r:n -o"%programfiles%" "and the problem will be solved but that doesn't work. It does't even get added to RunOnceEx (-o"%programfiles%" doesn't work as well) .I could naturally put the content of FileZilla.exe in a Program Files folder and add it to archive like that then just extract to %systemdrive% but that really shouldn't be necessary.Could anyone help me out with this one, what am I doing wrong?
Bâshrat the Sneaky Posted April 3, 2005 Posted April 3, 2005 If it's a setup, usesetup.exe -y /q /r:nif it's an archive,use archive.exe -y -o%ProgramFiles%Note that if you add this last command to the registry from Windows, you'll have to use double %! (that would be %%ProgramFiles%%)
CypherBit Posted April 3, 2005 Author Posted April 3, 2005 It's a simple archive containing config files. I used:REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\FileZilla.exe -y -o%%programfiles%%" /fIt got added to my registry, I rebooted and the archive was extracted to a folder named %programfiles% on C:\ . It didn't get extracted to %programfiles% (C:\Program Files) but it created a folder %programfiles% on C:\ .Again any advice is greatly appreciated.
CypherBit Posted April 4, 2005 Author Posted April 4, 2005 A good friend of mine found a solution for this one. He searched the 7-zip forums and came accross a post mentioning quote mixing. This is the solution he provided:REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\FileZilla.exe -y -o\"%programfiles%\"" /fIt worked in all of the quick tests I threw at it for now, %appdata%, %systemdrive%.
Rambler Posted April 4, 2005 Posted April 4, 2005 It is also mentioned in the MSFN unattended guide hereWould save you time searching for the answer
CypherBit Posted April 4, 2005 Author Posted April 4, 2005 Thank you Rambler, I searched extensively just didn't occur to me it was a RunOnceEx problem, thought it was 7-zip related...meaning I searched in the wrong places.What you posted sure explains the fact I was getting abnormal program termination if I used that syntax from cmd line. The \ infront of -o clearly isn't needed if it's not used in RunOnceEx.Think (hope) I won't need any further assistance with this one
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now