Jump to content

Recommended Posts

Posted (edited)

Hi guys,

 

What is wrong with this line?

ShellExecuteWait("REG", "EXPORT HKCU\SOFTWARE\Nend Software\Tray Radio" & @ScriptDir & "\test.reg")

I try to export a registry key but couldn't get this to work.

Is this a safety issue from windows or do I use shellexecute the wrong way?

Edited by nend
Posted (edited)
ShellExecuteWait('REG', 'EXPORT "HKCU\SOFTWARE\Nend Software\Tray Radio" "' & @ScriptDir & '\test.reg"')

You have to use double quotes in command lines when spaces are in it.

Edited by ripdad

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Posted
11 minutes ago, Subz said:

Sorry missed your space in the reg you need to use, something like this:

Run(@ComSpec & ' /c REG EXPORT "HKCU\SOFTWARE\Nend Software\Tray Radio" "' & @ScriptDir & '\test.reg"')

 

This works fine, thanks

Posted
6 minutes ago, ripdad said:
ShellExecuteWait('REG', 'EXPORT "HKCU\SOFTWARE\Nend Software\Tray Radio" "' & @ScriptDir & '\test.reg"')

You have to use double quotes in command lines when spaces are in it.

And this works also fine, thanks for your reply.

Posted
5 minutes ago, Subz said:

Have you tried the RegFunc UDF, its a great UDF.

 

I will look into that, thankd for the tip.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...