Jump to content

Security Settings break WPI Installation of VBS Files


Recommended Posts

To prevent inadvertently executing a VBS script it is recommended to change the default behavior when double clicking or opening a VBS file. This for security reasons. (For a reg file to do so, see later on in this post.)

Consequence is that WPI is not able to install a VBS file anymore. WPI only opens the VBS file and stops until the VBS file is closed again. WPI is thus dependent on default (unsave) behavior / settings. To my mind it would be an improvement to change WPI in this respect.

A workaround is to use the following in the user interface:

{START} /d "%wpipath%\\Install\\" /WAIT CScript "MyVBSFile.vbs"

.

or equivalently use the following command in your 'config.js' file:

cmds[pn]=['{START} /d "%wpipath%\\Install\\" /WAIT CScript "MyVBSFile.vbs"'];

(Using a cmd / batch file resulted in errors in my case, because of "."'s in the path of "MyVBSFile.vbs". I'm not completely sure if this could be an alternative.)

Reg file for changing the default behavior when double clicking or opening a VBS file:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\VBSFile\Shell]

[HKEY_CLASSES_ROOT\VBSFile\Shell]

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open]
@="&Edit in Notepad"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]
@=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,4e,00,6f,00,\
74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,25,00,31,00,00,\
00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open1]
@="&Execute VBScript"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open1\Command]
@=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,20,00,22,00,25,00,31,\
00,22,00,20,00,25,00,2a,00,00,00

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open2]
@="Open &with Command Prompt"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open2\Command]
@=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,43,00,53,00,\
63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,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]
@="&Print"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Print\Command]
@=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,4e,00,6f,00,\
74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,70,00,20,\
00,25,00,31,00,00,00

Link to comment
Share on other sites


You can convert .reg to .exe using Reg2exe converter or use autoit to write the script and convert to exe. (The own idea is to use exe file, then you won't have a problem)

Hope that helps (FYI: I'm don't use WPI)

Link to comment
Share on other sites

You can convert .reg to .exe using Reg2exe converter or use autoit to write the script and convert to exe. (The own idea is to use exe file, then you won't have a problem)

The problem is not in the reg files, but in not being able to install / run a VBS file in WPI (after having changed the default Windows behavior with VBS files because of security reasons). WPI is dependent on certain settings in Windows. To make it more robust that IMO could/should be changed.

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...