diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2020-09-14 12:27:35 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2020-09-14 12:27:35 +0200 | 
| commit | 808dd89a2beae6ab1d29d35f6119ad5b36969589 (patch) | |
| tree | 29dc5c93b1bc45be42e68f00b81c1106c3935862 /setup/addsvc.vbs | |
| parent | 13dc8738dcd4739941735eab4d1956ccce770525 (diff) | |
| parent | 0e9b185152b56ff33fe8a2a89a4f84923a308300 (diff) | |
Update upstream source from tag 'upstream/3.1.7'
Update to upstream version '3.1.7'
with Debian dir 7d3f308e3ed6f413d39e2d1262518e82b3b486bc
Diffstat (limited to 'setup/addsvc.vbs')
| -rw-r--r-- | setup/addsvc.vbs | 50 | 
1 files changed, 50 insertions, 0 deletions
| diff --git a/setup/addsvc.vbs b/setup/addsvc.vbs new file mode 100644 index 0000000..b5c8704 --- /dev/null +++ b/setup/addsvc.vbs @@ -0,0 +1,50 @@ +' This VBScript should run after all files have been copied onto the system.
 +
 +Set sh = CreateObject("WScript.Shell")
 +Set fso = CreateObject("Scripting.FileSystemObject")
 +
 +Dim installer : Set installer = Nothing
 +Set installer = CreateObject("WindowsInstaller.Installer")
 +Dim sOutFile, outs
 +
 +' Find out where our files were installed 
 +If(IsEmpty(Session)) Then
 +   'Not running from within installer.  Source path is current directory.
 +   InstallLoc = sh.CurrentDirectory
 +Else
 +   'Running inside the installer, use CustomActionData "[TARGETDIR]".
 +   ' InstallLoc = installer.ProductInfo(productCode, "InstallLocation")
 +   InstallLoc = Session.Property("CustomActionData")
 +   If(IsEmpty(InstallLoc)) Then
 +      InstallLoc = "C:\Program Files\Intel\IPMIrasTools"
 +   End If
 +End If
 +' wscript.echo "InstallLoc=" & InstallLoc
 +
 +' Find System Folder (usually c:\windows\system32).
 +key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRoot"
 +SysLoc = sh.RegRead(key) & "\system32"
 +
 +sOutFile = SysLoc & "\autoexnt.bat"
 +Set outs = fso.OpenTextFile(sOutFile, 2, True, 0) 
 +outs.WriteLine "REM autoexnt.bat for sdiskmon " & vbCrlf 
 +outs.WriteLine "cd " & InstallLoc  & vbCrlf 
 +outs.WriteLine "sdiskmon -b "      & vbCrlf 
 +outs.Close
 +
 +' Set up the showsel EventLog source
 +' showselmsg.dll is copied by the installer already
 +keybase = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\showsel\"
 +key1 = keybase & "EventMessageFile"
 +key2 = keybase & "TypesSupported"
 +sh.RegWrite key1, "%SystemRoot%\system32\showselmsg.dll", "REG_EXPAND_SZ"
 +sh.RegWrite key2, 7, "REG_DWORD"
 +'val1 = sh.RegRead(key1)
 +'val2 = sh.RegRead(key2)
 +'wscript.echo "showsel: msgfile " & val1 & " types " & val2
 +
 +' Set up the sdiskmon service
 +' instexnt.exe, autoexnt.exe, and autoexnt.bat are copied to SysLoc already.
 +sh.Run "instexnt install", 0, True
 +sh.Run "net start autoexnt", 0, True
 +
 | 
