nend

[SOLVED] Registry export

9 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



#2 ·  Posted

Have you tried:

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

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

@Subz

This gives exactly the same problem.

The test.reg file hasn't been made.

Share this post


Link to post
Share on other sites

#4 ·  Posted

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"')

 

1 person likes this

Share this post


Link to post
Share on other sites

#5 ·  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
1 person likes this

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

Share this post


Link to post
Share on other sites

#6 ·  Posted

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

 

Share this post


Link to post
Share on other sites

#7 ·  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

Share this post


Link to post
Share on other sites

#8 ·  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.

Share this post


Link to post
Share on other sites

#9 ·  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.

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