Posts Tagged SMS Installer
I was putting this information together for an architecture document. Thought I’d share it because this shows why I love SMS Installer!
- Usage: Installation “wrapper” to automate tasks such as initiating installation with parameters, reading/writing registry values, writing log files, if/then/else evaluations, dialog boxes, etc.
- Pros: Robust application with an easy to use GUI that is simple for others to learn. Scripting knowledge and/or experience is not required. The compiled executable cannot be changed except through the SMS Installer application.
- Cons: Various limitations on processes that can run.
VBScript / PowerShell
- Usage: Perform complex automation tasks
- Pros: Gives the ability to automate complex changes that cannot be accomplished using SMS Installer.
- Cons: Requires scripting knowledge and/or experience. Is highly sensitive to changes in the script, which can have a negative impact if code is not properly written.
This was an issue that I came across from our recent upgrade from SMS 2003 to SCCM 2007. While we were still using SMS, some systems had been cloned/p2v’d from a production system to a virtual then renamed. It wasn’t caught at the time, but it appears SMS may have been unable to automatically give the cloned SMS clients a new GUID. When we migrated to SCCM, these clients were fighting over which of them was the real and live system in SCCM, such that some client records would suddenly disapper from the console…then if they’re client was fixed, a different client record would disappear.
However, simply uninstalling/reinstalling the SCCM client was not resolving the issue. After some digging around, I found a couple of utilities to help rip out the SCCM client and force a new GUID to be assigned. I brought these utilities together and created a simple executable to coordinate the process. This was created with the old, but very reliable, SMS Installer, the code below is for that, but can easily be rebuilt as a vbscript.
If you have any questions about this process, feel free to leave me a comment and I can respond!
- On your computer, download and install the SMS 2003 Toolkit v2
- In the directory containing your SCCM client install, create a subdirectory (such as “SOURCE”)
- From the Toolkit directory, copy ccmdelcert.exe and tranguid.exe to the newly created subdirectory in previous step
- In the SCCM client install directory, create an executable or script that does the following in order
- Execute ccmdelcert.exe (wait for process termination)
- Delete the file %WINDIR%\SMSCFG.ini
- Execute ccmsetup.exe /uninstall (wait for process termination)
- Delete directory %WINDIR%\system32\ccm\
- Delete registry key HKLM\SOFTWARE\Microsoft\CCMSetup
- Delete registry key HKLM\SOFTWARE\Microsoft\SMS
- Execute ccmsetup.exe (wait for process termination)
Below is the ‘code’ for the SMS Installer executable that I built to facilitate this.
Document Type: IPF item: Global Version=6.0 Title English=Duplicate SCCM GUID Repair Flags=00000100 Languages=0 0 65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 LanguagesList=English Default Language=2 Copy Default=1 Japanese Font Size=9 Start Gradient=0 0 255 End Gradient=0 0 0 Windows Flags=00000100000000010010110000011000 Message Font=MS Sans Serif Font Size=8 Disk Filename=SETUP Patch Flags=0000000000000001 Patch Threshold=85 Patch Memory=4000 FTP Cluster Size=20 end item: Check Disk Space end item: Set Variable Variable=ROOT Value=C: end item: Get Environment Variable Variable=WINDIR Environment=WINDIR end item: Execute Program Pathname=%INST%\SOURCE\ccmdelcert.exe Flags=00000010 end item: Delete File Pathname=%WINDIR%\SMSCFG.ini end item: Execute Program Pathname=%INST%\CCMSETUP.exe Command Line=/uninstall Flags=00000010 end item: Insert Line into Text File Pathname=%WINDIR%\system32\ccm\temp.txt New Text=TEMP Line Number=0 Flags=00010000 end item: Delete File Pathname=%WINDIR%\system32\ccm\temp.txt Flags=00001100 end item: Insert Line into Text File Pathname=%WINDIR%\system32\ccmsetup\temp.txt New Text=TEMP Line Number=0 Flags=00010000 end item: Delete File Pathname=%WINDIR%\system32\ccmsetup\temp.txt Flags=00001100 end item: Edit Registry Total Keys=1 Key=SOFTWARE\Microsoft\CCMSetup Root=130 end item: Edit Registry Total Keys=1 Key=SOFTWARE\Microsoft\SMS Root=130 end item: Execute Program Pathname=%INST%\CCMSETUP.exe Flags=00000010 end