I'm trying to associate VBS files with WScript.exe, when I think it is associated it isn't, I tried numerous times to associate the file type wit the program. Anyone know if this registry file would work on Windows8 ?

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.VBS]
@="VBSFile"

[HKEY_CLASSES_ROOT\.VBS\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\VBScript]
@="VB Script Language"

[HKEY_CLASSES_ROOT\VBScript\CLSID]
@="{B54F3741-5B07-11cf-A4B0-00AA004A55E8}"

[HKEY_CLASSES_ROOT\VBScript\OLEScript]

[HKEY_CLASSES_ROOT\VBSFile]
"FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\
  00,6f,00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,\
  32,00,5c,00,77,00,73,00,68,00,65,00,78,00,74,00,2e,00,64,00,6c,00,6c,00,2c,\
  00,2d,00,34,00,38,00,30,00,32,00,00,00
@="VBScript Script File"

[HKEY_CLASSES_ROOT\VBSFile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,53,00,\
  63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,00,2c,00,32,00,00,00

[HKEY_CLASSES_ROOT\VBSFile\ScriptEngine]
@="VBScript"

[HKEY_CLASSES_ROOT\VBSFile\ScriptHostEncode]
@="{85131631-480C-11D2-B1F9-00C04F86C324}"

[HKEY_CLASSES_ROOT\VBSFile\Shell]
@="Open"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Edit]

[HKEY_CLASSES_ROOT\VBSFile\Shell\Edit\Command]
@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,\
  6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,25,\
  00,31,00,00,00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open]

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]
@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,\
  53,00,63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,\
  00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open2]
@=hex(2):4f,00,70,00,65,00,6e,00,20,00,26,00,77,00,69,00,74,00,68,00,20,00,43,\
  00,6f,00,6d,00,6d,00,61,00,6e,00,64,00,20,00,50,00,72,00,6f,00,6d,00,70,00,\
  74,00,00,00
"MUIVerb"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,77,00,73,00,68,00,65,00,78,00,74,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,\
  34,00,35,00,31,00,31,00,00,00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open2\Command]
@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,43,00,\
  53,00,63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,\
  00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Print]

[HKEY_CLASSES_ROOT\VBSFile\Shell\Print\Command]
@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,\
  6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,\
  00,70,00,20,00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\VBSFile\ShellEx]

[HKEY_CLASSES_ROOT\VBSFile\ShellEx\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

[HKEY_CLASSES_ROOT\VBSFile\ShellEx\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\VBSFile\ShellEx\PropertySheetHandlers\WSHProps]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

Recommended Answers

All 2 Replies

There are a couple of things to try. I'm not using Windows 8 yet so I'm not sure where to find this (on Windows 7 it is under My Computer/Properties/Advanced/Environment Variables).

Make sure PATHEXT includes .VBS

In a command shell with admin rights, type

WSCRIPT //H:wscript //S

To set the default engine. You might also try right clicking on a VBS file and setting the default by using OPEN WITH and browsing for WSCRIPT.EXE.

The result was, command line is saved. The default script is set to WScript.exe, I hope this works, shouldn't the icon for a VBS file be different, how can I be sure ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.