shuanpicto
Programmer
I am looking to export a registry branch in VBscript.
This is the code i have:-
On Error Resume Next
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When i run this command in CMD it works :-
REGEDIT /E "%APPDATA%\Temp\wallpaper.reg" "hkey_current_user\Control Panel\Desktop\"
Can anyone help me ?
I don't want to just create a CMD and run that, but i may have to !!
This is the code i have:-
On Error Resume Next
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When i run this command in CMD it works :-
REGEDIT /E "%APPDATA%\Temp\wallpaper.reg" "hkey_current_user\Control Panel\Desktop\"
Can anyone help me ?
I don't want to just create a CMD and run that, but i may have to !!