Hey this unfortunately does not add anything in the registry on WXP and W7.
gora, on 19 July 2011 - 01:33 PM, said:
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 off
REG 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
This post has been edited by skEwb: 19 July 2011 - 03:34 PM