visegrip Posted May 21, 2012 Posted May 21, 2012 gora,OK, thanks.I will continue working on 2, and if I can't solve it, I will post a sample reg entry here.
visegrip Posted May 22, 2012 Posted May 22, 2012 2 Export your key to the.reg file and bring him here. I convert it to a line of a configgora,From command prompt run something like this:reg add "HKCU\SOFTWARE\Some Software Name" /v Location /t REG_EXPAND_SZ /d "%%SYSTEMDRIVE%%\Program Files\Some Software Name" /fLook at the resulting entry in the registry.I want the same result when run from the config.txt.The CHM manual says to get the variable name instead of its value use:%^SYSTEMDRIVE%But I can't get the correct syntax yet.
gora Posted May 22, 2012 Posted May 22, 2012 The CHM manual says to get the variable name instead of its value use:%^SYSTEMDRIVE%You do not carefully read the manualЕсли в текстовых параметрах необходимо указать имя переменной, а не ее значение, то переменную нужно записать следующим образом:%^PROGRAMFILES% You see how bad that is not English manual! But I can't get the correct syntax yet.A very severe case...SetEnvironment="Var=%%^SYSTEMDRIVE%%"RunProgram="hidcon:cmd /V:ON /c Set Var=%Var:^=%& Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"!Var!\\Program Files\\Some Software Name\" /f"
visegrip Posted May 22, 2012 Posted May 22, 2012 Wow, thanks gora--I would not have got that.Seems like I must read the manual more carefully.Now I see one reason you often include a batch or cmd file in many of your releases.
odar Posted May 23, 2012 Posted May 23, 2012 (edited) for 7zsdcreate a folder and context menu with batch file for create sfx modulehttp://www.axifile.com/en/D101DE0571 orhttp://rapidgator.net/file/23278624/7zsfx_windows_XP_Vista_win7-new.exe.html in this packet sfx container module 7zsd with resources hacker and cmenu and extraicoextract automatic in %programfiles%\7zsfxinto folder 7zsfx file .batwith cmenu create context menu for .bat filefile bat compress folder in .7z and create file configsfx.txt for 7zsfxopen file configsfx.txt during process for modifier file when closing continue processand create sfx with name folder and lunch file.exewith extraico estract ico file from .exe and with reshacker change ico in the file sfxproblem cmenu dont work in win 7don't create menu context for this utility Edited July 6, 2012 by odar
visegrip Posted May 23, 2012 Posted May 23, 2012 SetEnvironment="Var=%%^SYSTEMDRIVE%%"RunProgram="hidcon:cmd /V:ON /c Set Var=%Var:^=%& Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"!Var!\\Program Files\\Some Software Name\" /f"Interesting...On my system I had to use:SetEnvironment="Var=%^SYSTEMDRIVE%"instead of:SetEnvironment="Var=%%^SYSTEMDRIVE%%"for it to work correctly.
gora Posted May 23, 2012 Posted May 23, 2012 1 What is your system?2 Shows two lines, rather than one, please.
visegrip Posted May 23, 2012 Posted May 23, 2012 1. XP SP3 x862.SetEnvironment="Var=%^SYSTEMDRIVE%"RunProgram="hidcon:cmd /V:ON /c Set Var=%Var:^=%& Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"!Var!\\Program Files\\Some Software Name\" /f"Result for data in that registry key:%SYSTEMDRIVE%\Program Files\Some Software NameIf I use your two lines, I get this for data:%%SYSTEMDRIVE%%\Program Files\Some Software Namewhich seems odd.I hope that helps. Let me know if you need any more information.
gora Posted May 23, 2012 Posted May 23, 2012 (edited) 2 visegripYes. It's my fault. I did the code to add this variable in the double signs %You have finished it and now it's your code. Congratulations! Simpler variant:RunProgram="hidcon:Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"\"%\"SYSTEMDRIVE\"%\"\\Program Files\\Some Software Name\" /f" Edited May 24, 2012 by gora
Escorpiom Posted June 24, 2012 Posted June 24, 2012 I was wondering, we have to use a backslash when using " so it becomes \" in the config file.But what about the single quote? Is the backslash needed also? Example: 'becomes\'I have this problem with the malwarebytes silent installer that uses a ' in the name.
marcusj0015 Posted July 21, 2012 Posted July 21, 2012 I'm trying to create a silent installer for my Windows 7 theme, here's my Config.txt ;!@Install@!UTF-8!GUIMode="2"Path="%Windir%\Resources\Themes\"Progress="No"RunProgram="InstallUxStyle.cmd";!@InstallEnd@!and here's my install script.@ECHO OFFGOTO DETECT:INSTALL:DETECT%PROCESSOR_ARCHITECTURE%IF AMD64 GOTO AMD64IF x86 GOTO x86IF IA64 GOTO IA64:AMD64Msiexec.exe /i "%Windir%\Resources\Themes\Cloud7\UxStyle\UxStylex64.msi" /j mGOTO END:x86Msiexec.exe /i "%Windir%\Resources\Themes\Cloud7\UxStyle\UxStylex86.msi" /j mGOTO END:IA64Sorry, your architecture isn't supported.GOTO END:ENDDel "%Windir%\Resources\Themes\Cloud7\UxStyle\"ExitI'm on Win8 atm because my win7 partition died, is this correct, and more importantly, how do I make this actually execute the scripts and programs and everything?
ricktendo Posted July 22, 2012 Posted July 22, 2012 (edited) Why use a CMD when you can use the SFX to install and detect what arch to use ;!@Install@!UTF-8!GUIMode="2"InstallPath="%Windir%\\Resources\\Themes"RunProgram="x64:%%T\\Cloud7\\UxStyle\\UxStylex64.msi [switches_here]"RunProgram="x86:%%T\\Cloud7\\UxStyle\\UxStylex86.msi [switches_here]"Delete="%%T\\Cloud7\\UxStyle";!@InstallEnd@!Note: you dont need Progress=No with GUIMode=2 and you have to use two backslashes (\\) in the path(s)Also:x86: will only execute on 32bitx64: will only execute on 64bit%%T variable is equal to the InstallPath Edited July 22, 2012 by ricktendo64
gora Posted July 22, 2012 Posted July 22, 2012 So a little shorter:;!@Install@!UTF-8!GUIMode="2"InstallPath="%Windir%\\Resources\\Themes"RunProgram="%%P:Cloud7\\UxStyle\\UxStyle%%P.msi [switches_here]"Delete="%%T\\Cloud7\\UxStyle";!@InstallEnd@!If you need the full path for the MSI, then this:...RunProgram="%%P:\"%%T\\Cloud7\\UxStyle\\UxStyle%%P.msi\" [switches_here]"...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now