forked from brianfgonzalez/Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Install-SQL2012forCM2012SP1.wsf
81 lines (63 loc) · 2.57 KB
/
Install-SQL2012forCM2012SP1.wsf
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
76
77
78
79
80
81
<job id="Install-SQL2012forCM2012SP1">
<script language="VBScript" src="..\..\scripts\ZTIUtility.vbs"/>
<script language="VBScript">
'//----------------------------------------------------------------------------
'// Solution: Hydration
'// Purpose: Used to install SQL Server 2012 for ConfigMgr 2012 SP1
'// Version: 1.0 - September 10, 2012 - Johan Arwidmark
'//
'// This script is provided "AS IS" with no warranties, confers no rights and
'// is not supported by the authors or Deployment Artist.
'//
'//----------------------------------------------------------------------------
'//----------------------------------------------------------------------------
'// Global constant and variable declarations
'//----------------------------------------------------------------------------
Option Explicit
Dim iRetVal
'//----------------------------------------------------------------------------
'// End declarations
'//----------------------------------------------------------------------------
'//----------------------------------------------------------------------------
'// Main routine
'//----------------------------------------------------------------------------
On Error Resume Next
iRetVal = ZTIProcess
ProcessResults iRetVal
On Error Goto 0
'//---------------------------------------------------------------------------
'//
'// Function: ZTIProcess()
'//
'// Input: None
'//
'// Return: Success - 0
'// Failure - non-zero
'//
'// Purpose: Perform main ZTI processing
'//
'//---------------------------------------------------------------------------
Function ZTIProcess()
Dim sFile
Dim sIniFile
oLogging.CreateEntry "Install SQL Server 2012: Starting SQL Server 2012 installation", LogTypeInfo
' Install SQL Server 2012
sFile = oUtility.ScriptDir & "\source\setup.exe"
sIniFile = oUtility.ScriptDir & "\ConfigurationFileCM2012.ini"
If not oFSO.FileExists(sFile) then
oLogging.CreateEntry "Install SQL Server 2012: " & sFile & " was not found, unable to install SQL Server 2012", LogTypeError
ZTIProcess = Failure
Exit Function
End if
oLogging.CreateEntry """" & sFile & """ /configurationfile=""" & sIniFile & """", LogTypeInfo
iRetVal = oUtility.RunWithHeartbeat("""" & sFile & """ /configurationfile=""" & sIniFile & """")
if (iRetVal = 0) or (iRetVal = 3010) then
ZTIProcess = Success
Else
ZTIProcess = Failure
End If
oLogging.CreateEntry "Install SQL Server 2012: Return code from command = " & iRetVal, LogTypeInfo
oLogging.CreateEntry "Install SQL Server 2012: Finished SQL Server 2012 installation", LogTypeInfo
End Function
</script>
</job>