oren 0 Posted May 26, 2011 ConsoleWrite(RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "ProcessSwi", "REG_SZ", @scriptdir & "\ProcessSwi.exe")) ConsoleWrite(@error) I do this and I get 0 0 in console There is no 0 as error code Any idea? Thank you Share this post Link to post Share on other sites
Jos 2,211 Posted May 26, 2011 (edited) What does this give?: ConsoleWrite(RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "ProcessSwi", "REG_SZ", @scriptdir & "\ProcessSwi.exe") & @crlf & @error) Edited May 26, 2011 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
wakillon 403 Posted May 26, 2011 Try RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "ProcessSwi", "REG_SZ", @scriptdir & "\ProcessSwi.exe") ConsoleWrite(@error) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Share this post Link to post Share on other sites
oren 0 Posted May 26, 2011 HO... yes sorry the @error was 0 because the consolewrite was good Anyway I get 1 as @error Share this post Link to post Share on other sites
Jos 2,211 Posted May 26, 2011 HO...yes sorry the @error was 0 because the consolewrite was good CorrectAnyway I get 1 as @errorSo what do you think this could be? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
oren 0 Posted May 26, 2011 CorrectSo what do you think this could be?Well I dont really know.. I tired compiling the code and running the program as administrator still didnt workMaybe the AV programAnyone? Share this post Link to post Share on other sites
Jos 2,211 Posted May 26, 2011 Have you tried #requireAdmin at the top of the script? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
oren 0 Posted May 26, 2011 (edited) I've tried.. #requireAdmin _Singleton("SWIsetup",0) MsgBox(1,1,RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "ProcessSwi", "REG_SZ", @scriptdir & "\ProcessSwi.exe") & @crlf & @error) I get in the massagebox 1 0 But still I dont find the registry in regedit in this location HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run I did a search and I find it in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run What is it? Edited May 26, 2011 by oren Share this post Link to post Share on other sites
Jos 2,211 Posted May 26, 2011 (edited) I did a search and I find it inHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunWhat is it?You compiled the script or run it with x86 version and running it in a x64 systems/OS? Edited May 26, 2011 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
oren 0 Posted May 26, 2011 You compiled the script or run it with x86 version and running it in a x64 systems/OS?yes so it will run on x86 system... not only on 64bit Share this post Link to post Share on other sites
Jos 2,211 Posted May 26, 2011 (edited) yes so it will run on x86 system... not only on 64bitunderstand but that means it runs on your x64 OS in a x86 mode and that mode is using the special Wow6432Node reg hive.Just research this via Google and you will find enough explanations about it. Edited May 26, 2011 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites