mr-es335 Posted July 19 Share Posted July 19 Good day, I hope that this day finds you all well! I am having "issues with the following... ;----------------------------------------------- #include <AutoItConstants.au3> #include <FileConstants.au3> ;----------------------------------------------- Opt("MustDeclareVars", 1) ;------------------------------------------------ _RestoreData() ;------------------------------------------------ Func _RestoreData() ;------------------------------------------------ ; Source data Local $sSrcPath = "I:\Installations\" Local $sSrcFolder = "Install_1a" Local $sSrcRegKeyData = "\Data\Reg_Keys\add_me.reg" ;------------------------------------------------ ; ==>[A] This works... RunWait('REGEDIT /S "I:\Installations\Install_1a\Data\Reg_Keys\add_me.reg"') ; ==>[B] This does not work... RunWait('REGEDIT /S & $sSrcPath & $sSrcFolder & $sSrcRegKeyData') ;------------------ EndFunc ;==>_RestoreData ;------------------------------------------------ Question: Why does [A] work, and does not? Any assistance in this matter would be greatly appreciated! mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
Nine Posted July 19 Share Posted July 19 Because your quote include the vars. RunWait('REGEDIT /S ' & $sSrcPath & $sSrcFolder & $sSrcRegKeyData) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
ioa747 Posted July 19 Share Posted July 19 like that maybe RunWait('REGEDIT /S "' & $sSrcPath & $sSrcFolder & $sSrcRegKeyData & '"') I know that I know nothing Link to comment Share on other sites More sharing options...
Shark007 Posted July 21 Share Posted July 21 also know that the script would need Admin Privileges to write to anything other than HKCU 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