The following will show you how to setup a T5720 thin client to work with SCCM as well as using the captured data image. This process can be used with the T5730 series as well. Josh and I have worked on this for a few months now and we finally figured out the right combination of VBScripts and cleaning of the hard drive to get this all to work how we wanted for our corporate environment.
Visit Josh’s blog: http://joshuasmueller.wordpress.com/
NOTE: I do not support any of the scripts, but give a base of what I have implemented. Any changes are done at your own risk.
Some of these customizations can be changed based on your environment, I have made this post as a reminder for myself as to what I all did to get these thin clients running.
Comments, Questions, and suggestions are greatly appreciated.
Before Installing the SCCM Client
- Image device with HP’s base image
- Base image can be found at http://www.hp.com
- Support and Drivers area, search for t5720
- A flash drive is needed to install the image on the thin client.
- Log in as Administrator
- Delete the profile for user “User”.
- Configure the HP Auto Logon for the Administrator account.
- The base image logs in as User and we do not want that profile recreated.
- This will help with restarts later in this article.
- Disable the EWF, restart committing the changes.
- Uninstall everything in Add/Remove Programs
- Open Control Panel>System
- Advanced>Performance Settings, select “Adjust for best performance” and hit OK.
- Change the computer name to the model of the thin client, T5720.
- Change the workgroup to whatever your company uses.
- Restart
- Open Control Panel>HP DHCP Update Settings
- Uncheck “Automatically Update Settings from DHCP at Logon”
- Uncheck Infinite and set to 1 for DHCP Server Retries.
- Change to Classic Start Menu
- Under Customize, uncheck “Use Personalized Menus”
- Click Remove
- Select Start Menu>Programs>Accessories>Paint and click Remove
- Select Start Menu>Programs>Accessories>System Tools>Internet Explorer (No Add-ons) and click Remove
- Open Control Panel>Display
- Change the Desktop theme to Windows Classic
- Change the wallpaper to blank and black background
- Set the screensaver to blank.
- Delete “HP System Information” from the Start Menu.
- Delete “Remote Desktop” from the Start Menu.
- Setup the HP Ramdisk Manager
- The Ramdisk manager in Control Panel only allows for a maximum of 64Mb, you can increase it by changing the following registry key.
HKEY_LOCAL_MACHINE\ControlSet001\Services\Ramdrive\Parameter.
Set to decimal value of 120586240
Hard Drive Cleanup
- Browse to C:\Documents and Settings\Administrator
- Delete everything from the Favorites folder.
- Delete HP Remote folder
- Delete everything in Local Settings\Temp
- Delete everything in Local Settings\Temporary Internet Files>Content.IE5
- Delete everything in Local Settings\Application Data\Microsoft
- Delete VMWare folder in Local Settings\Application Data
- Delete everything in My Documents folder
- Browse to C:\Documents and Settings\Network Service
- Delete everything in Local Settings\Temp
- Delete everything in Local Settings\Temporary Internet Files>Content.IE5
- Delete everything in Local Settings\Application Data\Microsoft
- Browse to C:\Documents and Settings\Network Service
- Delete everything in Local Settings\Temp
- Delete everything in Local Settings\Temporary Internet Files>Content.IE5
- Delete everything in Local Settings\Application Data\Microsoft
- Browse to C:\Documents and Settings\All Users
- Delete everything in Application Data\Microsoft
- Delete VMware folder in Application Data
- Delete shortcuts from \Desktop
- Delete everything in \Documents
- Delete Start Menu\Programs\Hewlett-Packard
- Delete Calculator from \Start Menu\Programs\Accessories
- Browse to C:\Program Files
- Delete Folders
- Uninstall Information
- VMWare
- Windows Media Connect
- Windows Media Player
- Hewlett-Packard
- Delete Folders
- Browse to C:\Windows
- Delete:
- Everything in \Cursors
- Everything in \Debug
- Everything in \CSC
- Everything in \Installer
- \FBA
- Bullet.gif and Exclam.gif from \Web
- All .ttf files in \Fonts
- Everything in \i386
- Folder \Media
- HP_1024x768.bmp
- \System32
- Delete
- \USMT
- Oemlogo.bmp
- Ssstars.scr
- Everything in \spool\drivers
- Delete
- Delete:
- In the properties of drive C: check “Compress drives to save disk space” and hit OK
- Delete the Luna theme from C:\Windows Resources
Install the SCCM Client
The following will install the SCCM client on the thin client. It will also put the ccm\cache folder on the Z: drive.
\\<SCCMSERVER>\<CCMSETUPSHARE>\ccmsetup.exe /mp:<SCCMSERVER.FQDN> SMSSITECODE=ABC FSP=<SCCMSERVER.FQDN> SLP=<SCCMSERVER.FQDN> SMSCACHEDIR=Z:\Temp
Share onto the thin client’s hard drive and watch the ccmsetup.log found in \\t5720\c$\Windows\System32\ccmsetup to see when the SCCM client is finished installing.
As it installs the disk space will get critically low. To prevent the client from failing the installation browse to C:\Windows\System32\ccmsetup and try to delete each file in that folder. Some will state that access is denied, this is because the file is still in use. The files that are able to be deleted should give the client enough space to finish the installation.
If the client fails the installation, delete the ccmsetup folder and try the process again.
Post SCCM Client Installation
- Create a folder on your file server called Copy2Client to hold all of the post imaging configuration files.
- Create a folder called EWFInstall inside Copy2Client.
EWF Install
The following instructions were taken from Wolfgang Unger’s blog. All credit for the EWF Installation section goes to him. http://wunger.wordpress.com/2009/09/15/enhanced-write-filter-%E2%80%93-installation-batch-file/
- Download the Windows Server 2003 Resource Kit: http://www.microsoft.com/downloads/en/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
- Copy Regini.exe from the kit to the EWFInstall folder
- Start Target Designer
- Add the Enhanced Write Filter Component
- Add EWF Manager Console application component
- Add EWF NTLDR component
- Add Misc. Command Line Tools component
- Build the image to any folder
- Copy the following files to the EWFInstall folder.
- C:\Windows\infewf.ini
- C:\Windows\system32\ewfdll.dll
- C:\Windows\system32\ewfinit.dll
- C:\Windows\system32\ewfmgr.exe
- C:\Windows\system32\driversewf.sys
- C:\ntldr
- C:\Windows\system32\reg.exe
- Create a new text file called EWF_Reg_Config.txt with the following.
registrymachine
SYSTEM
CurrentControlSet
Enum
Root [1 5 7 14 17]
- Create a file name ewf.reg in the EWFInstall folder with the following.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESYSTEM]
[HKEY_LOCAL_MACHINESYSTEMControlSet001]
[HKEY_LOCAL_MACHINESYSTEMControlSet001Control]
[HKEY_LOCAL_MACHINESYSTEMControlSet001ControlClass]
[HKEY_LOCAL_MACHINESYSTEMControlSet001ControlClass{71A27CDD-812A-11D0-BEC7-08002BE2092F}]
“UpperFilters”=hex(7):45,00,57,00,46,00,00,00,00,00
[HKEY_LOCAL_MACHINESYSTEMControlSet001Services]
[HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWF]
“ErrorControl”=dword:00000001
“Group”=”System Bus Extender”
“Start”=dword:00000000
“Type”=dword:00000001
[HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWFFBA]
“OVSize”=dword:00000000
“OVLevel”=dword:00000001
“PVConfigs”=dword:00000001
“EwfEnable”=hex(7):31,00,00,00,00,00
“EnableLazyWrite”=hex(7):30,00,00,00,00,00
“PVDisk”=hex(7):30,00,00,00,00,00
“PVPart”=hex(7):31,00,00,00,00,00
“PVOptimize”=hex(7):30,00,00,00,00,00
“PVType”=hex(7):31,00,00,00,00,00
[HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWFParameters]
[HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWFParametersProtected]
[HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesEWFParametersProtectedVolume0]
“Type”=dword:00000001
“Enabled”=dword:00000000
- Create a file called ewfinstall.bat in the EWFInstall folder with the following information
@echo off
echo ————————-
echo EWF Installer
echo created by Wolfgang Unger
echo ————————-if “%1″==”” GOTO ARG_ERROR
if “%2″==”” GOTO ARG_ERRORecho Copying EWF files…
copy c:\thinsetup\ewfdll.dll %1\Windows\system32
copy c:\thinsetup\ewfinit.dll %1\Windows\system32
copy c:\thinsetup\ewfmgr.exe %1\Windows\system32
copy c:\thinsetup\ewf.sys %1\Windows\system32\drivers
copy c:\thinsetup\ewf.inf %1\Windows\inf
copy c:\thinsetup\ntldr “%1”echo Changing permissions in registry…
regini.exe EWF_Reg_Config.txtecho Importing registry data…
reg import ewf.reg
reg add “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesEWFParametersProtectedVolume0” /v ArcName /t REG_SZ /d %2 /fecho Done.
GOTO END:ARG_ERROR
echo usage ewfinstall.bat Drive ARC-Path
echo ewfinstall.bat C: multi(0)disk(0)rdisk(0)partition(1):END
Copy2Client Folder
- Create 1_FixEWF.vbs in the folder with the following
Dim objShell, objFSO
Dim strDirectory, strFileName, objTextFileConst ForReading = 1, ForWriting = 2, ForAppending = 8
Const HKEY_LOCAL_MACHINE = &H80000002Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = createObject(“wscript.shell”)‘**********************************************
‘Create logs folder if it does not exist
‘**********************************************
strDirectory = “c:\Logs”
strFileName = “c:\Logs\ThinClientSetup.log”If objFSO.FolderExists (strDirectory) Then
‘WScript.Echo “No need to create ” & strDirectory
Else
Set objFolder = objFSO.CreateFolder(strDirectory)
‘WScript.Echo “Created ” & strDirectory
End IfSet objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.WriteLine
objTextFile.WriteLine(“****************************************************************”)
objTextFile.Write Now
objTextFile.WriteLine (” – 1_FixEWF.vbs script is running”)
objTextFile.Close
WScript.Sleep(7000)‘*****************************
‘Run the EWF Installation batch file
‘*****************************
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Running EWF Fix”)
objTextFile.Close
objShell.run(“C:\ThinSetup\ewfinstall\ewfinstall.bat C: multi(0)disk(0)rdisk(0)partition(1)”), 1, TRUE
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Setting 2_ReallyFixEWF.vbs to run at next startup”)
objTextFile.CloseobjShell.RegWrite “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\ReallyFixEWF”, “C:\ThinSetup\2_ReallyFixEWF.vbs”, “REG_SZ”
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Restarting computer”)
objTextFile.Close
WScript.Sleep(2000)
objShell.Run(“shutdown -r -f -t 1”), 1, TRUE
- Create 2_ReallyFixEWF.vbs in the folder with the following
Dim objShell, objFSO
Dim strDirectory, strFileName, objTextFileConst HKEY_LOCAL_MACHINE = &H80000002
Const ForReading = 1, ForWriting = 2, ForAppending = 8Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = createObject(“wscript.shell”)‘**********************************************
‘Create logs folder if it does not exist
‘**********************************************
strDirectory = “c:\Logs”
strFileName = “c:\Logs\ThinClientSetup.log”
If objFSO.FolderExists (strDirectory) Then
‘WScript.Echo “No need to create ” & strDirectory
Else
Set objFolder = objFSO.CreateFolder(strDirectory)
‘WScript.Echo “Created ” & strDirectory
End IfSet objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – 2_ReallyFixEWF.vbs script is running”)
objTextFile.Close‘***********************
‘Create the EWF volume
‘***********************
WScript.Sleep(5000)
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Running EWF Fix”)
objTextFile.Close
objShell.run(“rundll32 ewfdll.dll,ConfigureEwf”), 1, TRUE
WScript.Sleep(5000)
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Setting 3_DisableEWF.vbs to run at next startup”)
objTextFile.Close
objShell.RegWrite “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\DisableEWF”, “C:\ThinSetup\3_DisableEWF.VBS”, “REG_SZ”
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Restarting computer”)
objTextFile.Close
WScript.Sleep(2000)
objShell.Run(“shutdown -r -f -t 1”), 1, TRUE
- Create 3_DisableEWF.vbs in the folder with the following
Dim objShell, objFSO
Dim strDirectory, strFileName, objTextFileConst ForReading = 1, ForWriting = 2, ForAppending = 8
Const HKEY_LOCAL_MACHINE = &H80000002Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = createObject(“wscript.shell”)‘**********************************************
‘Create logs folder if it does not exist
‘**********************************************
strDirectory = “c:\Logs”
strFileName = “c:\Logs\ThinClientSetup.log”
If objFSO.FolderExists (strDirectory) Then
‘WScript.Echo “No need to create ” & strDirectory
Else
Set objFolder = objFSO.CreateFolder(strDirectory)
‘WScript.Echo “Created ” & strDirectory
End If‘**************************
‘Disable the EWF
‘**************************
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – 3_DisableEWF.vbs script is running”)
objTextFile.Write Now
objTextFile.WriteLine (” – Setting EWF to Disabled on Next reboot”)
objTextFile.CloseobjShell.run(“ewfmgr C: -disable”), 1, TRUE
WScript.Sleep(5000)Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Setting 4_NewSid.vbs to run at next startup”)
objTextFile.CloseobjShell.RegWrite “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\NewSid”, “C:\ThinSetup\4_NewSid.VBS”, “REG_SZ”
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Restarting computer”)
objTextFile.CloseWScript.Sleep(2000)
objShell.Run(“shutdown -r -f -t 1”), 1, TRUE
- Create 4_NewSid.vbs in the folder with the following
- This will use WMI to get the serial number and apply it to newsid.exe to rename the computer to the serial number.
Dim objFSO, objShell, objWMIService, strClientName
Dim strDirectory, strFileName, objTextFileConst ForReading = 1, ForWriting = 2, ForAppending = 8
Const HKEY_LOCAL_MACHINE = &H80000002Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = createObject(“wscript.shell”)
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\.\root\cimv2”)‘**********************************************
‘Create logs folder if it does not exist
‘**********************************************
strDirectory = “c:\Logs”
strFileName = “c:\Logs\ThinClientSetup.log”
If objFSO.FolderExists (strDirectory) Then
‘WScript.Echo “No need to create ” & strDirectory
Else
Set objFolder = objFSO.CreateFolder(strDirectory)
‘WScript.Echo “Created ” & strDirectory
End IfSet objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.WriteLine
objTextFile.Write Now
objTextFile.WriteLine (” – 4_NewSid.vbs script is running”)
objTextFile.Close‘*****************
‘Get Serial Number
‘*****************
Dim objWMI : Set objWMI = GetObject(“winmgmts:”)
Dim colSettingsComp : Set colSettings = objWMI.ExecQuery(“Select * from Win32_ComputerSystem”)
Dim colSettingsBios : Set colSettingsBios = objWMI.ExecQuery(“Select * from Win32_BIOS”)
Dim objComputer, strModel, strSerialFor Each objComputer in colSettings
strModel = objComputer.Model
Next
For Each objComputer in colSettingsBios
strSerial = objComputer.SerialNumber
Next
strClientName = “QBE-” & strserial & “”Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.WriteLine
objTextFile.Write Now
objTextFile.Write (” – Computer Name is “)
objTextFile.WriteLine strClientName
objTextFile.Close‘**********************
‘Set the computer name
‘*********************
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.WriteLine
objTextFile.Write Now
objTextFile.WriteLine (” – Setting Computer Name”)
objTextFile.CloseobjShell.run(“C:\ThinSetup\newsid.exe /a /n ” & strClientName), 1, TRUE
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.WriteLine
objTextFile.Write Now
objTextFile.WriteLine (” – Setting 5_TimeZone.vbs to run at next startup”)
objTextFile.closeobjShell.RegWrite “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\TimeZone”, “C:\ThinSetup\5_TimeZone.VBS”, “REG_SZ”
WScript.Sleep(2000)
objShell.Run(“shutdown -r -f -t 1”), 1, TRUE
- Create 5_TimeZone.vbs in the folder with the following
- By using a WMI query to find the default gateway of the NIC we can set the Time Zone for the location of the thin client as well as setup the citrix .ica file shortcuts.
- Each location needs an array setup with all default gateways for that location.
- If only one citrix farm is used then these arrays can be setup by Time Zone
option explicit
Dim isFirstCitrix, isSecondCitrix, isCentral, isEastern, isPacific, isMountain
Dim location1DG, location2DG, location3DG, location4DG
Dim objShell, strComputer, strCurrentDir, strDirectory, TmpFile, strFileName, objTextFile, objFSO, objFolder
Dim objWMIService, colComputer, colItems, counter
Dim DefaultGateway, oDGs, oDG
Dim ThisLine, IP, strIPAddress
Dim strMid, strShortIP, objItem
Dim strUICDesktop, strCopyDesk, strCopyStart, strGCDelete1, strGCDelete2Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = CreateObject(“WScript.Shell”)
Set objWMIService = GetObject(“winmgmts:” & “{impersonationLevel=impersonate}!” & strComputer & “\root\cimv2”)
Set colComputer = objWMIService.ExecQuery (“Select * from Win32_ComputerSystem”)
Set colItems = objWMIService.ExecQuery (“Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True”)
Set oDGs = objWMIService.ExecQuery (“Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE”)strComputer = “.”
strCurrentDir = Replace(WScript.ScriptFullName, WScript.ScriptName, “”)
strFirstDesktop = “C:\ThinSetup\First-Desktop.ica”
strCopyDesk = “c:\Documents and Settings\User\Desktop\”
strCopyStart = “c:\Documents and Settings\User\Start Menu\Programs\Startup\”
strSecondDelete1 = “C:\Documents and Settings\User\Desktop\Second-Desktop.ica”
strSecondDelete2 = “C:\Documents and Settings\User\Start Menu\Programs\Startup\Second-Desktop.ica”
isCentral = 0
isPacific = 0
isEastern = 0
isMountain = 0
isFirstCitrix = 0
isSecondCitrix = 0
DefaultGateway = Empty
strDirectory = “c:\Logs”
strFileName = “c:\Logs\ThinClientSetup.log”‘**********************************************
‘Create logs folder if it does not exist
‘**********************************************
If objFSO.FolderExists (strDirectory) Then
‘WScript.Echo “No need to create ” & strDirectory
Else
Set objFolder = objFSO.CreateFolder(strDirectory)
‘WScript.Echo “Created ” & strDirectory
End If
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – 5_TimeZone.vbs script is running”)
objTextFile.Close‘**********************************
‘Location1 Default Gateways
‘**********************************
location1DG = Array(“1.1.1.1”)
‘**********************************
‘Location2 Default Gateways
‘**********************************
location2DG = Array(“2.2.2.2”)
‘**********************************
‘location3 Default Gateways
‘**********************************
location3DG = Array(“3.3.3.3”)
‘***********************************
‘location4 Default Gateways
‘***********************************
location4DG = Array(“4.4.4.4”)
‘**********************************‘*******************************
‘Determine the Default Gateway
‘******************************
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Determining the Default Gateway”)
objTextFile.CloseFor Each oDG in oDGs
If Not IsNull(oDG.DefaultIPGateway) And Not oDG.defaultIPGateway(0) = “0.0.0.0” Then
DefaultGateway = oDG.DefaultIPGateway(0)
Exit For
End If
NextSet objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Default Gateway is ” & DefaultGateway)
objTextFile.Close‘************************
‘Figure out the location
‘************************
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Determining the office location of the thin client”)
objTextFile.CloseFor counter = 0 to UBound(location1DG)
If (DefaultGateway = location1DG(counter)) Then
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Location is location1″)
objTextFile.Write Now
objTextFile.WriteLine (” – Time zone is Central”)
objTextFile.Write Now
objTextFile.WriteLine (” – Client uses First Citrix”)
objTextFile.Close
isCentral = 1
isFirstCitrix = 1
exit for
End if
next
For counter = 0 to UBound(location2DG)
If (DefaultGateway = location2DG(counter)) Then
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Location is location2″)
objTextFile.Write Now
objTextFile.WriteLine (” – Time zone is Eastern”)
objTextFile.Write Now
objTextFile.WriteLine (” – Client uses First Citrix”)
objTextFile.Close
isEastern = 1
isFirstCitrix = 1
exit for
End if
next
For counter = 0 to UBound(location3DG)
If (DefaultGateway = location3DG(counter)) Then
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Location is location3″)
objTextFile.Write Now
objTextFile.WriteLine (” – Time zone is Mountain”)
objTextFile.Write Now
objTextFile.WriteLine (” – Client uses Second Citrix”)
objTextFile.Close
isMountain = 1
isSecondCitrix = 1
exit for
End if
next
For counter = 0 to UBound(location4DG)
If (DefaultGateway = location4DG(counter)) Then
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Location is location4″)
objTextFile.Write Now
objTextFile.WriteLine (” – Time zone is Eacific”)
objTextFile.Write Now
objTextFile.WriteLine (” – Client uses Second Citrix”)
objTextFile.Close
isPacific = 1
isSecondCitrix
exit for
End if
next‘***********************************
‘Configure the appropriate time zone
‘***********************************
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Applying the Time Zone”)
objTextFile.Close
If (isCentral = 1) Then
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Client already configured for the Central Time Zone”)
objTextFile.Close
End if
If (isEastern = 1) Then
objShell.Run(“REGEDIT /S C:\ThinSetup\Eastern.reg”), 1, TRUE
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Applying the Eastern Time Zone”)
objTextFile.Close
End if
If (isPacific = 1) Then
objShell.Run(“REGEDIT /S C:\ThinSetup\Pacific.reg”), 1, TRUE
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Applying the Pacific Time Zone”)
objTextFile.Close
End if
If (isMountain = 1) Then
objShell.Run(“REGEDIT /S C:\ThinSetup\Mountain.reg”), 1, TRUE
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Applying the Mountain Time Zone”)
objTextFile.Close
End if‘*******************************
‘Applying the Citrix ICA File
‘*******************************
If (isSecondCitrix = 1) Then
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Client already configured for Second Citrix”)
objTextFile.Close
End if
If (isFirstCitrix = 1) Then
objFSO.CopyFile strFirstDesktop,strCopyDesk,TRUE
objFSO.CopyFile strFirstDesktop,strCopyStart,TRUE
objFSO.DeleteFile strSecondDelete1
objFSO.DeleteFile strSecondDelete2
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Copying UIC-Desktop.ica to the user Desktop and user Startup”)
objTextFile.Close
End if‘********************
‘Run 6_CCM_Client.vbs
‘********************
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Running 6_Citrix.vbs”)
objTextFile.Close
objShell.Run(“C:\ThinSetup\6_Citrix.vbs”), 1, FALSE
- Create 6_Citrix.vbs in the folder with the following
- We use the Web Online Plugin as all we need is to connect to the Citrix farm with an .ica file.
Dim objShell, objFSO
Dim strDirectory, strFileName, objTextFileConst ForReading = 1, ForWriting = 2, ForAppending = 8
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = createObject(“wscript.shell”)‘**********************************************
‘Create logs folder if it does not exist
‘**********************************************
strDirectory = “c:\Logs”
strFileName = “c:\Logs\ThinClientSetup.log”
If objFSO.FolderExists (strDirectory) Then
‘WScript.Echo “No need to create ” & strDirectory
Else
Set objFolder = objFSO.CreateFolder(strDirectory)
‘WScript.Echo “Created ” & strDirectory
End If
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – 6_Citrix.vbs script is running”)
objTextFile.Close
WScript.Sleep(7000)‘*************************
‘Install the Citrix Client
‘*************************
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Installing Citrix”)
objTextFile.CloseobjShell.Run(“c:\ThinSetup\XenAppWeb.msi /qb! “), 1, TRUE
WScript.Sleep(5000)Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Transferring scripting to 7_CCM_Client.vbs”)
objTextFile.CloseobjShell.Run(“C:\ThinSetup\7_CCM_Client.vbs”), 1, FALSE
- Create 7_CCM_Client.vbs in the folder with the following
Dim objFSO, objShell, SMSAGENTHOST
Dim strDirectory, strFileName, objTextFileSMSAGENTHOST = chr (34) & “SMS Agent Host” & chr (34)
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const HKEY_LOCAL_MACHINE = &H80000002Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = createObject(“wscript.shell”)‘**********************************************
‘Create logs folder if it does not exist
‘**********************************************
strDirectory = “c:\Logs”
strFileName = “c:\Logs\ThinClientSetup.log”If objFSO.FolderExists (strDirectory) Then
‘WScript.Echo “No need to create ” & strDirectory
Else
Set objFolder = objFSO.CreateFolder(strDirectory)
‘WScript.Echo “Created ” & strDirectory
End If‘**********************************
‘Reconfigure the SCCM Client
‘**********************************Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – 7_CCM_Client.vbs script is running”)
objTextFile.Close
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – configuring the SCCM Client”)
objTextFile.CloseObjFSO.DeleteFile “c:\Windows\SMSCFG.ini”
WScript.Sleep(2000)
objShell.Run(“c:\ThinSetup\CCMDELCERT.EXE”), 1, TRUE
WScript.Sleep(5000)
objShell.Run(“NET STOP ” & SMSAGENTHOST), 1, TRUE
WScript.Sleep(30000)
objShell.Run(“NET START ” & SMSAGENTHOST), 1, TRUE
WScript.Sleep(30000)
objShell.Run(“c:\ThinSetup\tranguid.exe /X C:\Windows\SMSCFG.INI”), 1, TRUE
WScript.Sleep(20000)Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Importing registry settings for QBEUSER logon”)
objTextFile.CloseobjShell.Run(“regedit.exe /s C:\ThinSetup\AutoLogon.reg “), 1, TRUE
WScript.Sleep(2000)Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write NowobjTextFile.WriteLine (” – Enabling the EWF”)
objTextFile.CloseobjShell.run(“ewfmgr C: -enable”), 1, TRUE
Set objTextFile = objFSO.OpenTextFile (strFileName, ForAppending, True)
objTextFile.Write Now
objTextFile.WriteLine (” – Restarting computer”)
objTextFile.Write Now
objTextFile.WriteLine(” – Scripts finished”)
objTextFile.WriteLine(“****************************************************************”)
objTextFile.CloseWScript.Sleep(5000)
objShell.Run(“shutdown -r -f -t 1”), 1, TRUE
- Create Autologon.reg in the folder with the following
- Change DefaultPassword, AutoLogonUser, DefaultUserName,AutoLogonPassword, and Alt DefaultUserName to match your environment.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
“DefaultPassword”=”USER”
“AutoLogonUser”=”USER”
“DefaultUserName”=”USER”
“AutoLogonPassword”=”USER”
“DefaultDomainName”=””
“AltDefaultDomainName”=””
“AltDefaultUserName”=”USER”
- Copy ccmdelcert.exe from the SMS 2003 Toolkit to the folder.
- Create Central.reg in the folder with the following
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
“StandardName”=”Central Standard Time”
“Bias”=dword:00000168
“StandardStart”=hex:00,00,0b,00,01,00,02,00,00,00,00,00,00,00,00,00
“StandardBias”=dword:00000000
“DaylightBias”=dword:ffffffc4
“DaylightName”=”Central Daylight Time”
“ActiveTimeBias”=dword:0000012c
“DaylightStart”=hex:00,00,03,00,02,00,02,00,00,00,00,00,00,00,00,00
- Create Eastern.reg in the folder with the following
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
“StandardStart”=hex:00,00,0b,00,01,00,02,00,00,00,00,00,00,00,00,00
“StandardBias”=dword:00000000
“StandardName”=”Eastern Standard Time”
“DaylightBias”=dword:ffffffc4
“DaylightName”=”Eastern Daylight Time”
“Bias”=dword:0000012c
“ActiveTimeBias”=dword:000000f0
“DaylightStart”=hex:00,00,03,00,02,00,02,00,00,00,00,00,00,00,00,00
- Create FixEWF.vbs in the folder with the following
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
“FixEWF”=”C:\\ThinSetup\\1_FixEWF.vbs”
- Copy the .ica files needed to access the citrix farms to the folder
- Create Mountain.reg in the folder with the following
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
“StandardStart”=hex:00,00,0b,00,01,00,02,00,00,00,00,00,00,00,00,00
“StandardBias”=dword:00000000
“StandardName”=”Mountain Standard Time”
“DaylightBias”=dword:ffffffc4
“DaylightName”=”Mountain Daylight Time”
“Bias”=dword:000001a4
“ActiveTimeBias”=dword:00000168
“DaylightStart”=hex:00,00,03,00,02,00,02,00,00,00,00,00,00,00,00,00
- Download newsid.exe to the folder from http://www.softpedia.com/dyn-postdownload.php?p=41001&t=4&i=1.
- Note: Microsoft no longer supports NewSID or anything that was created using NewSID. http://technet.microsoft.com/en-us/sysinternals/bb897418.aspx
Create Pacific.reg in the folder with the following
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
“StandardStart”=hex:00,00,0b,00,01,00,02,00,00,00,00,00,00,00,00,00
“StandardBias”=dword:00000000
“StandardName”=”Pacific Standard Time”
“DaylightBias”=dword:ffffffc4
“DaylightName”=”Pacific Daylight Time”
“Bias”=dword:000001e0
“ActiveTimeBias”=dword:000001a4
“DaylightStart”=hex:00,00,03,00,02,00,02,00,00,00,00,00,00,00,00,00
- Copy transguid.exe from the SMS 2003 Toolkit to the folder
Preparing to Capture Image
- Copy everything from Copy2Client to the thin client, C:\ThinSetup
- Before capturing the image all of the scripts need to be run so they are working correctly
- Double-click C:\ThinSetup\FixEWF.reg and then restart the computer.
- Uninstall the Citrix application
- Rename the device to the model number
- Set the Auto Logon to the Administrator
- Double-click C:\ThinSetup\FixEWF.reg
#1 by Cheap Smartphone - Motorola H730 Bluetooth Headset on 09/13/2013 - 6:41 PM
Right here is the right site for everyone who really wants to understand
this topic. You understand so much its almost hard to
argue with you (not that I actually will need to…HaHa).
You certainly put a new spin on a subject which has been written about for a long time.
Wonderful stuff, just great!