/build/static/layout/Breadcrumb_cap_w.png

Upgrade to SCCM Admin Console

I am trying to upgrade our sms admin consoles to sccm admin consoles. After researching, it looks like I need use the "setup /script \\server\share\setup.ini" command to upgrade the console and connect to my new server. I've tried this and it is not working for me. My guess is I'm doing something wrong here but not sure what it is. In my setup.ini file here is what I have.

[Identification]
Action=InstallAdminUI
[Options]
SMSInstallDir=C:\SMSADMIN
ParentSiteServer=3LetterSiteCode
SDKServer=ServerName

This should work correct?

0 Comments   [ + ] Show comments

Answers (5)

Posted by: Jsaylor 14 years ago
Second Degree Blue Belt
0
You aren't doing anything wrong, the upgrade from SMS 2003 to the SCCM console is a fickle thing. I cobbled together an installer for it (it's a bit on the ugly side) but the gist of it is that SMS2003 consoles do not uninstall properly, and, since SCCM and SMS2003 share the same registry keys, you have to go in and wipe the keys before an installation of SCCM can take place. There are also a boatload of prereqs, which this script will take care of, but you need to grab the KB's yourself to make it work. You'll have to look through and either change the file locations in the script, or put the prereqs and expected files in the locations already described.

'==============================================================================
'Removes SMS 2003 console, Installs SCCM prereqs, and Installs the SCCM console
'By: Joe Saylor
'10/28/09
'==============================================================================

on error resume next

'==============================================================================
'Set script constants
'==============================================================================

const HKLM = &H80000002
const QUERY = &H0001
strcomputer = "."

'==============================================================================
'set script objects
'==============================================================================

Set WSHShell = wscript.createobject("wscript.Shell")
Set objfso = wscript.createobject("scripting.filesystemobject")
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strScriptPath = objfso.GetAbsolutePathName("")
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

'==============================================================================
'Disable security warning on executable
'==============================================================================

Set objEnv = WSHShell.Environment("PROCESS")
objEnv("SEE_MASK_NOZONECHECKS") = 1

'==============================================================================
'evaluate existence of prereqs via the registry
'==============================================================================

objreg.getstringvalue HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\KB907265","UninstallString",strMMC
objreg.getstringvalue HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\KB913538","UninstallString",strWMI
objreg.getstringvalue HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\KB936059","UninstallString",strWRM
objreg.getstringvalue HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\SMS Admin UI","UninstallString",strSMSpath

'==============================================================================
'Check for existence of an SMS or SCCM console, quit if SCCM found, uninstall if SMS found
'==============================================================================
if strSMSpath <> "" Then

if objfso.fileexists(strSMSpath) then

If objfso.getfileversion(strSMSpath) > "4.0.6221.0000" Then
wscript.quit
ElseIf objfso.getfileversion(strSMSpath) > "2.50.4253.2000" Then
wshshell.run strSMSpath & " /deinstall /nouserinput /hidden",1,true
End If
End If
Else
End If

'==============================================================================
'Check for and install MMC3
'==============================================================================

if objfso.fileexists(strscriptpath & "\prereqs\MMC3\WindowsXP-KB907265-x86-ENU.exe") Then

If not instr(1,strMMC,"spuninst.exe",1) Then

WSHshell.run chr(34) & strscriptpath & "\prereqs\MMC3\WindowsXP-KB907265-x86-ENU.exe" & chr(34) & " /quiet /norestart",1,true

End If

Else

wscript.quit(1)

End If


'==============================================================================
'check for and install a WMI update
'==============================================================================

If objfso.fileexists(strscriptpath & "\prereqs\updateWMI\WindowsXP-KB913538-x86-ENU.exe") Then

if not instr(1,strWMI,"spuninst.exe",1) The
WSHshell.run chr(34) & strscriptpath & "\prereqs\updateWMI\WindowsXP-KB913538-x86-ENU.exe" & chr(34) & " /quiet /norestart",1,true

End If

Else

Wscript.quit(1)

End If

'==============================================================================
'Check for and install Windows Remote Management update
'==============================================================================


If objfso.fileexists(strscriptpath & "\prereqs\WinRM\WindowsXP-KB936059-x86-ENU.exe") Then

if not instr(1,strwrm,"spuninst.exe",1) Then
WSHshell.run chr(34) & strscriptpath & "\prereqs\WinRM\WindowsXP-KB936059-x86-ENU.exe" & chr(34) & " /quiet /norestart",1,true

End If

Else

wscript.quit(1)

End If


'==============================================================================
'Check for and install SCCM console
'==============================================================================


If objfso.fileexists(strScriptPath & "\bin\i386\setup.exe") and objfso.fileexists(strscriptpath & "\bin\i386\setup.ini") then

If not objfso.fileexists("c:\program files\SCCM admin console\install.map") and not objfso.fileexists("c:\program files\SCCM admin console\bin\i386\setup.exe") Then

'==============================================================================
'Remove sensitive registry keys first, if they exist
'==============================================================================

Deletekeys HKLM, "software\microsoft\sms"
objreg.DeleteKey HKLM,"software\microsoft\sms"

End If

Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process Where Name ='mmc.exe'")

'==============================================================================
'end existing MMC instances
'==============================================================================

For Each objProcess in colProcess
objProcess.Terminate()
Next

'==============================================================================
'Install console
'==============================================================================

wshshell.run chr(34) & strscriptpath & "\bin\i386\setup.exe" & chr(34) & " /script " & chr(34) & strscriptpath & "\bin\i386\setup.ini" & chr(34) & " /nouserinput",1,True

Else

End If


Sub Deletekeys(HKLM, strKeyPath)

objReg.EnumKey HKLM, strKeyPath, arrSubkeys

If IsArray(arrSubkeys) Then
For Each strSubkey In arrSubkeys
Deletekeys HKLM, strKeyPath & "\" & strSubkey
Next
End If

objReg.DeleteKey HKLM, strKeyPath

End Sub

'==============================================================================
're-enable security warning for exe's
'==============================================================================

ObjEnv.Remove("SEE_MASK_NOZONECHECKS")
Posted by: pachou 14 years ago
Senior Yellow Belt
0
Great! Thanks for the code! I'll try this out and let you know how it works. I've already downloaded the prerequisite's and will push those out first. The console upgrade will be done on the same day we upgrade the clients. It would be nice if MS documented that the sms console doesn't uninstall properly to save us techs some headaches. Also I thought there was another way to select a custom console for lets say the helpdesk where they only get the collections and nothing else. I can launch mmc, add the snap in, select what I want them to see, save it as adminconsole.msc, and then copy it over their machine replacing the original adminconsole.msc. But this changes the icon and also allow them to add more snap in's. Is there another way of doing this?
Posted by: Jsaylor 14 years ago
Second Degree Blue Belt
0
Make sure to comment out or remove the prereq installer sections, the script will exit if the files are not found.
Posted by: pachou 14 years ago
Senior Yellow Belt
0
Great that worked. Thanks again for your help.
Posted by: proddick 14 years ago
Yellow Belt
0
@Jsaylor

I just wanted to say thanks for the script. I've edited to suit my needs and it works well.

Regards

Paul
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ