Sobiech Posted December 26, 2009 Share Posted December 26, 2009 Topic I cant add any reg keys Tried examples from Help file. Some functions in Autoit isnt accepted by Windows Vista or what? This world is crazy Link to comment Share on other sites More sharing options...
Camden Posted December 26, 2009 Share Posted December 26, 2009 put this code at the top and see if it works #RequireAdmin you may have to be an administrator to do this. Link to comment Share on other sites More sharing options...
Sobiech Posted December 26, 2009 Author Share Posted December 26, 2009 Doesnt work This world is crazy Link to comment Share on other sites More sharing options...
Camden Posted December 26, 2009 Share Posted December 26, 2009 Doesnt workPlease post your source code up. Link to comment Share on other sites More sharing options...
Sobiech Posted December 26, 2009 Author Share Posted December 26, 2009 #RequireAdmin #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Diablo II Pather By InFlames", 275, 142, 706, 632) $Button1 = GUICtrlCreateButton("Path", 80, 8, 81, 81, $WS_GROUP) $Group1 = GUICtrlCreateGroup("Version", 8, 8, 65, 81) $V1 = GUICtrlCreateRadio("1.12", 16, 34, 49, 17) $V2 = GUICtrlCreateRadio("1.13", 16, 58, 49, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button2 = GUICtrlCreateButton("Exit", 8, 96, 153, 33, $WS_GROUP) $Button3 = GUICtrlCreateButton("Realms", 168, 8, 97, 121, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUICtrlSetOnEvent($Button1, "Reg") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Reg() ConsoleWrite("Adding" & @CRLF) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Test", "TestKey", "REG_SZ", "Hello this is a test") ConsoleWrite("Added") EndFunc DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1) No Syntax Errors This world is crazy Link to comment Share on other sites More sharing options...
Sobiech Posted December 27, 2009 Author Share Posted December 27, 2009 Anyone tried this script on Vista HP 64? This world is crazy Link to comment Share on other sites More sharing options...
Developers Jos Posted December 27, 2009 Developers Share Posted December 27, 2009 What are the returncode and @error values of your regwrite() ? 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. Link to comment Share on other sites More sharing options...
Sobiech Posted December 27, 2009 Author Share Posted December 27, 2009 What are the returncode and @error values of your regwrite() ?Really i need this? This world is crazy Link to comment Share on other sites More sharing options...
Developers Jos Posted December 27, 2009 Developers Share Posted December 27, 2009 Really i need this?Don't know what you mean and hope you do not mean it the way you make it sound, but if you want to know if a function was successful or not you better check the retunrcode and @error.Anyways, supply the info and you might get help.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. Link to comment Share on other sites More sharing options...
Sobiech Posted December 27, 2009 Author Share Posted December 27, 2009 I WAS SO STUPID! on 64 bit Windoes i need RegWrite("HKLM64\SOFTWARE\Test", "TestKey", "REG_SZ", "Hello this is a test") ... Ok but if someone have 32 bit system... Hmmm maybe If @OSArch = x64 Then RegWrite("HKLM64\SOFTWARE\Test", "TestKey", "REG_SZ", "Hello this is a test") Else RegWrite("HKLM\SOFTWARE\Test", "TestKey", "REG_SZ", "Hello this is a test") EndIf This world is crazy Link to comment Share on other sites More sharing options...
Mat Posted December 27, 2009 Share Posted December 27, 2009 (edited) Won't it be HKLM64 then instead of HKLM?When running on 64-bit Windows if you want to write a key or value specific to the 64-bit environment you have to suffix the HK... with 64 i.e. HKLM64.Edit: Slightly too late... Edited December 27, 2009 by Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
Sobiech Posted December 27, 2009 Author Share Posted December 27, 2009 x86 = 64bit system x64 = 32bit system <confused> Is that right? This world is crazy Link to comment Share on other sites More sharing options...
GEOSoft Posted December 27, 2009 Share Posted December 27, 2009 x86 = 64bit systemx64 = 32bit system<confused>Is that right?Otherway around but here is a little known trick for you. HKLM64 will work on either or at least it did, I haven't tried it recently. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Developers Jos Posted December 27, 2009 Developers Share Posted December 27, 2009 x86 = 64bit systemx64 = 32bit system<confused>Is that right?no this is not correct ... look again at what you posted and what doesn't make sense. 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. Link to comment Share on other sites More sharing options...
Sobiech Posted December 27, 2009 Author Share Posted December 27, 2009 Ok i know everything what i need Problem Solved Thx This world is crazy Link to comment Share on other sites More sharing options...
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