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
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)
Please log in to answer
Posted by:
AngelD
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.