Jump to content
Sign in to follow this  

@ComSpec Help Needed

Recommended Posts



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 Windows

Regedit /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.txt

If I run the same command from cmd.exe in Windows without the " " around the HKCU....

It does not work

I have played around with my script and have the following which does not work

Run(@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 advance


Share this post

Link to post
Share on other sites

Nice 1 zorphnog - That has done the job. Thanks very much! :-)

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.