Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Export Registry Keys Syntax Trouble

$
0
0
Hello-

I am trying to export some registry keys before I overwrite them in case I need to restore them later. I seem to be having trouble with the syntax or maybe the placement of the quotes. I want to export them as a .reg file and place them in a folder called "Registry Backups" from whatever directory the script is executed from. Below is my feable attempt that is not working. It is just a test right now before I actually add it to a larger script I am working on. If this seems like the wrong way to go about this or whatever please advise me but bare in mind that I am still trying to learn so my level of knowledge is low and I likely can not implement anything overly complex. Thank you in advance for your time.

[ autoit ]      
#RequireAdmin If Not FileExists(@ScriptDir & "\Registry Backup") Then DirCreate(@ScriptDir & "\Registry Backup") ;<===Create Directory RunWait('"' & @ComSpec & '" /c REGEDIT /E @ScriptDir "\Registry Backup\test.reg HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run', '', @SW_Show)

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>