I regularly come across tasks where it is necessary to execute an MSI or EXE file with separate parameters based on ex. geographical location, organization structure, Production/Test environment etc.
To manage this I create a script based on Task sequence variables and execute the program by using these variables.
These Task Sequence variables can either be set as collection variables in Config Mgr. or as a fronted HTA.
Usage: Place the script in the same package/folder as the MSI/EXE you want to execute.
This script gathers a total of five Task Sequence variables (ProductionORTest, testenvironment-BaseSERVER, testenvironment-DBSERVER, Production-DBSERVER, Production-BaseSERVER). All the variables are set by a Fronted HTA that has been created. The variables could also have been set to Confg Mgr. collections containing machine accounts for either test or production.
In the below sample script the Task sequence variable “ProductionORTest” is used to determine if the MSI file should install an client in production environment or in test environment.
Save below sample script as ZTI-RunProgramTSvar.vbs
' //*************************************************************************
' // ***** Script Header *****
' //
' // File: ZTI-RunProgramTSVar.vbs
' //
' // Purpose: Execute program (MSI/EXE) based on Task Sequence Variables
' //
' // Usage: cscript ZTI-RunProgramTSVar.vbs
' //
' // Script Version: 1.0.0
' //
' // 1.0.0 Created by Ole Skovgaard (www.Infrahouse.com)
' //
' // Customer History:
' //
' // ***** End Header *****
' //*************************************************************************
On error resume next
Dim objShell
Dim objFSO
Set objShell = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strWinDir = objShell.ExpandEnvironmentStrings("%SYSTEMROOT%")
strSystemDir = objShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%")
objShell.CD = objFSO.GetParentFolderName(Wscript.ScriptFullName)
ScriptDir = objShell.CD
Set env = CreateObject("Microsoft.SMS.TSEnvironment")
ProductionORTest = env("ProductionORTest")
If LCase(ProductionORTest) = LCase("testenvironment") Then
BaseSERVER = env("testenvironment-BaseSERVER")
DBSERVER = env("testenvironment-DBSERVER")
Else
BaseSERVER = env("Production-BaseSERVER")
DBSERVER = env("Production-DBSERVER")
End If
Command = "MSIEXEC /i """ & ScriptDir & "\Setup.msi"" /l*v+ " & strSystemDir & "\Setup.log /qb ALLUSERS=1 BaseSERVER=" & BaseSERVER & " DBSERVER=" & DBSERVER
irun = objShell.Run(Command, 0, true)
Ole Skovgaard, IT-Architect @ Infrahouse, Lersø Parkallé 107 , 2100 København Ø, Denmark
Wednesday, September 28, 2011
Monday, September 19, 2011
Configuration Manager Support Announcements for August 2011
Configuration Manager 2007 now supports Microsoft SQL Server 2008 R2 SP1 and Microsoft SQL Server 2008 SP3.
System Center Configuration Manager 2007 SP2, R2 and R3 now supports Microsoft SQL Server 2008 R2 SP1 and Microsoft SQL Server 2008 SP3 as a Configuration Manager 2007 site database.
The Reporting Service Point site system role and Client Status Reporting feature found in System Center Configuration Manager 2007 R2 and R3, are also supported with these versions of SQL Server.
No software updates are required.
Read more:
System Center Configuration Manager Team
Configuration Manager Supported Configurations:
http://technet.microsoft.com/en-us/library/bb680717.aspx
System Center Configuration Manager 2007 SP2, R2 and R3 now supports Microsoft SQL Server 2008 R2 SP1 and Microsoft SQL Server 2008 SP3 as a Configuration Manager 2007 site database.
The Reporting Service Point site system role and Client Status Reporting feature found in System Center Configuration Manager 2007 R2 and R3, are also supported with these versions of SQL Server.
No software updates are required.
Read more:
System Center Configuration Manager Team
Configuration Manager Supported Configurations:
http://technet.microsoft.com/en-us/library/bb680717.aspx
Wednesday, September 14, 2011
Windows 8 - Detailed preview
Microsoft showcased a detailed preview of the next major release of Windows
Touch-First User Interface
More Ways to Engage With Powerful, Connected Apps
Enhanced Fundamentals
Touch-First User Interface
- Metro style. Windows 8 introduces a new Metro style interface built for touch, which shows information important to you, embodies simplicity and gives you control. The Metro style UI is equally at home with a mouse and keyboard as well.
- Touch-first browsing, not just browsing on a touch device. Providing a fast and fluid touch-browsing experience, Internet Explorer 10 puts sites at the center on new Windows 8 devices.
More Ways to Engage With Powerful, Connected Apps
- Powered by apps. Metro style apps built for Windows 8 are the focal point of your experience, filling your entire screen so there are no distractions.
- Apps can work together. Apps communicate with each other in Windows 8. For example, you can easily select and email photos from different places, such as Facebook, Flickr or on your hard drive.
- Your experience syncs across your devices. Live roams all the content from the cloud services you use most — photos, email, calendar and contacts — keeping them up-to-date on your devices. With SkyDrive, you can access your files, photos and documents from virtually anywhere with any browser or with Metro style apps in Windows 8.
Enhanced Fundamentals
- The best of Windows 7, only better. Windows 8 is built on the rock-solid foundation of Windows 7, delivering improvements in performance, security, privacy and system reliability. Windows 8 reduces the memory footprint needed — even on the lowest-end hardware — leaving more room for your apps.
- Preserving power-user favorites and making them better. For those who push the limits of their PC, Windows 8 features an enhanced Task Manager and Windows Explorer and new, flexible options for multimonitor setups.
Duplicate Records When You Use Unknown Computer Support with Active Directory Delta-Discovery
Known Issue and Workaround: You might see duplicate records when you use unknown computer support with Active Directory Delta-Discovery in Configuration Manager 2007 R3.
Read more:
http://blogs.technet.com/b/configmgrteam/archive/2011/09/09/known-issue-and-workaround-duplicate-records-when-you-use-unknown-computer-support-with-active-directory-delta-discovery.aspx
Read more:
http://blogs.technet.com/b/configmgrteam/archive/2011/09/09/known-issue-and-workaround-duplicate-records-when-you-use-unknown-computer-support-with-active-directory-delta-discovery.aspx
Subscribe to:
Posts (Atom)