Wise Importing into Binary Table

I saw a previous posts where a user was having difficulty running a vbs script from within a Wise Studio built MSI and VBSscab stated the reason the user was having problems was because Wise Studio does not understand things like wscript. He recommended that they import their external script into the Binary table and possibly using the custom action "Call VB script from installation" to resolve this. Could anybody explain more specifically on how you actually do this? Below is the VBS script i'm trying to get to run during or after MSI install, any help is appreciated thank you. If anybody wants to know this script basically reads your current DevicePathValue Registry key saves the value then deletes the registry key and recreates it with the saved value plus an additional value %SYSTEMROOT%\inf\Reachback.

On error resume next
Set WshShell = WScript.CreateObject("Wscript.Shell")
DevicePathValue = WSHShell.RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\DevicePath")
OldPath = DevicePathValue
addpath = "%SYSTEMROOT%\inf\Reachback"
Newpath = Replace(lcase(OldPath),lcase(AddPath)+";","")
if instr(lcase(OldPath),lcase(addpath))=0 then OldPath=OldPath&";"&AddPath
WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\DevicePath", OldPath

0 Comments   [ + ] Show comments

Answers (1)

Posted by: AngelD 15 years ago
Red Belt
If it workes outside of the MSI then just use the line below instead.
Set WshShell = CreateObject("Wscript.Shell")
' remove "WScript."
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ