Oleg_Sch Posted July 15, 2011 Author Posted July 15, 2011 Dialog VersionI see you're actually telling dialog version apart from non-dialog version by looking for the dialog resources, in other words, the code is same.I think you may want to let user manually add dialogs to versions other than LZMA, but this is not documented.Yes, you are right and user can manually add custom dialogs to any modules. I do not have enough time to develop, especially for documentation.RussianNot to be offensive, but I don't think it's good to add them in the code, or we may need a macro to turn it off. The strings takes too much spaces.This is historical issue (if you don't know, I'm from Russia), may be later I will change this.RTF support on non-dialog versionsMore complex. I'll write PM to you in near week.
skEwb Posted July 19, 2011 Posted July 19, 2011 (edited) Can someone please help me point out what I'm doing wrong here? These commands work fine if executed in a regular shell, however it gives this error when executed from within the SFXError in line 5 of configuration data:;!@Install@!UTF-8!OverwriteMode="1"RunProgram="hidcon:cmd /c %APPDATA%\WhileIdle\WhileIdle.exe"RunProgram="hidcon:cmd /c REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ /f /v Whileidle /d "\"%APPDATA%\WhileIdle\WhileIdle.exe\"""InstallPath="%APPDATA%\WhileIdle"GUIMode="2";!@InstallEnd@!It specifically complains about this part "\"%APPDATA%\WhileIdle\WhileIdle.exe\"""Screenshot Edited July 19, 2011 by skEwb
gora Posted July 19, 2011 Posted July 19, 2011 ;!@Install@!UTF-8!OverwriteMode="1"RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""RunProgram="hidcon:REG ADD HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /f /v Whileidle /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\""InstallPath="%APPDATA%\\WhileIdle"GUIMode="2";!@InstallEnd@!
skEwb Posted July 19, 2011 Posted July 19, 2011 (edited) ;!@Install@!UTF-8!OverwriteMode="1"RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""RunProgram="hidcon:REG ADD HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /f /v Whileidle /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\""InstallPath="%APPDATA%\\WhileIdle"GUIMode="2";!@InstallEnd@!Thank you The error is now fixed, however the registry entry doesn't get added, if the line is used in a shell it gives this output:WindowsXPC:\Documents and Settings\Administrator>REG ADD HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /f /v Whileidle /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\Error: Too many command-line parametersWindows 7:C:\Users\Administrator>REG ADD HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /f /v Whileidle /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\"ERROR: Invalid key name.Type "REG ADD /?" for usage.My guess is that it's not supposed to work being interpreted by a standard Windows shell and only 7-Zip SFX interprets it correctly?The program installs and triggers to execute, however, the registry entry isn't added. Edited July 19, 2011 by skEwb
gora Posted July 19, 2011 Posted July 19, 2011 (edited) I did not check your line for availability. I gave her the syntax of the module only. Write a string to add the registry entry for a batch file which you work and adds information to the registry correctly.PSSyntax strings in a module and a batch file are not equal Edited July 19, 2011 by gora
skEwb Posted July 19, 2011 Posted July 19, 2011 I did not check your line for availability. I gave her the syntax of the module only. Write a string to add the registry entry for a batch file which you work and adds information to the registry correctly.PSSyntax strings in a module and a batch file are not equalThank you for the suggestion, I will do it this way. Thank you so much for your help again.
gora Posted July 19, 2011 Posted July 19, 2011 write to the registry key is in the format of reg file, I will translate it into the syntax of the module
skEwb Posted July 19, 2011 Posted July 19, 2011 (edited) write to the registry key is in the format of reg file, I will translate it into the syntax of the moduleThis regadd.bat works for now:@echo offREG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ /f /v Whileidle /d "\"%APPDATA%\WhileIdle\WhileIdle.exe\"" Edited July 19, 2011 by skEwb
gora Posted July 19, 2011 Posted July 19, 2011 (edited) RunProgram="hidcon:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\" /f" Edited July 19, 2011 by gora
skEwb Posted July 19, 2011 Posted July 19, 2011 (edited) Hey this unfortunately does not add anything in the registry on WXP and W7.RunProgram="hidcon:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\" /f"What is the proper way to call a bat file from withing the config.txt ? Does this look normal:;!@Install@!UTF-8!OverwriteMode="1"RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\regadd.bat\""InstallPath="%APPDATA%\\WhileIdle"GUIMode="2";!@InstallEnd@!Contents of bat file:@echo offREG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ /f /v Whileidle /d "\"%APPDATA%\WhileIdle\WhileIdle.exe\""That config.txt doesn't run the .bat file either, even though the .bat file is tested locally to be 100% working.======Back to Registry Method==========The following line has some edits that work on both WXP and W7.cmd /c "reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v Whileidle /t REG_SZ /d \""%APPDATA%\WhileIdle\WhileIdle.exe"\""I converted it over to the proper 7-zip SFX format and it gives 0 errors, but doesn't work:;!@Install@!UTF-8!OverwriteMode="1"RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""RunProgram="hidcon:cmd /c \"reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v Whileidle /t REG_SZ /d \"\"%APPDATA%\\WhileIdle\\WhileIdle.exe\"\"\""InstallPath="%APPDATA%\\WhileIdle"GUIMode="2";!@InstallEnd@!Thanks Edited July 19, 2011 by skEwb
Geej Posted July 20, 2011 Posted July 20, 2011 (edited) Hi skEwb Try this alternative;!@Install@!UTF-8! OverwriteMode="1" RunProgram="hidcon:cmd /c start \"NowaitStart\" \"%APPDATA%\\WhileIdle\\WhileIdle.exe\"" RunProgram="hidcon:cmd /c reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v Whileidle /t REG_SZ /d \"%%T\\WhileIdle.exe\"" InstallPath="%APPDATA%\\WhileIdle" GUIMode="2" ;!@InstallEnd@! Edited July 20, 2011 by Geej
gora Posted July 20, 2011 Posted July 20, 2011 Hey this unfortunately does not add anything in the registry on WXP and W7.What is the bit of your system, x64 or x86?Test as follows:;!@Install@!UTF-8!InstallPath="%APPDATA%\\WhileIdle"RunProgram="nowait:WhileIdle.exe"RunProgram="hidcon:%%P:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%%T\\WhileIdle.exe\\\"\" /f"MiscFlags="4"OverwriteMode="1"GUIMode="2";!@InstallEnd@!
Geej Posted July 21, 2011 Posted July 21, 2011 Hey this unfortunately does not add anything in the registry on WXP and W7.I converted it over to the proper 7-zip SFX format and it gives 0 errors, but doesn't work:;!@Install@!UTF-8!OverwriteMode="1"RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""RunProgram="hidcon:cmd /c \"reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v Whileidle /t REG_SZ /d \"\"%APPDATA%\\WhileIdle\\WhileIdle.exe\"\"\""InstallPath="%APPDATA%\\WhileIdle"GUIMode="2";!@InstallEnd@!ThanksI'm sure, beside giving you a working config.txt , you would like to know why your own config.txt is failing and with no error.Just a quick tip: Use Process Explorer from sysinternals to see if your own silent installer is hang silentlyAs in your case, whileidle.exe is started but your silent installer expect it to close before proceeding to execute the reg add command. Hence you do not see any registry added.Also to add troubleshooting your own config, do not use hidcon:Wait until you build your config.txt and tested fully functional, then start to hid those console box.There is a slight error in my own config provided. I missed out the /f in reg add command. Running it once, it's okay. Running 2nd time, will hang. So modify as follow:This is a functional config.txt, not as best as gora's config.txt. The whole idea is to keep it as close to your (skEwb) original config.txt as possible so you'll appreciate what went wrong.;!@Install@!UTF-8! OverwriteMode="1" RunProgram="hidcon:cmd /c start \"NowaitStart\" \"%APPDATA%\\WhileIdle\\WhileIdle.exe\"" RunProgram="hidcon:cmd /c reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run /v Whileidle /t REG_SZ /d \"%%T\\WhileIdle.exe\" /f" InstallPath="%APPDATA%\\WhileIdle" GUIMode="2" ;!@InstallEnd@!While on this thing, perhaps we (all users of this great tool) could share some common tips that can help user avoid mistake that user generally made. This way we learn faster & better in understanding/appreciating this tool capability & its limitation. (I hope these tips can make it into the help documentation eventually) What I see right now is some user who have config.txt problem just doesn't know what to do or doesn't have a clue what went wrong.Thanks for reading & Cheers
gora Posted July 21, 2011 Posted July 21, 2011 RunProgram="hidcon:cmd /c reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run /v Whileidle /t REG_SZ /d \"%%T\\WhileIdle.exe\" /f" This line will run on x86 OS, but will not work on x64 OS. For x64 OS need to run x64 reg.exe, as x86 reg.exe not be able to add this registry key.
skEwb Posted July 31, 2011 Posted July 31, 2011 Hey this unfortunately does not add anything in the registry on WXP and W7.What is the bit of your system, x64 or x86?Test as follows:;!@Install@!UTF-8!InstallPath="%APPDATA%\\WhileIdle"RunProgram="nowait:WhileIdle.exe"RunProgram="hidcon:%%P:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%%T\\WhileIdle.exe\\\"\" /f"MiscFlags="4"OverwriteMode="1"GUIMode="2";!@InstallEnd@!This finally works on both x86 and x64. I haven't updated this in a while sorry, but this one finally works on both!
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