Willow Posted March 6, 2012 Posted March 6, 2012 I have a reg key that contains a space in the reg name as seen in the first example. This key will not export whereas the second example doees not have a space in the reg name, exports fine. Any help in getting the first example to export is appreciated. ShellExecuteWait("regedit.exe","/e mykey2.reg HKEY_LOCAL_MACHINE\Software\my key2", "C:\backups\regkeys") ShellExecuteWait("regedit.exe","/e mykey1.reg HKEY_LOCAL_MACHINE\Software\mykey1", "C:\backups\regkeys")
kaotkbliss Posted March 6, 2012 Posted March 6, 2012 (edited) try doing this ShellExecuteWait("regedit.exe","'/e mykey2.reg HKEY_LOCAL_MACHINESoftwaremy key2'", "C:backupsregkeys") *edit* When you have a space in a path, use single quotes (' ') inside the double quotes to keep the path from breaking up Edited March 6, 2012 by kaotkbliss 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
Willow Posted March 6, 2012 Author Posted March 6, 2012 try doing this ShellExecuteWait("regedit.exe","'/e mykey2.reg HKEY_LOCAL_MACHINESoftwaremy key2'", "C:backupsregkeys") *edit* When you have a space in a path, use single quotes (' ') inside the double quotes to keep the path from breaking up That does not work...it prompts to add '/e to the registry..
AdmiralAlkex Posted March 6, 2012 Posted March 6, 2012 (edited) Don't take peoples code blindly, read it and evaluate it yourself. The quotes are wrongly placed, and I don't know if Windows accepts single quotes like that, better to just use double quotes as it doesn't matter from AutoIts point of view. I would expect this to work: '/e mykey2.reg "HKEY_LOCAL_MACHINESoftwaremy key2"' Edited March 6, 2012 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
kaotkbliss Posted March 6, 2012 Posted March 6, 2012 (edited) I've been trying all different combinations of quotes and testing them since my first reply was wrong. (usually I don't have any problems throwing quotes around things) but in this case, yours does not work either Admiral.*edit*Nevermind, I forgot to put the space back into the reg key when testing Edited March 6, 2012 by kaotkbliss 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
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