shuanpicto
Programmer
I am looking to export a registry branch in VBscript.
When i run this command in CMD it works :-
REGEDIT /E "%APPDATA%\Temp\wallpaper.reg" "hkey_current_user\Control Panel\Desktop\"
How can I run this in VBScript or Jscript ?
The problem lies in the speech marks.
I tried this:-
Set wshshell = CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
APPDATA = WshShell.ExpandEnvironmentStrings("%APPDATA%")
wshshell.Run "REGEDIT /e " & APPDATA & "\temp\wallpaper.reg" "hkey_current_user\Control Panel\Desktop\", 1, true
But i think my speech marks are all wrong.
Can anyone help me ?
I don't want to just create a CMD and run that, but i may have to !!
When i run this command in CMD it works :-
REGEDIT /E "%APPDATA%\Temp\wallpaper.reg" "hkey_current_user\Control Panel\Desktop\"
How can I run this in VBScript or Jscript ?
The problem lies in the speech marks.
I tried this:-
Set wshshell = CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
APPDATA = WshShell.ExpandEnvironmentStrings("%APPDATA%")
wshshell.Run "REGEDIT /e " & APPDATA & "\temp\wallpaper.reg" "hkey_current_user\Control Panel\Desktop\", 1, true
But i think my speech marks are all wrong.
Can anyone help me ?
I don't want to just create a CMD and run that, but i may have to !!