alfa Posted August 29, 2012 Share Posted August 29, 2012 (edited) Hello, I am trying to run this reg export "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\profiles" c:\profiles.reg as RunWait(@ComSpec & " /c " & "reg export HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\profiles' c:\profiles.reg","") The first code is working in the command line. But because of the spaces i have to take the whole command between "". But in autoit it doesnt seem to recognice that way. Since the thing i want to export is not a single key i cant use regread also. Thanks in advance. Edited August 29, 2012 by alfa Link to comment Share on other sites More sharing options...
lordofthestrings Posted August 29, 2012 Share Posted August 29, 2012 use double/single quotes like this: (you forgot a single quote btw) RunWait(@ComSpec & " /c reg export 'HKCUSoftwareMicrosoftWindows NTCurrentVersionWindows Messaging Subsystemprofiles' c:profiles.reg","") Link to comment Share on other sites More sharing options...
alfa Posted August 29, 2012 Author Share Posted August 29, 2012 I have tried that and tried it again now. but it doesnt work. I see the cmd screen but it doesnt generate the the file. Thanks a lot for the answer though. Link to comment Share on other sites More sharing options...
lordofthestrings Posted August 29, 2012 Share Posted August 29, 2012 RunWait(@ComSpec & ' /c reg export "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWindows Messaging SubsystemProfiles" ' & @TempDir & 'profiles.reg',@TempDir, @SW_HIDE) Link to comment Share on other sites More sharing options...
lordofthestrings Posted August 29, 2012 Share Posted August 29, 2012 made the key/populated it, then read it like this. there was an error in the code indeed sorry Link to comment Share on other sites More sharing options...
alfa Posted August 29, 2012 Author Share Posted August 29, 2012 yay thanks a lot for the help... it worked Link to comment Share on other sites More sharing options...
lordofthestrings Posted August 29, 2012 Share Posted August 29, 2012 (edited) easiest way to solve this type of problem is to echo it in the cmd: RunWait(@ComSpec & ' /k echo reg export "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWindows Messaging SubsystemProfiles" ' & @TempDir & 'profiles.reg',@TempDir, @SW_show) Edited August 29, 2012 by lordofthestrings 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