-
Notifications
You must be signed in to change notification settings - Fork 1
/
LTIBootstrap.vbs
executable file
·75 lines (57 loc) · 1.97 KB
/
LTIBootstrap.vbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
' // ***************************************************************************
' //
' // Copyright (c) Microsoft Corporation. All rights reserved.
' //
' // Microsoft Deployment Toolkit Solution Accelerator
' //
' // File: LTIBootstrap.ini
' //
' // Version: 6.3.8330.1000
' //
' // Purpose: Invoke LiteTouch.wsf from the appropriate folder
' //
' // Usage: wscript LTIBootstrap.vbs
' //
' // ***************************************************************************
'//----------------------------------------------------------------------------
'//
'// Global constant and variable declarations
'//
'//----------------------------------------------------------------------------
Option Explicit
Dim iRetVal
Dim oShell
Dim oFSO
Dim oDrive
Dim sCmd
Dim bFound
'//----------------------------------------------------------------------------
'// Initialization
'//----------------------------------------------------------------------------
Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
'//----------------------------------------------------------------------------
'// Find LiteTouch.wsf and run it
'//----------------------------------------------------------------------------
bFound = false
For Each oDrive in oFSO.Drives
If oDrive.IsReady then
If oFSO.FileExists(oDrive.DriveLetter & ":\MININT\Scripts\LiteTouch.wsf") then
sCmd = "wscript.exe """ & oDrive.DriveLetter & ":\MININT\Scripts\LiteTouch.wsf"" /start"
iRetVal = oShell.Run(sCmd, 1, true)
bFound = true
Exit For
End if
End if
Next
' Make sure we ran something. If not, pop up an error
If not bFound then
oShell.Popup "Unable to find LiteTouch.wsf needed to continue the deployment.", 0, "Script not found", 48
iRetVal = 9981
End if
' Delete ourselves
On Error Resume Next
oFSO.DeleteFile Wscript.ScriptFullName, true
On Error Goto 0
' All done
WScript.Quit iRetVal