roboman Posted April 24, 2008 Share Posted April 24, 2008 I'm trying to use AutoIt to export a reg key to remap drives after a PC is rebuilt, Here's the is the command line that I would like to build into an AutoIT script: regedit /E c:\drives.reg "HKEY_CURRENT_USER\Network" If you have any other ideas on how to do this that will be great as well. Thanks in advance for any help Link to comment Share on other sites More sharing options...
weaponx Posted April 24, 2008 Share Posted April 24, 2008 You have many options. RegWrite() RegRead() RunWait("reg EXPORT...") RunWait("regedit /E...") DriveMapAdd() DriveMapDel() DriveMapGet() Link to comment Share on other sites More sharing options...
roboman Posted April 24, 2008 Author Share Posted April 24, 2008 You have many options.RegWrite()RegRead()RunWait("reg EXPORT...")RunWait("regedit /E...")DriveMapAdd()DriveMapDel()DriveMapGet() Link to comment Share on other sites More sharing options...
roboman Posted April 24, 2008 Author Share Posted April 24, 2008 You have many options.RegWrite()RegRead()RunWait("reg EXPORT...")RunWait("regedit /E...")DriveMapAdd()DriveMapDel()DriveMapGet()Thanks for the quick response !!! I tried: Func Drives() RunWait("regedit /E c:\drives.reg "HKEY_CURRENT_USER\Network"")EndFuncAnd I get "unable to parse line" error Link to comment Share on other sites More sharing options...
weaponx Posted April 24, 2008 Share Posted April 24, 2008 You can't nest double quotes within double quotes. Use single quotes to surround your statement. Link to comment Share on other sites More sharing options...
roboman Posted April 24, 2008 Author Share Posted April 24, 2008 You can't nest double quotes within double quotes. Use single quotes to surround your statement.Thanks again..I figured that out and got the reg key to save to the root of C, Now my last step is to copy it to the logined user desktop, this is what I tried, I did not get any errors, but the reg file did not copy, I'm sure it's something simple that I'm just over looking.Func Drives() RunWait("regedit /E c:\drives.reg HKEY_CURRENT_USER\Network") FileCopy("c:\drives.reg", "%userprofile%/desktop/drives.reg") I'm new to AutoIT and you guys have been great THANKS AGAIN ! Link to comment Share on other sites More sharing options...
weaponx Posted April 24, 2008 Share Posted April 24, 2008 FileCopy("c:\drives.reg", @DesktopDir & "\drives.reg") Link to comment Share on other sites More sharing options...
roboman Posted April 24, 2008 Author Share Posted April 24, 2008 FileCopy("c:\drives.reg", @DesktopDir & "\drives.reg")You guys Rock !! Thanks Link to comment Share on other sites More sharing options...
Dougiefresh Posted May 3, 2008 Share Posted May 3, 2008 You can't nest double quotes within double quotes. Use single quotes to surround your statement.Yes, you can. Here is an example: MsgBox( 0, "", "He said, ""You can't nest double quotes within double quotes."" Then, I said ""Yes, you can.""" ) I produces this in a message box: He said, "You can't nest double quotes within double quotes." Then, I said "Yes, you can." Link to comment Share on other sites More sharing options...
ADICorp Posted May 19, 2016 Share Posted May 19, 2016 Apologies for reviving a dead post, but does this work with newer versions of windows? (7,8,10) Have never used Autoit and would find this particular script very useful. Thank you Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 19, 2016 Moderators Share Posted May 19, 2016 Hi, @ADICorp welcome to the forum. To find out if this would work for your environment, I would suggest trying it yourself There is also the DriveMapAdd and DriveMapDel functions in the help file that you can acquaint yourself with. I would suggest trying out the examples in the help file for yourself to see which will best fit your needs. If you get stuck, start a new thread and explain what you are trying to accomplish and what is not working, and we will do our best to assist "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
ADICorp Posted May 19, 2016 Share Posted May 19, 2016 Just now, JLogan3o13 said: Hi, @ADICorp welcome to the forum. To find out if this would work for your environment, I would suggest trying it yourself There is also the DriveMapAdd and DriveMapDel functions in the help file that you can acquaint yourself with. I would suggest trying out the examples in the help file for yourself to see which will best fit your needs. If you get stuck, start a new thread and explain what you are trying to accomplish and what is not working, and we will do our best to assist Thank you for your reply so quickly. I agree and am digging around the help files here and there when I get a chance. Trying to give myself a crash course. I have taken what I see on this post, and tested it to no avail. I believe the issue is just me not understanding exactly what to do, but I will get it eventually and then will be able to go from there. Thank you again 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