strKeyPath="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"\r
strValueName = "Path"\r
oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,_\r
- strKeyPath, strValueName, strValue\r
+ strKeyPath, strValueName, strValue\r
\r
If (Err.Number = 0) And (Not IsNull(strValue)) Then\r
ReadSysPath = strValue\r
strKeyPath="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"\r
strValueName = "Path"\r
oReg.SetExpandedStringValue _\r
- HKEY_LOCAL_MACHINE, strKeyPath, strValueName, NewPath\r
+ HKEY_LOCAL_MACHINE, strKeyPath, strValueName, NewPath\r
\r
WriteSysPath = Err.Number\r
End Function\r
\r
' Add specified path to the system search path registry entry @\r
' 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path'\r
-' Generally the path is [INSTALLDIR]\r
+' Normally the added path is [INSTALLDIR]\r
' Called from a defered exection context (aka, DriverInstall).\r
\r
Function SysPathAdd(InstallDir)\r
If rc <> 0 Then\r
SysPathAdd = ShowErr2("SysPathAdd - WriteSysPath()")\r
Else\r
+ ' TODO - Notify current windows of updated PATH registry value.\r
SysPathAdd = 0\r
End if\r
\r
''''''''''' Check installation status ''''''''''''\r
\r
Function install_verify()\r
- Dim Status\r
- Dim sInstalldir\r
- sInstalldir = Session.Property("INSTALLDIR")\r
+ Dim Status\r
+ Dim sInstalldir\r
+ sInstalldir = Session.Property("INSTALLDIR")\r
Set WshShell = CreateObject("WScript.Shell")\r
Set vstat = WshShell.Exec(sInstalldir & "\bin\vstat.exe")\r
install_verify = vstat.ExitCode\r
-\r
End Function\r
\r
'-------------------------------------------------------------\r
\r
' Function to add registry DWORD val.\r
Function AddRegDWORDValue(strKeyPath, strValueName, dwValue)\r
-const HKEY_LOCAL_MACHINE = &H80000002\r
-strComputer = "."\r
+ const HKEY_LOCAL_MACHINE = &H80000002\r
+ strComputer = "."\r
\r
-Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ \r
-strComputer & "\root\default:StdRegProv")\r
+ Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ \r
+ strComputer & "\root\default:StdRegProv")\r
+ If Err Then ShowError\r
\r
-If Err Then ShowError\r
-oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue\r
-If Err Then ShowError\r
+ oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue\r
+\r
+ If Err Then ShowError\r
\r
End Function\r
\r
'-------------------------------------------------\r
\r
' Function to add registry Expanded string val.\r
+\r
Function AddRegExpandValue(strKeyPath, strValueName, dwValue)\r
-const HKEY_LOCAL_MACHINE = &H80000002\r
-strComputer = "."\r
+ const HKEY_LOCAL_MACHINE = &H80000002\r
+ strComputer = "."\r
\r
-Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ \r
-strComputer & "\root\default:StdRegProv")\r
+ Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ \r
+ strComputer & "\root\default:StdRegProv")\r
\r
-If Err Then ShowError\r
-oReg.SetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue\r
-If Err Then ShowError\r
+ If Err Then ShowError\r
+ oReg.SetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,_\r
+ dwValue\r
+ If Err Then ShowError\r
\r
End Function\r
\r
MTARCH = Architecture\r
\r
Dim PropArray\r
- Dim CheckMode, sInstalldir, fso\r
+ Dim CheckMode, sInstalldir, fso\r
\r
- ' Get the value of INSTALLDIR\r
- CheckMode = Session.Property("CustomActionData")\r
+ ' Get the value of INSTALLDIR\r
+ CheckMode = Session.Property("CustomActionData")\r
\r
- If Not CheckMode = "" Then\r
+ If Not CheckMode = "" Then\r
'in defered action this is the way to pass arguments.\r
PropArray = Split(Session.Property("CustomActionData"), ";")\r
- Else\r
+ Else\r
Redim PropArray(4)\r
PropArray(0) = Session.Property("INSTALLDIR") \r
PropArray(1) = Session.Property("SystemFolder") \r
PropArray(2) = Session.Property("System64Folder") \r
PropArray(3) = Session.Property("WindowsFolder")\r
- End if\r
+ End if\r
\r
- sInstalldir = PropArray(0)\r
+ sInstalldir = PropArray(0)\r
\r
Uninstall_IB_Devices(sInstalldir) \r
\r
- RemoveDriverFiles\r
+ RemoveDriverFiles\r
\r
- Set WshShell = CreateObject("WScript.Shell")\r
+ Set WshShell = CreateObject("WScript.Shell")\r
Set fso = CreateObject("Scripting.FileSystemObject")\r
\r
If Not fso.FileExists(sInstalldir & "IBcore\devman.exe") Then\r
End if\r
\r
' rescan system buses\r
- Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir & _\r
+ Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir & _\r
"IBcore & devman.exe rescan", 0, true)\r
' Display error number and description if applicable\r
If Err Then ShowError\r
SYSWOW = PropArray(1) \r
\r
' following file copies relocated to .wxs file so they can be uninstalled \r
-' correctly, as this way the files reamin when uninstalled.\r
+' correctly, otherwise, using this approach the files reamin when uninstalled.\r
\r
if False then\r
- msgbox "DriverInstall PA(1) " & SYSWOW & " PA(2) " & PropArray(2)\r
- if fso.FileExists(sInstalldir & "IBcore\cl32.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\cl32.dll", SYSWOW & "complib.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\cl32d.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\cl32d.dll", SYSWOW & "complibd.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\ibal32.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\ibal32.dll", SYSWOW & "ibal.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\ibal32d.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\ibal32d.dll", SYSWOW & "ibald.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\mtuvpd32.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\mtuvpd32.dll", SYSWOW & "mthcau.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\mtuvpd32d.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\mtuvpd32d.dll", SYSWOW & "mthcaud.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "net\ibwsd32.dll") then\r
- fso.CopyFile sInstalldir & "net\ibwsd32.dll", SYSWOW & "ibwsd.dll"\r
- end if\r
- end if ' XXX\r
- End If \r
-\r
- ' append [INSTALLDIR] to system search path\r
+ msgbox "DriverInstall PA(1) " & SYSWOW & " PA(2) " & PropArray(2)\r
+ if fso.FileExists(sInstalldir & "IBcore\cl32.dll") then\r
+ fso.CopyFile sInstalldir & "IBcore\cl32.dll", SYSWOW & "complib.dll"\r
+ end if\r
+ if fso.FileExists(sInstalldir & "IBcore\cl32d.dll") then\r
+ fso.CopyFile sInstalldir & "IBcore\cl32d.dll", SYSWOW & "complibd.dll"\r
+ end if\r
+ if fso.FileExists(sInstalldir & "IBcore\ibal32.dll") then\r
+ fso.CopyFile sInstalldir & "IBcore\ibal32.dll", SYSWOW & "ibal.dll"\r
+ end if\r
+ if fso.FileExists(sInstalldir & "IBcore\ibal32d.dll") then\r
+ fso.CopyFile sInstalldir & "IBcore\ibal32d.dll", SYSWOW & "ibald.dll"\r
+ end if\r
+ if fso.FileExists(sInstalldir & "IBcore\mtuvpd32.dll") then\r
+ fso.CopyFile sInstalldir & "IBcore\mtuvpd32.dll", SYSWOW & "mthcau.dll"\r
+ end if\r
+ if fso.FileExists(sInstalldir & "IBcore\mtuvpd32d.dll") then\r
+ fso.CopyFile sInstalldir & "IBcore\mtuvpd32d.dll",SYSWOW & "mthcaud.dll"\r
+ end if\r
+ if fso.FileExists(sInstalldir & "net\ibwsd32.dll") then\r
+ fso.CopyFile sInstalldir & "net\ibwsd32.dll", SYSWOW & "ibwsd.dll"\r
+ end if\r
+end if ' XXX\r
+ End If ' MTARCH\r
+\r
+ ' append [INSTALLDIR] to system search path\r
SysPathAdd(sInstalldir)\r
\r
- err.clear \r
+ err.clear \r
DriverInstall=0\r
\r
End Function\r