January 2010 - Posts
“We recognize that Windows 7 is an opportunity for organizations to reduce their costs, improve security, and improve productivity. Windows 7 helps achieve these goals. However, organizations do not maximize the return on investment of Windows 7 without modern infrastructure to support it.
We want organizations to benefit from the latest platform's features. To achieve these goals, we want to help organizations migrate to our latest management platform. To do this, we have released a compatibility pack that adds Windows 7 and Windows Server 2008 R2 as supported clients in Microsoft Systems Management Server (SMS) 2003 Service Pack 3 (SP3). This compatibility pack helps SMS 2003 SP3 users migrate their software to Configuration Manager 2007 while realizing immediate benefits from their Windows 7 investment.”
Hotfix available here:
http://support.microsoft.com/kb/974014
Finding the various identifiers and values can be frustrating and difficult. Here is what i could find in regards to the language packs, and various user/system locale settings.
Input Locales (Keyboard)
http://technet.microsoft.com/en-us/library/dd744319(WS.10).aspx
Language Pack and codes (en-us) (User/System Locale Values)
http://technet.microsoft.com/en-us/library/dd744369(WS.10).aspx
Language Pack Default Values (User Locale/System Locale Values, Time Zone Names)
http://technet.microsoft.com/en-us/library/dd799301(WS.10).aspx
TimeZone Index
http://msdn.microsoft.com/en-us/library/ms912391(WinEmbedded.11).aspx
http://technet.microsoft.com/en-us/library/cc749073(WS.10).aspx
Here is some info on XP/Server 2003 vs Vista/Windows 7 Locales:
http://blogs.msdn.com/michkap/archive/2009/09/15/9894707.aspx
National Language Support (NLS) API Reference
http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx
Hope this helps!
This was on the MDT/OSD list and I thought I’d post it. There is a known issue if with 64-bit systems where the TS stalls at State Restore when it hits the Use Toolkit package step.
Per Tim Mintner, here is the fix:
Create a “Run command line” step (positioned before the “Use Toolkit Package” step in the new OS) run this command:
reg add HKCR\Wow6432Node\TypeLib\{D5E1749D-832D-4587-AFC3-9462187FE2F5}\1.0\0\win64 /ve /d "%WINDIR%\SysWOW64\CCM\tscore.dll" /f
This will fix the one registry key that we have identified as being incorrect, which causes the MDT scripts (and any other VBScripts that try to use Microsoft.SMS.TSEnvironment) to fail
I’ve been working on a custom front-end wizard for my deployments lately. I’ve been combining items onto a single screen for the techs to use, as a result, I needed to resize the size of the window to accommodate the new items. After I was able to accomplish then, then the window was off the screen to the right and bottom, so I wanted to have it automatically center on the screen for me. Thanks to Johan Ardwidmark, Jason Scheffelmaer, and Keith Garner for the suggestions and always helpful tips.
Window Size
In the xml file for the wizard, you can modify the window size by adding the below text into the /global section.
<CustomStatement><![CDATA[ window.resizeTo 700,700 ]]> </CustomStatement>
You can also add this data through the wizard editor. Select “Add”, then “CustomStatement”, then add “window.resizeTo 700,700 “ into the pane.
Centering Window On Screen
<CustomStatement><![CDATA[ window.moveTo (screen.width - document.body.clientwidth)/2, (screen.height - document.body.clientheight)/2 ]]> </CustomStatement>
You can also add this data through the wizard editor. Select “Add”, then “CustomStatement”, then add “window.moveTo (screen.width - document.body.clientwidth)/2, (screen.height - document.body.clientheight)/2” into the pane.
Here are a couple general HTA scripting examples by the Scripting Guy for reference:
http://blogs.technet.com/heyscriptingguy/archive/2005/10/10/how-can-i-center-an-hta-on-the-screen.aspx
http://blogs.technet.com/heyscriptingguy/archive/2005/09/19/how-can-i-specify-a-window-size-for-my-hta.aspx
Through SMS/SCCM we use AD groups for software distribution. Something that happens often enough is that we need to copy the groups that one computer is a member of to another computer. Thanks to help from David Crown, I have a nifty powershell script that will do that for me now. If you just run the script straight, it will prompt for the source computer and the destination computer. Otherwise you call the powershell straight with the parameters “Script -src source_comptuer -dest destination_computer”
Also have a simple vbscript to call it for you so you don’t have to open a powershell prompt every time you want to run it.
Details below, and files attached to this post.
You will just need to change the “PATH” in the vbscript file to where the script is stored:
Set objShell = CreateObject("Wscript.Shell")
objShell.Run("powershell.exe –noexit &'PATH\copygroupmembership.ps1'")
Here is the powershell script:
Param ($src, $dest)
Add-PSSnapin Quest.ActiveRoles.ADManagement
if ( ($dest -eq $null) -or ($src -eq $null) ) {
[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$src = [Microsoft.VisualBasic.Interaction]::InputBox("Enter the name of the source computer", "Source Computer")
$dest = [Microsoft.VisualBasic.Interaction]::InputBox("Enter the name of the destination computer", "Destinaton Computer")
}
$dest = $dest +"$"
$src = $src + "$"
$Groups = get-QADMemberOf $src
$Groups | foreach {
if ($_.name -ne "Domain Computers") {
Add-QADGroupMember $_ -Member $dest
}
}
Without any third party tools here is a simple way to create a weekly defrag task on your client workstations. This is specific for Windows XP, although you could create something similar for Vista or Windows 7.
We went to create a new Package called “Schedule Weekly Defrag”
The data source can be set empty:
Then we want to create a new program called “Schedule Defrag Task”
This is your command line, this one will run every Sunday at 8 AM and defrag the C drive:
schtasks.exe /create /sc weekly /d SUN /tn defrag /tr "c:\windows\system32\defrag.exe c: -f" /st 08:00:00 /sd 01/20/2007 /ru "system"
Notice we set the start path, and make sure to set it to run hidden:
For the Environment, we want admin context and we will need a drive letter for the command to execute:
It’s also my preference to hide notifications, since this is administrative task:
Here we can see the task has been created on a client machine:
If we look at the actual task, we can see the properties are set correctly:
