SBASS Posted January 11, 2010 Share Posted January 11, 2010 Hi,I am assuming this should be easy but having browsed the forums and checked the help and I cannot resolve the below issue I am having with @Comspec. I have used @Comspec a number of times without any issues but I can't seem to get round this one...If I run a the following command from cmd.exe in WindowsRegedit /e C:\Funk.txt "HKEY_CURRENT_USER\Software\Funk Software, Inc.\Odyssey\client\profiles" it works perfect and exports the key and sub keys to the text file C:\Funk.txtIf I run the same command from cmd.exe in Windows without the " " around the HKCU....It does not workI have played around with my script and have the following which does not workRun(@COMSPEC & " /c " & "Regedit /e C:\Funk.txt HKEY_CURRENT_USER\Software\Funk Software, Inc.\Odyssey\client\profiles", @WindowsDir, @SW_HIDE)I am assuming it does not work as the cmd line needs the " " around the HKCU.... bit just like when I run it from CMD but I cannot work out the syntax to use so that I can include the " " inside the @ComSpec line without getting an syntax error back or it just now working. Anyone have any idea's about this?Cheers in advanceSimon Link to comment Share on other sites More sharing options...
zorphnog Posted January 11, 2010 Share Posted January 11, 2010 Try: Run(@COMSPEC & ' /c Regedit /e C:\Funk.txt "HKEY_CURRENT_USER\Software\Funk Software, Inc.\Odyssey\client\profiles"', @WindowsDir, @SW_HIDE) Link to comment Share on other sites More sharing options...
SBASS Posted January 11, 2010 Author Share Posted January 11, 2010 Nice 1 zorphnog - That has done the job. Thanks very much! :-) 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