Sometimes you want to create a collection that will find all the computers that don't have a particular software installed and push it to it. This is a good dynamic way to use SMS instead of direct computer addition.
Assuming you have Adobe Reader setup to install to all computers you can key this off of the Workstation collection or all computers if you wish. You notice that I use the "LIKE" condition instead of the "equals." I do this because you never know what version you might have. Look at Reader 7.09, even though you update your package with the latest reader you would need to change the collection. This way it will always look for the computers with no reader. This is assuming of course, that you push the updates to reader and not uninstal and reinstall the whole application each time.
--------------------------------
select SMS_R_System.ResourceID,SMS_R_System.ResourceType,SMS_R_System.Name,SMS_R_System.SMSUniqueIdentifier,SMS_R_System.ResourceDomainORWorkgroup,SMS_R_System.Client from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Adobe Reader 8%")
--------------------------------
SMS/SCCM, Beyond Application Deployment is a blog by Matthew Hudson covering SMS 2003, SCCM 2007, 2012 and beyond package deployment. Here you will find hints, tips, and tricks to help with managing your infrastructure. It will focus mainly on Reg files, Batch, VbScript, WMI, and possibly other methods.
Wednesday, April 4, 2007
Monday, April 2, 2007
Admin Run As with IE 7
After you push down IE 7 through SMS you will find a curious problem. As a security fix Microsoft will no longer allow you launch Internet Explorer as an administrator then type in a c:\ and get to Explorer as an administraor. The new window will launch in the current user's security context. So to get around it you can use this reg file. Once installed it will allow you to right click on any folder or the start button and launch explorer as the system administrator or the Domain Admin.
Granted this can be done easily by just using the RunAs command but this is faster and a click away.
-----------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenAsAdminUser0]
@="Open An Explorer Window as the Domain Admin"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenAsAdminUser0\command]
@="runas.exe /user:MyDomain\\administrator \"explorer.exe /SEPARATE\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenAsAdminUser1]
@="Open An Explorer Window as the Local Administrator"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenAsAdminUser1\command]
@="runas.exe /user:Administrator \"explorer.exe /SEPARATE\""
-----------------------------
Granted this can be done easily by just using the RunAs command but this is faster and a click away.
-----------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenAsAdminUser0]
@="Open An Explorer Window as the Domain Admin"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenAsAdminUser0\command]
@="runas.exe /user:MyDomain\\administrator \"explorer.exe /SEPARATE\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenAsAdminUser1]
@="Open An Explorer Window as the Local Administrator"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenAsAdminUser1\command]
@="runas.exe /user:Administrator \"explorer.exe /SEPARATE\""
-----------------------------
ODBC Connections
After installing software or during routine application changes, it becomes necessary to add ODBC Settings. Most users don't or won't add these changes. Below is an example of how to add an ODBC connection to System (all users). If you want to do it for a certain user use the Current_User key.
ODBC for Project 2002 Sample
------------------------------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\Project2002]
"Driver"="C:\\WINDOWS\\System32\\SQLSRV32.dll"
"Server"="Server-sql"
"LastUser"="LUser"
"Trusted_Connection"="Yes"
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
"Project2002"="SQL Server"
---------------------------
This can also can be achived by setting it up manually and then exporting the Registry key.
ODBC for Project 2002 Sample
------------------------------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\Project2002]
"Driver"="C:\\WINDOWS\\System32\\SQLSRV32.dll"
"Server"="Server-sql"
"LastUser"="LUser"
"Trusted_Connection"="Yes"
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
"Project2002"="SQL Server"
---------------------------
This can also can be achived by setting it up manually and then exporting the Registry key.
Subscribe to:
Posts (Atom)