I am trying to write vbs to write regigstry settings. Not sure on how to do this though, the hex looks odd!
What i want written:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file]
@="Zetafax FAX image"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\open\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20, 00,46,00,69,00,6c,00,65,00,73,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00, 73,00,20,00,4e,00,54,00,5c,00,41,00,63,00,63,00,65,00,73,00,73,00,6f,00,72, 00,69,00,65,00,73,00,5c,00,49,00,6d,00,61,00,67,00,65,00,56,00,75,00,65,00, 5c,00,4b,00,6f,00,64,00,61,00,6b,00,49,00,6d,00,67,00,2e,00,65,00,78,00,65, 00,22,00,20,00,22,00,25,00,31,00,22,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\preview]
@="Pre&view"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\preview\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20, 00,46,00,69,00,6c,00,65,00,73,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00, 73,00,20,00,4e,00,54,00,5c,00,41,00,63,00,63,00,65,00,73,00,73,00,6f,00,72, 00,69,00,65,00,73,00,5c,00,49,00,6d,00,61,00,67,00,65,00,56,00,75,00,65,00, 5c,00,4b,00,6f,00,64,00,61,00,6b,00,50,00,72,00,76,00,2e,00,65,00,78,00,65, 00,22,00,20,00,22,00,25,00,31,00,22,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\print]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\print\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20, 00,46,00,69,00,6c,00,65,00,73,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00, 73,00,20,00,4e,00,54,00,5c,00,41,00,63,00,63,00,65,00,73,00,73,00,6f,00,72, 00,69,00,65,00,73,00,5c,00,49,00,6d,00,61,00,67,00,65,00,56,00,75,00,65,00, 5c,00,4b,00,6f,00,64,00,61,00,6b,00,49,00,6d,00,67,00,2e,00,65,00,78,00,65, 00,22,00,20,00,2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00
What I have in VBS so far...
' Write registry entries
Dim WshShell
Set WshShell = CreateObject ("WScript.Shell")
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file", "Zetafax FAX image"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell", ""
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\open", ""
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\open\command", "
and here I get stuck!
Any help, please?
There's no need for sarcastic replies, we've not all been this sad for that long!
What i want written:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file]
@="Zetafax FAX image"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\open\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20, 00,46,00,69,00,6c,00,65,00,73,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00, 73,00,20,00,4e,00,54,00,5c,00,41,00,63,00,63,00,65,00,73,00,73,00,6f,00,72, 00,69,00,65,00,73,00,5c,00,49,00,6d,00,61,00,67,00,65,00,56,00,75,00,65,00, 5c,00,4b,00,6f,00,64,00,61,00,6b,00,49,00,6d,00,67,00,2e,00,65,00,78,00,65, 00,22,00,20,00,22,00,25,00,31,00,22,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\preview]
@="Pre&view"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\preview\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20, 00,46,00,69,00,6c,00,65,00,73,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00, 73,00,20,00,4e,00,54,00,5c,00,41,00,63,00,63,00,65,00,73,00,73,00,6f,00,72, 00,69,00,65,00,73,00,5c,00,49,00,6d,00,61,00,67,00,65,00,56,00,75,00,65,00, 5c,00,4b,00,6f,00,64,00,61,00,6b,00,50,00,72,00,76,00,2e,00,65,00,78,00,65, 00,22,00,20,00,22,00,25,00,31,00,22,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\print]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\print\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20, 00,46,00,69,00,6c,00,65,00,73,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00, 73,00,20,00,4e,00,54,00,5c,00,41,00,63,00,63,00,65,00,73,00,73,00,6f,00,72, 00,69,00,65,00,73,00,5c,00,49,00,6d,00,61,00,67,00,65,00,56,00,75,00,65,00, 5c,00,4b,00,6f,00,64,00,61,00,6b,00,49,00,6d,00,67,00,2e,00,65,00,78,00,65, 00,22,00,20,00,2f,00,70,00,20,00,22,00,25,00,31,00,22,00,00,00
What I have in VBS so far...
' Write registry entries
Dim WshShell
Set WshShell = CreateObject ("WScript.Shell")
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file", "Zetafax FAX image"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell", ""
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\open", ""
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\G3F_auto_file\shell\open\command", "
and here I get stuck!
Any help, please?
There's no need for sarcastic replies, we've not all been this sad for that long!