ActiveInfoSys
asked on
Windows Server 2003 R2 Components and Unattended + SysPrep Installations
Hello Experts -
Attempting to integrate R2 components into Unattended Installl. Â Â Can I get general opinions, commentary here and especially addressing correct networks path systaxing below for [GUIRunOnce] registry entries.
To complete the procedure I have done the following:
1st Step: Â Distribution Share Folder Addition
I have put the \Cmpnents folder at the same level as my platform (i386) Directory. Â This is to avoid the dialog box will appear during Windows Server 2003 R2 Setup, prompting for the location of the Setup2.exe file.
2nd Step: Answer File
I have updated the answer file: Â S10300untd.txt with this new addition at the end of the file:
[GUIRunOnce]
"cmd /c \\EAHAHMGT01.ah.avisrac.ne t\svrimage /user:eahahmgt01\afasdasdf adjfklsdjf
"cmd /c \\EAHAHMGT01.ah.avisrac.ne t\svrimage \W2k3\STAN DARD_10300 \CMPNENTS\ R2\SETUP2. EXE /q /a"
 OR SHOULD THIS BE:  cmd /c net use \\eahahmgt01..............
If we stop at this point, looks like the following happens: Â http://www.mail-archive.com/unattended-info@lists.sourceforge.net/msg06618.html . Â
So Third Step, possibly, but dont see why necessary really
3rd Step: Â SourcePath Reg Key
To address the Prompt Problem  One of the issues that end users will be prompted to insert the W2K3 R2 Disc 2 when using the Windows Components Wizard to install W2K3 R2 components.
Since our Answer File has the entry: Â OEMPreInstall=Yes entry, and thus specifying that setup should copy the subfolders and files contained in the $oem$ folder, our Source Path registry key is auto reset to the servers CD-ROM drive after Setup completes BUT before[GUIRunOnce] is executed. Â SO....
We have two options: Â A and B. Â
A. Â Â Â Sysprep Factory Mode. Â
To set Source Path registry key to location of i386 and \Cmpnents folders modify SourcePath entry in Winbom.ini
Or
B. Â Â Â Answer File
To set Source Path registry key to location of i386 and \Cmpnents folders modify SourcePath entry at the [GUIRunOnce] section.
[GUIRunOnce]
"cmd /c reg add HKLM\Software\Microsoft\Wi ndows\Curr entVersion \Setup /v SourcePath /t REG_SZ /d source_path /f"
"cmd /c reg add HKLM\Software\Microsoft\Wi ndows\Curr entVersion \Setup /v ServicePackSourcePath /t REG_SZ /d source_path /f"
[GUIRunOnce]
"cmd /c reg add HKLM\Software\Microsoft\Wi ndows\Curr entVersion \Setup /v SourcePath /t REG_SZ /d source_path /f"
"cmd /c reg add HKLM\Software\Microsoft\Wi ndows\Curr entVersion \Setup /v ServicePackSourcePath /t REG_SZ /d source_path /f"
But why? Â From Microsoft Docs, the above steps are important because Sysprep resets the SourcePath reg key to the servers CD-ROM during Mini-Step if the path in accessible or invalid during Mini-Setup. This happens in most instances where a UNC network share is set for the SourcePath reg key. Â Thus, to avoid resetting the SourcePath reg key, use the ResetSourcePath entry in Sysprep.inf before launching SysPrep. Â But this is yet to be achieved? Or understood....
Any ideas and help much appreciated.
Attempting to integrate R2 components into Unattended Installl. Â Â Can I get general opinions, commentary here and especially addressing correct networks path systaxing below for [GUIRunOnce] registry entries.
To complete the procedure I have done the following:
1st Step: Â Distribution Share Folder Addition
I have put the \Cmpnents folder at the same level as my platform (i386) Directory. Â This is to avoid the dialog box will appear during Windows Server 2003 R2 Setup, prompting for the location of the Setup2.exe file.
2nd Step: Answer File
I have updated the answer file: Â S10300untd.txt with this new addition at the end of the file:
[GUIRunOnce]
"cmd /c \\EAHAHMGT01.ah.avisrac.ne
"cmd /c \\EAHAHMGT01.ah.avisrac.ne
 OR SHOULD THIS BE:  cmd /c net use \\eahahmgt01..............
If we stop at this point, looks like the following happens: Â http://www.mail-archive.com/unattended-info@lists.sourceforge.net/msg06618.html . Â
So Third Step, possibly, but dont see why necessary really
3rd Step: Â SourcePath Reg Key
To address the Prompt Problem  One of the issues that end users will be prompted to insert the W2K3 R2 Disc 2 when using the Windows Components Wizard to install W2K3 R2 components.
Since our Answer File has the entry: Â OEMPreInstall=Yes entry, and thus specifying that setup should copy the subfolders and files contained in the $oem$ folder, our Source Path registry key is auto reset to the servers CD-ROM drive after Setup completes BUT before[GUIRunOnce] is executed. Â SO....
We have two options: Â A and B. Â
A. Â Â Â Sysprep Factory Mode. Â
To set Source Path registry key to location of i386 and \Cmpnents folders modify SourcePath entry in Winbom.ini
Or
B. Â Â Â Answer File
To set Source Path registry key to location of i386 and \Cmpnents folders modify SourcePath entry at the [GUIRunOnce] section.
[GUIRunOnce]
"cmd /c reg add HKLM\Software\Microsoft\Wi
"cmd /c reg add HKLM\Software\Microsoft\Wi
[GUIRunOnce]
"cmd /c reg add HKLM\Software\Microsoft\Wi
"cmd /c reg add HKLM\Software\Microsoft\Wi
But why? Â From Microsoft Docs, the above steps are important because Sysprep resets the SourcePath reg key to the servers CD-ROM during Mini-Step if the path in accessible or invalid during Mini-Setup. This happens in most instances where a UNC network share is set for the SourcePath reg key. Â Thus, to avoid resetting the SourcePath reg key, use the ResetSourcePath entry in Sysprep.inf before launching SysPrep. Â But this is yet to be achieved? Or understood....
Any ideas and help much appreciated.
ASKER
Awesome, yes it does work but then setup stops, just pauses after some post-config wmi,vbscripting I've setup...
Can I post the scripts and get your feedback Netman66....
Nothing major, just small scripts...
Can I post the scripts and get your feedback Netman66....
Nothing major, just small scripts...
Sure. Â If there's anything special about them then inform us with some comments.
ASKER
I think I'm about to fix it...hang on until morning..OK
ok
ASKER
This is the code not working netman66.... the previous code does OK for all models of DELL, 1750, 1850, 1950, but these 1955 are not playing ball....
      ' Set drive letters for DELL POWEREDGE 1955 BLADES   (might be different if using Virtual Media via DRAC in use)
      Sub PEx955
           Set colVolumes = objWMIService.ExecQuery("S elect * from Win32_Volume")
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "M:"
                              objVolume.Put_     Â
                              UpdateProgress("  1955vFloppy changed to M:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_
                              UpdateProgress("  Software changed to V:")     Â
                      ELSEIF strVol = "F:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      ELSEIF strVol = "G:" THEN
                            objVolume.DriveLetter = "N:"
                              objVolume.Put_
                              UpdateProgress("  1955vCD changed to N:")     Â
                      END IF
           Next
     Â
          Â
      ' Set drive letters for DELL POWEREDGE 1955 BLADES   (might be different if using Virtual Media via DRAC in use)
      Sub PEx955
           Set colVolumes = objWMIService.ExecQuery("S
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "M:"
                              objVolume.Put_     Â
                              UpdateProgress("  1955vFloppy changed to M:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_
                              UpdateProgress("  Software changed to V:")     Â
                      ELSEIF strVol = "F:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      ELSEIF strVol = "G:" THEN
                            objVolume.DriveLetter = "N:"
                              objVolume.Put_
                              UpdateProgress("  1955vCD changed to N:")     Â
                      END IF
           Next
     Â
          Â
ASKER
<?xml version="1.0"?>
<package>
<job id="Server_Build03">
<!--
runstart.wsf
 Windows Server 2003 Post Textmode Install Configuration Script
'Date            Name                 Description
-------------------------- ---------- ---------- ---------- ---------- -------
'04/06/2007       J Miles                 Update for DELL PowerEdge x955 series
To Do:
-->
<!-- Include Files -->
<script language="vbscript" src="c:\winnt\preprep\scri pts\Prog_w in.vbs"/>
<script language="vbscript" src="c:\winnt\preprep\scri pts\copyfi les.vbs"/>
<script language="vbscript" src="c:\winnt\preprep\scri pts\hotfix es.vbs"/>
<script language="vbscript" src="c:\winnt\preprep\scri pts\coreap ps.vbs"/>
<!-- Below is the Main Script -->
<script language="vbscript">
<![CDATA[
' Set variables
      Option Explicit
     Â
      Dim scriptname, jobID, patchno, insNum, prog, subKey, arrSubKeys, vidkey
      Dim strVersion, strRegion, strComputer, strModel, strVol, strInstPath, strSysRoot, strOS, strScriptPath, strCompName, strHotfix, strKeyPath
      Dim wshHandle, wshSysEnv
      Dim objUser, objGroup, objUserFlags, objService, objNewJob, objVolume, objNetwork, objWMIService, objSysRoot, objItem, objReg
      Dim colAccounts, colVolumes, colItems
     Â
      strComputer = "."
      scriptname = "AvisRunStartScript"
     Â
' Set Environment
      Set wshHandle = WScript.CreateObject("WScr ipt.Shell" )
      Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=imper sonate}!\\ " & strComputer & "\root\cimv2")
      Set fsoHandle = WScript.CreateObject("Scri pting.File SystemObje ct")
      Set objNetwork = CreateObject("WScript.Netw ork")
      Set wshSysEnv = wshHandle.Environment("Pro cess")
      Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv" )     Â
     Â
      const HKLM = &H80000002
      strSysRoot = wshSysEnv("SYSTEMROOT")     Â
      strScriptPath = strSysRoot & "\preprep\scripts"
      strInstPath = strSysRoot & "\MASTERS"
      strModel = "unknown"     Â
      strCompName = objNetwork.ComputerName
      strHotfix = strInstPath & "\hotfixes\"
      strKeyPath = "System\CurrentControlSet\ Control\Vi deo"
      patchno = 0
      insNum = 1
      prog = 1
     Â
' Define Server Hardware to variable
      SET colItems = objWMIService.ExecQuery("S ELECT * FROM Win32_ComputerSystem", "WQL")     Â
                  For Each objItem In colItems
                             strModel = objItem.Model
                  Next                                 Â
' Identify OS
      SET colItems = objWMIService.ExecQuery("S ELECT * FROM Win32_OperatingSystem", "WQL")     Â
           For Each objItem In colItems
                 strOS = objItem.Caption
           Next
                           Â
' Open Progress Window
      OpenProgressWindow
      UpdateProgress(prog & ".  " & "Starting post setup process")
      prog = prog + 1
' Enumerate Basic Info
      UpdateProgress(prog & ".  " & "Model: " & strModel)
      prog = prog + 1
      UpdateProgress(prog & ".  " & "Operating System: " & strOS)           Â
      prog = prog + 1
     Â
' Map network drive
          Â
      UpdateProgress(prog & ".  " & "Mapping Network Drive")     Â
      prog = prog + 1
      objNetwork.MapNetworkDrive "Z:", "\\EIXIXBKP02.ix.avisrac.n et\svrimag e", False,           Â
' Set startup timeout in boot.ini
      UpdateProgress(prog & ".  " & "Configure boot.ini")     Â
      prog = prog + 1
      wshHandle.Run "cmd.exe /c ATTRIB -R -S -H C:\boot.ini", 0, True
      wshHandle.Run "rundll32 setupapi,InstallHinfSectio n DefaultInstall 128 " & strScriptPath & "\boot.inf", 0, True
      wshHandle.Run "cmd.exe /c ATTRIB +R +S +H C:\boot.ini", 0, True
     Â
' Set drive letters
      UpdateProgress(prog & ".  " & "Setting Drive Letters")
      prog = prog + 1
     Â
      ' Determine Server Model Type
           SELECT CASE Trim(strModel)
                 CASE "VMware Virtual Platform"
                                  vmdrive
                 CASE "PowerEdge 1750"
                                  PEx650x750           Â
                 CASE "PowerEdge 1850"
                                  PEx850x950
                 CASE "PowerEdge 1950"
                                  PEx850x950
                 CASE "PowerEdge 1955"
                                  PEx955
                 CASE "PowerEdge 2850"
                                  PEx850x950
                 CASE "PowerEdge 2950"
                                  PEx850x950
                 CASE "PowerEdge 6650"
                                  PEx650x750
                 CASE "PowerEdge 6850"
                                  PEx850x950
                 CASE "PowerEdge 6950"
                                  PEx850x950
                 CASE ELSE
                                  NoID                      Â
           END Select
      ' No suitable hardware found
      Sub NoID
     Â
      End Sub
      ' Set drive letters for vmware guest
      Sub vmdrive
           Set colVolumes = objWMIService.ExecQuery("S elect * from Win32_Volume")
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      END If
           Next
     Â
          Â
      End Sub
      ' Set drive letters for legacy hardware
      Sub PEx650x750
           Set colVolumes = objWMIService.ExecQuery("S elect * from Win32_Volume")
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_     Â
                              UpdateProgress("  Software changed to V:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      END IF
           Next
          Â
     Â
      End Sub      Â
      ' Set drive letters for current and new generation hardware
      Sub PEx850x950
           Set colVolumes = objWMIService.ExecQuery("S elect * from Win32_Volume")
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "M:"
                              objVolume.Put_     Â
                              UpdateProgress("  vFloppy changed to M:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_
                              UpdateProgress("  Software changed to V:")     Â
                      ELSEIF strVol = "F:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      ELSEIF strVol = "G:" THEN
                            objVolume.DriveLetter = "N:"
                              objVolume.Put_
                              UpdateProgress("  vCD changed to N:")     Â
                      END IF
           Next
     Â
          Â
      End Sub
<package>
<job id="Server_Build03">
<!--
runstart.wsf
 Windows Server 2003 Post Textmode Install Configuration Script
'Date            Name                 Description
--------------------------
'04/06/2007       J Miles                 Update for DELL PowerEdge x955 series
To Do:
-->
<!-- Include Files -->
<script language="vbscript" src="c:\winnt\preprep\scri
<script language="vbscript" src="c:\winnt\preprep\scri
<script language="vbscript" src="c:\winnt\preprep\scri
<script language="vbscript" src="c:\winnt\preprep\scri
<!-- Below is the Main Script -->
<script language="vbscript">
<![CDATA[
' Set variables
      Option Explicit
     Â
      Dim scriptname, jobID, patchno, insNum, prog, subKey, arrSubKeys, vidkey
      Dim strVersion, strRegion, strComputer, strModel, strVol, strInstPath, strSysRoot, strOS, strScriptPath, strCompName, strHotfix, strKeyPath
      Dim wshHandle, wshSysEnv
      Dim objUser, objGroup, objUserFlags, objService, objNewJob, objVolume, objNetwork, objWMIService, objSysRoot, objItem, objReg
      Dim colAccounts, colVolumes, colItems
     Â
      strComputer = "."
      scriptname = "AvisRunStartScript"
     Â
' Set Environment
      Set wshHandle = WScript.CreateObject("WScr
      Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=imper
      Set fsoHandle = WScript.CreateObject("Scri
      Set objNetwork = CreateObject("WScript.Netw
      Set wshSysEnv = wshHandle.Environment("Pro
      Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv"
     Â
      const HKLM = &H80000002
      strSysRoot = wshSysEnv("SYSTEMROOT")     Â
      strScriptPath = strSysRoot & "\preprep\scripts"
      strInstPath = strSysRoot & "\MASTERS"
      strModel = "unknown"     Â
      strCompName = objNetwork.ComputerName
      strHotfix = strInstPath & "\hotfixes\"
      strKeyPath = "System\CurrentControlSet\
      patchno = 0
      insNum = 1
      prog = 1
     Â
' Define Server Hardware to variable
      SET colItems = objWMIService.ExecQuery("S
                  For Each objItem In colItems
                             strModel = objItem.Model
                  Next                                 Â
' Identify OS
      SET colItems = objWMIService.ExecQuery("S
           For Each objItem In colItems
                 strOS = objItem.Caption
           Next
                           Â
' Open Progress Window
      OpenProgressWindow
      UpdateProgress(prog & ".  " & "Starting post setup process")
      prog = prog + 1
' Enumerate Basic Info
      UpdateProgress(prog & ".  " & "Model: " & strModel)
      prog = prog + 1
      UpdateProgress(prog & ".  " & "Operating System: " & strOS)           Â
      prog = prog + 1
     Â
' Map network drive
          Â
      UpdateProgress(prog & ".  " & "Mapping Network Drive")     Â
      prog = prog + 1
      objNetwork.MapNetworkDrive
' Set startup timeout in boot.ini
      UpdateProgress(prog & ".  " & "Configure boot.ini")     Â
      prog = prog + 1
      wshHandle.Run "cmd.exe /c ATTRIB -R -S -H C:\boot.ini", 0, True
      wshHandle.Run "rundll32 setupapi,InstallHinfSectio
      wshHandle.Run "cmd.exe /c ATTRIB +R +S +H C:\boot.ini", 0, True
     Â
' Set drive letters
      UpdateProgress(prog & ".  " & "Setting Drive Letters")
      prog = prog + 1
     Â
      ' Determine Server Model Type
           SELECT CASE Trim(strModel)
                 CASE "VMware Virtual Platform"
                                  vmdrive
                 CASE "PowerEdge 1750"
                                  PEx650x750           Â
                 CASE "PowerEdge 1850"
                                  PEx850x950
                 CASE "PowerEdge 1950"
                                  PEx850x950
                 CASE "PowerEdge 1955"
                                  PEx955
                 CASE "PowerEdge 2850"
                                  PEx850x950
                 CASE "PowerEdge 2950"
                                  PEx850x950
                 CASE "PowerEdge 6650"
                                  PEx650x750
                 CASE "PowerEdge 6850"
                                  PEx850x950
                 CASE "PowerEdge 6950"
                                  PEx850x950
                 CASE ELSE
                                  NoID                      Â
           END Select
      ' No suitable hardware found
      Sub NoID
     Â
      End Sub
      ' Set drive letters for vmware guest
      Sub vmdrive
           Set colVolumes = objWMIService.ExecQuery("S
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      END If
           Next
     Â
          Â
      End Sub
      ' Set drive letters for legacy hardware
      Sub PEx650x750
           Set colVolumes = objWMIService.ExecQuery("S
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_     Â
                              UpdateProgress("  Software changed to V:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      END IF
           Next
          Â
     Â
      End Sub      Â
      ' Set drive letters for current and new generation hardware
      Sub PEx850x950
           Set colVolumes = objWMIService.ExecQuery("S
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "M:"
                              objVolume.Put_     Â
                              UpdateProgress("  vFloppy changed to M:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_
                              UpdateProgress("  Software changed to V:")     Â
                      ELSEIF strVol = "F:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      ELSEIF strVol = "G:" THEN
                            objVolume.DriveLetter = "N:"
                              objVolume.Put_
                              UpdateProgress("  vCD changed to N:")     Â
                      END IF
           Next
     Â
          Â
      End Sub
ASKER
To Do:
-->
<!-- Include Files -->
**what does the To Do: Â do above?
-->
<!-- Include Files -->
**what does the To Do: Â do above?
I haven't parsed all the scripts yet, however one thing comes to mind here.
These Blades must be setup with LUNs on the SAN so I can see some of the local stuff to the server working but not anything that needs to be configured through the HBA.
Are these scripts running after the HBA and LUN are configured?
I'm trying to figure out what and when these scripts are used (for)?
Perhaps a short walkthrough of how your staging these servers would help figure out where the process fails. Â Keep in mind, Blade servers are a whole different beast than normal servers and the Win32_Volume subset may not contain the same information without specifically adding the MIB info into WBEM.
These Blades must be setup with LUNs on the SAN so I can see some of the local stuff to the server working but not anything that needs to be configured through the HBA.
Are these scripts running after the HBA and LUN are configured?
I'm trying to figure out what and when these scripts are used (for)?
Perhaps a short walkthrough of how your staging these servers would help figure out where the process fails. Â Keep in mind, Blade servers are a whole different beast than normal servers and the Win32_Volume subset may not contain the same information without specifically adding the MIB info into WBEM.
ASKER
Wow..thanks Netmann66.. well stated above in terms of context and process.
OK
Scripts run as a post-setup config routine after an unattended installation, so using the cmdlines.txt "Â root of $oem$...
[Commands]
"C:\WINNT\PREPREP\SCRIPTS\ textmode.c md"
Then textmode.cmd looks like the following:
Rem -- Set variables
Set INSTALL=C:\WINNT\PREPREP\S CRIPTS
Rem -- Inject Registry changes
cmd /c %SystemRoot%\REGEDIT.EXE /S %INSTALL%\textmode.reg
Rem -- Set the Windows Script Host Defaults
cmd /c %systemroot%\system32\cscr ipt //H:cscript //NoLogo //S
And inside textmode.cmd the following is executed in a line or two:
[HKEY_LOCAL_MACHINE\SOFTWA RE\Microso ft\Windows \CurrentVe rsion\RunO nce]
"runstart"="cmd /c %SystemRoot%\\PREPREP\\SCR IPTS\\runs tart.wsf
OK
Scripts run as a post-setup config routine after an unattended installation, so using the cmdlines.txt "Â root of $oem$...
[Commands]
"C:\WINNT\PREPREP\SCRIPTS\
Then textmode.cmd looks like the following:
Rem -- Set variables
Set INSTALL=C:\WINNT\PREPREP\S
Rem -- Inject Registry changes
cmd /c %SystemRoot%\REGEDIT.EXE /S %INSTALL%\textmode.reg
Rem -- Set the Windows Script Host Defaults
cmd /c %systemroot%\system32\cscr
And inside textmode.cmd the following is executed in a line or two:
[HKEY_LOCAL_MACHINE\SOFTWA
"runstart"="cmd /c %SystemRoot%\\PREPREP\\SCR
ASKER
And this brings us to runstart.wsf...
The  post configuration after a unattended install...
Posted here.
<?xml version="1.0"?>
<package>
<job id="Server_Build03">
<!--
runstart.wsf
Windows Server 2003 Post Textmode Install Configuration Script
'Date            Name                 Description
-------------------------- ---------- ---------- ---------- ---------- --
'04/06/2007       J Miles                 Update for DELL PowerEdge x955 series
To Do:
-->
<!-- Include Files -->
<script language="vbscript" src="c:\winnt\preprep\scri pts\Prog_w in.vbs"/>
<script language="vbscript" src="c:\winnt\preprep\scri pts\copyfi les.vbs"/>
<script language="vbscript" src="c:\winnt\preprep\scri pts\hotfix es.vbs"/>
<script language="vbscript" src="c:\winnt\preprep\scri pts\coreap ps.vbs"/>
<!-- Below is the Main Script -->
<script language="vbscript">
<![CDATA[
' Set variables
      Option Explicit
     Â
      Dim scriptname, jobID, patchno, insNum, prog, subKey, arrSubKeys, vidkey
      Dim strVersion, strRegion, strComputer, strModel, strVol, strInstPath, strSysRoot, strOS, strScriptPath, strCompName, strHotfix, strKeyPath
      Dim wshHandle, wshSysEnv
      Dim objUser, objGroup, objUserFlags, objService, objNewJob, objVolume, objNetwork, objWMIService, objSysRoot, objItem, objReg
      Dim colAccounts, colVolumes, colItems
     Â
      strComputer = "."
      scriptname = "AvisRunStartScript"
     Â
' Set Environment
      Set wshHandle = WScript.CreateObject("WScr ipt.Shell" )
      Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=imper sonate}!\\ " & strComputer & "\root\cimv2")
      Set fsoHandle = WScript.CreateObject("Scri pting.File SystemObje ct")
      Set objNetwork = CreateObject("WScript.Netw ork")
      Set wshSysEnv = wshHandle.Environment("Pro cess")
      Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv" )     Â
     Â
      const HKLM = &H80000002
      strSysRoot = wshSysEnv("SYSTEMROOT")     Â
      strScriptPath = strSysRoot & "\preprep\scripts"
      strInstPath = strSysRoot & "\MASTERS"
      strModel = "unknown"     Â
      strCompName = objNetwork.ComputerName
      strHotfix = strInstPath & "\hotfixes\"
      strKeyPath = "System\CurrentControlSet\ Control\Vi deo"
      patchno = 0
      insNum = 1
      prog = 1
     Â
' Define Server Hardware to variable
      SET colItems = objWMIService.ExecQuery("S ELECT * FROM Win32_ComputerSystem", "WQL")     Â
                  For Each objItem In colItems
                             strModel = objItem.Model
                  Next                                 Â
' Identify OS
      SET colItems = objWMIService.ExecQuery("S ELECT * FROM Win32_OperatingSystem", "WQL")     Â
           For Each objItem In colItems
                 strOS = objItem.Caption
           Next
                           Â
' Open Progress Window
      OpenProgressWindow
      UpdateProgress(prog & ".  " & "Starting post setup process")
      prog = prog + 1
' Enumerate Basic Info
      UpdateProgress(prog & ".  " & "Model: " & strModel)
      prog = prog + 1
      UpdateProgress(prog & ".  " & "Operating System: " & strOS)           Â
      prog = prog + 1
     Â
' Map network drive
          Â
      UpdateProgress(prog & ".  " & "Mapping Network Drive")     Â
      prog = prog + 1
      objNetwork.MapNetworkDrive "Z:", "\\EIXIXBKP02.ix.avisrac.n et\svrimag e", False,           Â
' Set startup timeout in boot.ini
      UpdateProgress(prog & ".  " & "Configure boot.ini")     Â
      prog = prog + 1
      wshHandle.Run "cmd.exe /c ATTRIB -R -S -H C:\boot.ini", 0, True
      wshHandle.Run "rundll32 setupapi,InstallHinfSectio n DefaultInstall 128 " & strScriptPath & "\boot.inf", 0, True
      wshHandle.Run "cmd.exe /c ATTRIB +R +S +H C:\boot.ini", 0, True
     Â
' Set drive letters
      UpdateProgress(prog & ".  " & "Setting Drive Letters")
      prog = prog + 1
     Â
      ' Determine Server Model Type
           SELECT CASE Trim(strModel)
                 CASE "VMware Virtual Platform"
                                  vmdrive
                 CASE "PowerEdge 1750"
                                  PEx650x750           Â
                 CASE "PowerEdge 1850"
                                  PEx850x950
                 CASE "PowerEdge 1950"
                                  PEx850x950
                 CASE "PowerEdge 1955"
                                  PEx955
                 CASE "PowerEdge 2850"
                                  PEx850x950
                 CASE "PowerEdge 2950"
                                  PEx850x950
                 CASE "PowerEdge 6650"
                                  PEx650x750
                 CASE "PowerEdge 6850"
                                  PEx850x950
                 CASE "PowerEdge 6950"
                                  PEx850x950
                 CASE ELSE
                                  NoID                      Â
           END Select
      ' No suitable hardware found
      Sub NoID
     Â
      End Sub
      ' Set drive letters for vmware guest
      Sub vmdrive
           Set colVolumes = objWMIService.ExecQuery("S elect * from Win32_Volume")
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      END If
           Next
     Â
          Â
      End Sub
      ' Set drive letters for legacy hardware
      Sub PEx650x750
           Set colVolumes = objWMIService.ExecQuery("S elect * from Win32_Volume")
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_     Â
                              UpdateProgress("  Software changed to V:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      END IF
           Next
          Â
     Â
      End Sub      Â
      ' Set drive letters for current and new generation hardware
      Sub PEx850x950
           Set colVolumes = objWMIService.ExecQuery("S elect * from Win32_Volume")
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "M:"
                              objVolume.Put_     Â
                              UpdateProgress("  vFloppy changed to M:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_
                              UpdateProgress("  Software changed to V:")     Â
                      ELSEIF strVol = "F:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      ELSEIF strVol = "G:" THEN
                            objVolume.DriveLetter = "N:"
                              objVolume.Put_
                              UpdateProgress("  vCD changed to N:")     Â
                      END IF
           Next
     Â
          Â
      End Sub
     Â
      ' Set drive letters for DELL POWEREDGE 1955 BLADES   (NOTE: Blades do not have CD-ROM and DRAC as New Gen)
      Sub PEx955
           Set colVolumes = objWMIService.ExecQuery("S elect * from Win32_Volume")
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "M:"
                              objVolume.Put_     Â
                              UpdateProgress("  1955vFloppy changed to M:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_
                              UpdateProgress("  Software changed to V:")     Â
                      ELSEIF strVol = "F:" THEN
                            objVolume.DriveLetter = "N:"
                              objVolume.Put_
                              UpdateProgress("  1955vCD changed to N:")     Â
                      END IF
           Next
     Â
          Â
      End Sub
' Set Server 2003 media source path
      UpdateProgress(prog & ".  " & "Updating W2k3 Source Path")
      prog = prog + 1
      If strModel = "VMware Virtual Platform" Then
           wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\W indows\Cur rentVersio n\Setup\So urcePath", "C:\\W2k3.SRV\\Standard\\" , "REG_SZ"
           wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\W indows\Cur rentVersio n\Setup\Se rvicePackS ourcePath" , "C:\\W2k3.SRV\\Standard\\" , "REG_SZ"           Â
           UpdateProgress("  W2k3 source path changed to C:")
      Else
           wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\W indows\Cur rentVersio n\Setup\So urcePath", "V:\\W2k3.SRV\\Standard\\" , "REG_SZ"
           wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\W indows\Cur rentVersio n\Setup\Se rvicePackS ourcePath" , "V:\\W2k3.SRV\\Standard\\" , "REG_SZ"
           UpdateProgress("  W2k3 source path changed to V:")
      End If
' Set Windows Time and Video Configuration if VM Guest
      If strModel = "VMware Virtual Platform" Then
           UpdateProgress(prog & ".  " & "Configure VM Guest Time and Video")
           prog = prog + 1
           wshHandle.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM \CurrentCo ntrolSet\S ervices\W3 2Time\Para meters\Typ e", "NoSync" 'check type     Â
           wshHandle.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM \CurrentCo ntrolSet\C ontrol\Tim eZoneInfor mation\Dis ableAutoDa ylightTime Set", "1", "REG_DWORD"
     Â
           objreg.EnumKey HKLM, strKeyPath, arrSubKeys
                 For Each subKey in arrSubKeys
                      If subkey = "{23A77BF7-ED96-40EC-AF06- 9B1F486773 2A}" Or subkey = "{8B6D7859-A639-4A15-8790- 7161976D05 7A}" Or subkey = "{DEB039CC-B704-4F53-B43E- 9DD4432FA2 E9}" Then
                            subKey = Null
                      Else
                            vidkey = subkey      Â
                      End if
                 Next
           wshHandle.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM \CurrentCo ntrolSet\C ontrol\Vid eo\" & vidkey & "\0000\Acceleration.Level" , "00000000", "REG_DWORD"
           wshHandle.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM \ControlSe t001\Contr ol\Video\" & vidkey & "\0000\Acceleration.Level" , "00000000", "REG_DWORD"
      End If
' Delete unwanted Start menu and Desktop items
      UpdateProgress(prog & ".  " & "Processing Start Menu items")
      prog = prog + 1
      wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\A ctive Setup\Installed Components\{44BBA840-CC51- 11CF-AAFA- 00AA00B601 5C}\StubPa th", ""
      wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\A ctive Setup\Installed Components\{7790769C-0471- 11d2-AF11- 00C04FA35D 02}\StubPa th", ""
      wshHandle.RegDelete("HKEY_ CURRENT_US ER\Keyboar d Layout\Preload\2")
      wshHandle.RegDelete("HKEY_ USERS\.DEF AULT\Keybo ard Layout\Preload\2")
      fsoHandle.DeleteFile "C:\Documents and Settings\All Users\start menu\Windows Catalog.lnk"
      fsoHandle.DeleteFile "C:\Documents and Settings\All Users\start menu\Windows Update.lnk"
      fsoHandle.DeleteFile "C:\Documents and Settings\All Users\Desktop\Security Configuration Wizard.lnk"     Â
      fsoHandle.DeleteFile "C:\Documents and Settings\Default User\Start Menu\Programs\Remote Assistance.lnk"
      fsoHandle.DeleteFile "C:\Documents and Settings\Administrator\Sta rt Menu\Programs\Remote Assistance.lnk"
     Â
' Delete Support User account
     Â
      UpdateProgress(prog & ".  " & "Delete Support user account")
      prog = prog + 1
     Â
      Set colAccounts = GetObject("WinNT://" & strComputer & "")     Â
      colAccounts.Delete "user", "SUPPORT_388945a0"
     Â
     Â
' Add standby Admin account     Â
      UpdateProgress(prog & ".  " & "Create standby local Admin user account")
      prog = prog + 1
      ' Create user
           Set colAccounts = GetObject("WinNT://" & strComputer & "")
           Set objUser = colAccounts.Create("user", "sysman")
           objUser.SetPassword "Bx23G73XV0"
           objUser.SetInfo
      ' Set no password expiry
           Set objUser = GetObject("WinNT://" & strComputer & "/sysman,user")
           objUserFlags = &H10000
           objUser.Put "UserFlags", objUserFlags
           objUser.SetInfo
      ' Add user to Local Admins group     Â
           Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
           Set objUser = GetObject("WinNT://" & strCompName & "/sysman,user")
           objGroup.Add (objUser.ADsPath)
' Configure DNS search suffixes
      UpdateProgress(prog & ".  " & "Configure DNS search suffixes")
      prog = prog + 1
      wshHandle.RegWrite "HKLM\SYSTEM\CurrentContro lSet\Servi ces\Tcpip\ Parameters \SearchLis t", "avisrac.net,ix.avisrac.ne t,ah.avisr ac.net", "REG_SZ"
' Install Hotfixes
      Call Hotfixes
     Â
' Install Core Apps
      Call CoreApps
' Copy i386 folder
     Â
      scriptname = "AvisRunStartScript"
     Â
      Call Copyi386
' Copy Common Software to PowerEdge servers
      If strModel <> "VMware Virtual Platform" Then
           CopyMediaSource
      End If
     Â
' Set initial Local Security Policy
      UpdateProgress(prog & ".  " & "Configure temporary Local Security Policy")
      prog = prog + 1
     Â
      wshHandle.Run "cmd.exe /c secedit /configure /db secedit.sdb /cfg " & strScriptPath & "\preprep.inf", 0, True
' Configure scheduled Defrag task
      UpdateProgress(prog & ".  " & "Configure defrag scheduled task")
      prog = prog + 1
      Set objService = GetObject("winmgmts:\\" & strComputer & "")
      Set objNewJob = objService.Get("Win32_Sche duledJob")
      objNewJob.Create "Defrag C:", "********030000.000000-000 ", True , 1 OR 2 OR 4 OR 8 OR 16 OR 32 OR 64, , , JobID
' Defrag C:
      UpdateProgress(prog & ".  " & "Defragmenting C: Drive")     Â
      prog = prog + 1
      wshHandle.Run "C:\winnt\system32\defrag. exe c: -f", 0, True
     Â
     Â
' End script and reboot
      UpdateProgress("Preparing to reboot")
     Â
      WScript.Sleep 3000
     Â
      CloseProgressWindow
     Â
      WScript.Sleep 6000
     Â
      wshHandle.Run "c:\winnt\system32\shutdow n.exe -R -T 10 -c ""Rebooting to set final build configuration""", 0, true
     Â
]]>
</script>
</job>
</package>
The  post configuration after a unattended install...
Posted here.
<?xml version="1.0"?>
<package>
<job id="Server_Build03">
<!--
runstart.wsf
Windows Server 2003 Post Textmode Install Configuration Script
'Date            Name                 Description
--------------------------
'04/06/2007       J Miles                 Update for DELL PowerEdge x955 series
To Do:
-->
<!-- Include Files -->
<script language="vbscript" src="c:\winnt\preprep\scri
<script language="vbscript" src="c:\winnt\preprep\scri
<script language="vbscript" src="c:\winnt\preprep\scri
<script language="vbscript" src="c:\winnt\preprep\scri
<!-- Below is the Main Script -->
<script language="vbscript">
<![CDATA[
' Set variables
      Option Explicit
     Â
      Dim scriptname, jobID, patchno, insNum, prog, subKey, arrSubKeys, vidkey
      Dim strVersion, strRegion, strComputer, strModel, strVol, strInstPath, strSysRoot, strOS, strScriptPath, strCompName, strHotfix, strKeyPath
      Dim wshHandle, wshSysEnv
      Dim objUser, objGroup, objUserFlags, objService, objNewJob, objVolume, objNetwork, objWMIService, objSysRoot, objItem, objReg
      Dim colAccounts, colVolumes, colItems
     Â
      strComputer = "."
      scriptname = "AvisRunStartScript"
     Â
' Set Environment
      Set wshHandle = WScript.CreateObject("WScr
      Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=imper
      Set fsoHandle = WScript.CreateObject("Scri
      Set objNetwork = CreateObject("WScript.Netw
      Set wshSysEnv = wshHandle.Environment("Pro
      Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv"
     Â
      const HKLM = &H80000002
      strSysRoot = wshSysEnv("SYSTEMROOT")     Â
      strScriptPath = strSysRoot & "\preprep\scripts"
      strInstPath = strSysRoot & "\MASTERS"
      strModel = "unknown"     Â
      strCompName = objNetwork.ComputerName
      strHotfix = strInstPath & "\hotfixes\"
      strKeyPath = "System\CurrentControlSet\
      patchno = 0
      insNum = 1
      prog = 1
     Â
' Define Server Hardware to variable
      SET colItems = objWMIService.ExecQuery("S
                  For Each objItem In colItems
                             strModel = objItem.Model
                  Next                                 Â
' Identify OS
      SET colItems = objWMIService.ExecQuery("S
           For Each objItem In colItems
                 strOS = objItem.Caption
           Next
                           Â
' Open Progress Window
      OpenProgressWindow
      UpdateProgress(prog & ".  " & "Starting post setup process")
      prog = prog + 1
' Enumerate Basic Info
      UpdateProgress(prog & ".  " & "Model: " & strModel)
      prog = prog + 1
      UpdateProgress(prog & ".  " & "Operating System: " & strOS)           Â
      prog = prog + 1
     Â
' Map network drive
          Â
      UpdateProgress(prog & ".  " & "Mapping Network Drive")     Â
      prog = prog + 1
      objNetwork.MapNetworkDrive
' Set startup timeout in boot.ini
      UpdateProgress(prog & ".  " & "Configure boot.ini")     Â
      prog = prog + 1
      wshHandle.Run "cmd.exe /c ATTRIB -R -S -H C:\boot.ini", 0, True
      wshHandle.Run "rundll32 setupapi,InstallHinfSectio
      wshHandle.Run "cmd.exe /c ATTRIB +R +S +H C:\boot.ini", 0, True
     Â
' Set drive letters
      UpdateProgress(prog & ".  " & "Setting Drive Letters")
      prog = prog + 1
     Â
      ' Determine Server Model Type
           SELECT CASE Trim(strModel)
                 CASE "VMware Virtual Platform"
                                  vmdrive
                 CASE "PowerEdge 1750"
                                  PEx650x750           Â
                 CASE "PowerEdge 1850"
                                  PEx850x950
                 CASE "PowerEdge 1950"
                                  PEx850x950
                 CASE "PowerEdge 1955"
                                  PEx955
                 CASE "PowerEdge 2850"
                                  PEx850x950
                 CASE "PowerEdge 2950"
                                  PEx850x950
                 CASE "PowerEdge 6650"
                                  PEx650x750
                 CASE "PowerEdge 6850"
                                  PEx850x950
                 CASE "PowerEdge 6950"
                                  PEx850x950
                 CASE ELSE
                                  NoID                      Â
           END Select
      ' No suitable hardware found
      Sub NoID
     Â
      End Sub
      ' Set drive letters for vmware guest
      Sub vmdrive
           Set colVolumes = objWMIService.ExecQuery("S
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      END If
           Next
     Â
          Â
      End Sub
      ' Set drive letters for legacy hardware
      Sub PEx650x750
           Set colVolumes = objWMIService.ExecQuery("S
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_     Â
                              UpdateProgress("  Software changed to V:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      END IF
           Next
          Â
     Â
      End Sub      Â
      ' Set drive letters for current and new generation hardware
      Sub PEx850x950
           Set colVolumes = objWMIService.ExecQuery("S
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "M:"
                              objVolume.Put_     Â
                              UpdateProgress("  vFloppy changed to M:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_
                              UpdateProgress("  Software changed to V:")     Â
                      ELSEIF strVol = "F:" THEN
                            objVolume.DriveLetter = "W:"
                              objVolume.Put_     Â
                              UpdateProgress("  CD changed to W:")
                      ELSEIF strVol = "G:" THEN
                            objVolume.DriveLetter = "N:"
                              objVolume.Put_
                              UpdateProgress("  vCD changed to N:")     Â
                      END IF
           Next
     Â
          Â
      End Sub
     Â
      ' Set drive letters for DELL POWEREDGE 1955 BLADES   (NOTE: Blades do not have CD-ROM and DRAC as New Gen)
      Sub PEx955
           Set colVolumes = objWMIService.ExecQuery("S
           For Each objVolume in colVolumes
                 strVol = objVolume.DriveLetter
                      IF strVol = "D:" THEN
                            objVolume.DriveLetter = "M:"
                              objVolume.Put_     Â
                              UpdateProgress("  1955vFloppy changed to M:")
                      ELSEIF strVol = "E:" THEN
                            objVolume.DriveLetter = "V:"
                              objVolume.Put_
                              UpdateProgress("  Software changed to V:")     Â
                      ELSEIF strVol = "F:" THEN
                            objVolume.DriveLetter = "N:"
                              objVolume.Put_
                              UpdateProgress("  1955vCD changed to N:")     Â
                      END IF
           Next
     Â
          Â
      End Sub
' Set Server 2003 media source path
      UpdateProgress(prog & ".  " & "Updating W2k3 Source Path")
      prog = prog + 1
      If strModel = "VMware Virtual Platform" Then
           wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\W
           wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\W
           UpdateProgress("  W2k3 source path changed to C:")
      Else
           wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\W
           wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\W
           UpdateProgress("  W2k3 source path changed to V:")
      End If
' Set Windows Time and Video Configuration if VM Guest
      If strModel = "VMware Virtual Platform" Then
           UpdateProgress(prog & ".  " & "Configure VM Guest Time and Video")
           prog = prog + 1
           wshHandle.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM
           wshHandle.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM
     Â
           objreg.EnumKey HKLM, strKeyPath, arrSubKeys
                 For Each subKey in arrSubKeys
                      If subkey = "{23A77BF7-ED96-40EC-AF06-
                            subKey = Null
                      Else
                            vidkey = subkey      Â
                      End if
                 Next
           wshHandle.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM
           wshHandle.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM
      End If
' Delete unwanted Start menu and Desktop items
      UpdateProgress(prog & ".  " & "Processing Start Menu items")
      prog = prog + 1
      wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\A
      wshHandle.RegWrite "HKLM\SOFTWARE\Microsoft\A
      wshHandle.RegDelete("HKEY_
      wshHandle.RegDelete("HKEY_
      fsoHandle.DeleteFile "C:\Documents and Settings\All Users\start menu\Windows Catalog.lnk"
      fsoHandle.DeleteFile "C:\Documents and Settings\All Users\start menu\Windows Update.lnk"
      fsoHandle.DeleteFile "C:\Documents and Settings\All Users\Desktop\Security Configuration Wizard.lnk"     Â
      fsoHandle.DeleteFile "C:\Documents and Settings\Default User\Start Menu\Programs\Remote Assistance.lnk"
      fsoHandle.DeleteFile "C:\Documents and Settings\Administrator\Sta
     Â
' Delete Support User account
     Â
      UpdateProgress(prog & ".  " & "Delete Support user account")
      prog = prog + 1
     Â
      Set colAccounts = GetObject("WinNT://" & strComputer & "")     Â
      colAccounts.Delete "user", "SUPPORT_388945a0"
     Â
     Â
' Add standby Admin account     Â
      UpdateProgress(prog & ".  " & "Create standby local Admin user account")
      prog = prog + 1
      ' Create user
           Set colAccounts = GetObject("WinNT://" & strComputer & "")
           Set objUser = colAccounts.Create("user",
           objUser.SetPassword "Bx23G73XV0"
           objUser.SetInfo
      ' Set no password expiry
           Set objUser = GetObject("WinNT://" & strComputer & "/sysman,user")
           objUserFlags = &H10000
           objUser.Put "UserFlags", objUserFlags
           objUser.SetInfo
      ' Add user to Local Admins group     Â
           Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
           Set objUser = GetObject("WinNT://" & strCompName & "/sysman,user")
           objGroup.Add (objUser.ADsPath)
' Configure DNS search suffixes
      UpdateProgress(prog & ".  " & "Configure DNS search suffixes")
      prog = prog + 1
      wshHandle.RegWrite "HKLM\SYSTEM\CurrentContro
' Install Hotfixes
      Call Hotfixes
     Â
' Install Core Apps
      Call CoreApps
' Copy i386 folder
     Â
      scriptname = "AvisRunStartScript"
     Â
      Call Copyi386
' Copy Common Software to PowerEdge servers
      If strModel <> "VMware Virtual Platform" Then
           CopyMediaSource
      End If
     Â
' Set initial Local Security Policy
      UpdateProgress(prog & ".  " & "Configure temporary Local Security Policy")
      prog = prog + 1
     Â
      wshHandle.Run "cmd.exe /c secedit /configure /db secedit.sdb /cfg " & strScriptPath & "\preprep.inf", 0, True
' Configure scheduled Defrag task
      UpdateProgress(prog & ".  " & "Configure defrag scheduled task")
      prog = prog + 1
      Set objService = GetObject("winmgmts:\\" & strComputer & "")
      Set objNewJob = objService.Get("Win32_Sche
      objNewJob.Create "Defrag C:", "********030000.000000-000
' Defrag C:
      UpdateProgress(prog & ".  " & "Defragmenting C: Drive")     Â
      prog = prog + 1
      wshHandle.Run "C:\winnt\system32\defrag.
     Â
     Â
' End script and reboot
      UpdateProgress("Preparing to reboot")
     Â
      WScript.Sleep 3000
     Â
      CloseProgressWindow
     Â
      WScript.Sleep 6000
     Â
      wshHandle.Run "c:\winnt\system32\shutdow
     Â
]]>
</script>
</job>
</package>
ASKER
Netman66 said Are these scripts running after the HBA and LUN are configured?
**Scripts are running before HBA fiber cards are attached to SAN Switches..this a deployment process combining WinPE, Unattended Installs, Sysprep, and Ghost...wmi vb script is running pre- and post every phase above.
I'm trying to figure out what and when these scripts are used (for)?
**Windows Server 2003 R2 SP2 deployment farm for 150 Citrix Servers
Perhaps a short walkthrough of how your staging these servers would help figure out where the process fails.
**Server are new, shipped from DELL out of the box, no OS
Keep in mind, Blade servers are a whole different beast than normal servers and the Win32_Volume subset may not contain the same information without specifically adding the MIB info into WBEM.
**Where can I find info on the Win32_volume subset for my blades?
Thank you so much netman66
**Scripts are running before HBA fiber cards are attached to SAN Switches..this a deployment process combining WinPE, Unattended Installs, Sysprep, and Ghost...wmi vb script is running pre- and post every phase above.
I'm trying to figure out what and when these scripts are used (for)?
**Windows Server 2003 R2 SP2 deployment farm for 150 Citrix Servers
Perhaps a short walkthrough of how your staging these servers would help figure out where the process fails.
**Server are new, shipped from DELL out of the box, no OS
Keep in mind, Blade servers are a whole different beast than normal servers and the Win32_Volume subset may not contain the same information without specifically adding the MIB info into WBEM.
**Where can I find info on the Win32_volume subset for my blades?
Thank you so much netman66
Ok, let's look at this logically.
Blades depend on their enclosure for the following:
Power
Network
SAN fabric
iLO aggregation
So, keeping that in mind, the bay needs to be connected to the network and SAN so the blade has the proper access. Â Since the OS needs to be installed before you can connect to the SAN (since the LUN needs to be presented to a specific HBA) then anything that maps outside the local drives won't yet be available to your scripts.
I believe there should be a CD or two that comes with the blade itself that contains MIBs for any network management software to use. Â Their industry standard files. Â
I would stand one blade up and manually configure everything then query Win32_Volume to see what is available and even if your scripts are looking for the right info for these things. Â You can either use a script (since someone there knows how to write them quite well) or in System32\wbem there is a utility called wbemtest.exe that you can use to look into all WMI class info.
Blades depend on their enclosure for the following:
Power
Network
SAN fabric
iLO aggregation
So, keeping that in mind, the bay needs to be connected to the network and SAN so the blade has the proper access. Â Since the OS needs to be installed before you can connect to the SAN (since the LUN needs to be presented to a specific HBA) then anything that maps outside the local drives won't yet be available to your scripts.
I believe there should be a CD or two that comes with the blade itself that contains MIBs for any network management software to use. Â Their industry standard files. Â
I would stand one blade up and manually configure everything then query Win32_Volume to see what is available and even if your scripts are looking for the right info for these things. Â You can either use a script (since someone there knows how to write them quite well) or in System32\wbem there is a utility called wbemtest.exe that you can use to look into all WMI class info.
ASKER
NetMan6 - all is OK now with scripts. Thank you for you help.
I have one more related question:
Issue now is with the HBA QME2462 Â (2342M drivers) DELL drivers and boot time&..after adding updated drivers and general trouble-shooting I am getting a very long delay, possibly 30 minutes until server comes back up&.particular file which /sos boot.ini show as halting is: Â acpitabl.dat but not sure if this is a red herring or not.
The server just hangs on the Windows Logo screen or if I use boot.ini /sos /noguiboot switches...shows the acpitabl.dat file just hanging...something to do with Power Management maybe, but NOTE: Â this only happens after sysprep and ghosting. before all is OK and the server zips through the boot process...just after sysprep and Ghosting that problem occurs...almost as if there is an issue with what sysprep or ghost is doing to the drivers, etc... for the HBA card...
If I remove the HBA card, server boots OK. Â To fix this, I have to uninstall the HBA drivers from Device Manager and then boot twice and then re-install drivers...odd...any thoughts?
I have one more related question:
Issue now is with the HBA QME2462 Â (2342M drivers) DELL drivers and boot time&..after adding updated drivers and general trouble-shooting I am getting a very long delay, possibly 30 minutes until server comes back up&.particular file which /sos boot.ini show as halting is: Â acpitabl.dat but not sure if this is a red herring or not.
The server just hangs on the Windows Logo screen or if I use boot.ini /sos /noguiboot switches...shows the acpitabl.dat file just hanging...something to do with Power Management maybe, but NOTE: Â this only happens after sysprep and ghosting. before all is OK and the server zips through the boot process...just after sysprep and Ghosting that problem occurs...almost as if there is an issue with what sysprep or ghost is doing to the drivers, etc... for the HBA card...
If I remove the HBA card, server boots OK. Â To fix this, I have to uninstall the HBA drivers from Device Manager and then boot twice and then re-install drivers...odd...any thoughts?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Just did a re-unatted, re-syspep and re-ghost after putting through the updated drivers from here....plus hotfixes for HBA QLOGIC Fibre Cards.
http://support.qlogic.com/support/oem_product_detail.asp?p_id=988&oemid=65&oemname=Dell
 Seems the home dell site points to wrong device and that this new driver is key for my HBA cards...the dell site gives w2k only driver anyway....not the updated driver from 04/06/2007 yet....
By the way, not booting from SAN unfortunately, maybe next project.
Thanks NetMan66...you sure know alot man...Awesome to have you and others like you in this community to teach us newbiees.
http://support.qlogic.com/support/oem_product_detail.asp?p_id=988&oemid=65&oemname=Dell
 Seems the home dell site points to wrong device and that this new driver is key for my HBA cards...the dell site gives w2k only driver anyway....not the updated driver from 04/06/2007 yet....
By the way, not booting from SAN unfortunately, maybe next project.
Thanks NetMan66...you sure know alot man...Awesome to have you and others like you in this community to teach us newbiees.
There's a new driver as of June 6, 2007.
You did mention a hotfix too, as there is a storport driver issue that MS has fixed.
You did mention a hotfix too, as there is a storport driver issue that MS has fixed.
ASKER
Driver must be the right one...thanks NetMan66...
GUIRunOnce]
"cmd /c net use X: \\EAHAHMGT01.ah.avisrac.ne
"cmd /c  X:\W2k3\STANDARD_10300\CMP
As long as the Share is Authenticated Users - Full and the NTFS permissions are Authenticated Users - Read and Execute then it should work.