Author Archives: djseppie

Disable Language bar using Group Policy Preferences

After some searching I found out nobody found a solution to get rid of the Windows language bar using policies.
When deploying user settings using Group Policy Preferences (GPP) I actually managed to get this done!

Save the following text as settings.XML, create and open a new group policy object in Active Directory and drag the XML file into the registry portion of the user settings.
Now you should see a bunch of keys which will be deleted and/or updated.

Remember: this is the setting for Dutch Language (0413) and US-International keyboard (00020409)

One more thing, you need RES Workspace Manager because the settings need to be applied before explorer.exe is started..

Please let me know if this post helped you!

<Collection clsid="{53B533F5-224C-47e3-B01B-CA3B3F3FF4BF}" name="Set Keyboard Settings" disabled="0" desc="Created by Sebastiaan van Weelden (Ictivity) 10-09-2013" bypassErrors="1" changed="2013-09-10 14:29:33" uid="{F8F2590B-9CE8-4ED3-A4CD-634FE931E4A9}"><Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="2" status="2" image="8" changed="2013-08-22 07:40:21" uid="{2AACBDB8-F8D2-482F-BB49-56B3E018F8E2}" userContext="1" bypassErrors="1" disabled="0"><Properties action="D" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Keyboard Layout\Preload" name="2" type="REG_SZ" value="00000413"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="3" status="3" image="8" changed="2013-08-22 07:40:12" uid="{F9AA01F0-1686-469B-8FBF-8D55CF3DA68E}" userContext="1" bypassErrors="1" disabled="0"><Properties action="D" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Keyboard Layout\Preload" name="3" type="REG_SZ" value="00000413"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="1" status="1" image="6" changed="2013-08-22 07:41:01" uid="{7744E6F3-E616-4B1C-B647-FD4CD9F6CC34}" userContext="1" bypassErrors="1" disabled="0"><Properties action="R" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Keyboard Layout\Preload" name="1" type="REG_SZ" value="00000413"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="00000413" status="00000413" image="7" userContext="1" bypassErrors="1" changed="2013-08-22 07:41:48" uid="{ED84566C-7A8D-4E07-968F-130D1B1A481B}" disabled="0"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Keyboard Layout\Substitutes" name="00000413" type="REG_SZ" value="00020409"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="d0010413" status="d0010413" image="8" changed="2013-08-22 07:50:56" uid="{7192BEAB-D0C2-4F1C-B8DA-D11A88306D7D}" userContext="1" bypassErrors="1" disabled="0"><Properties action="D" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Keyboard Layout\Substitutes" name="d0010413" type="REG_SZ" value="00020409"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Language Hotkey" status="Language Hotkey" image="7" changed="2013-08-22 07:59:00" uid="{B0714A5B-7721-4CF3-9AA0-D2A4A83B93E5}" userContext="1" bypassErrors="1" disabled="0"><Properties action="U" displayDecimal="1" default="0" hive="HKEY_CURRENT_USER" key="Keyboard Layout\Toggle" name="Language Hotkey" type="REG_SZ" value="3"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Layout Hotkey" status="Layout Hotkey" image="7" changed="2013-08-22 08:06:57" uid="{121A34F8-C5C0-433B-84DF-EBB26C143711}" disabled="0"><Properties action="U" displayDecimal="1" default="0" hive="HKEY_CURRENT_USER" key="Keyboard Layout\Toggle" name="Layout Hotkey" type="REG_SZ" value="3"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="ShowStatus" status="ShowStatus" image="12" changed="2013-08-22 13:11:42" uid="{B66F08A6-A0E0-489A-A0E3-AD458709AFC5}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="1" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\LangBar" name="ShowStatus" type="REG_DWORD" value="00000003"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Default" status="Default" image="7" changed="2013-08-22 13:13:10" uid="{0F3FAB83-C2BA-49B5-A683-771F899359EC}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\Assembliesx00000413\{34745C63-B2F0-4784-8B67-5E12C8701A31}" name="Default" type="REG_SZ" value="{00000000-0000-0000-0000-000000000000}"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Profile" status="Profile" image="7" changed="2013-08-22 13:13:05" uid="{877D2AB8-636E-40F8-81D9-F93DE83519BA}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\Assembliesx00000413\{34745C63-B2F0-4784-8B67-5E12C8701A31}" name="Profile" type="REG_SZ" value="{00000000-0000-0000-0000-000000000000}"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="KeyboardLayout" status="KeyboardLayout" image="12" changed="2013-08-22 13:13:45" uid="{535C6CDA-49DA-422C-9D37-3EC6F4C49E96}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\Assembliesx00000413\{34745C63-B2F0-4784-8B67-5E12C8701A31}" name="KeyboardLayout" type="REG_DWORD" value="F0010413"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="0x00000409" status="0x00000409" image="3" changed="2013-08-22 13:14:47" uid="{C2A8654B-EA01-428C-873F-495E5A976E21}" userContext="1" bypassErrors="1"><Properties action="D" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\Assembliesx00000409" name="" type="REG_SZ" value=""/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="00000001" status="00000001" image="3" changed="2013-08-22 13:15:21" uid="{F2E8411F-473E-4D4B-989B-564232A6F881}"><Properties action="D" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\SortOrder\AssemblyItemx00000413\{34745C63-B2F0-4784-8B67-5E12C8701A31}0000001" name="" type="REG_SZ" value=""/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="CLSID" status="CLSID" image="7" changed="2013-08-22 13:16:06" uid="{165AEF77-9D88-4CD5-94DE-BAD5BF5CA9AD}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\SortOrder\AssemblyItemx00000413\{34745C63-B2F0-4784-8B67-5E12C8701A31}0000000" name="CLSID" type="REG_SZ" value="{00000000-0000-0000-0000-000000000000}"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Profile" status="Profile" image="7" changed="2013-08-22 13:16:25" uid="{9AC40BCF-0E8C-458E-AC51-8A31178DF53D}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\SortOrder\AssemblyItemx00000413\{34745C63-B2F0-4784-8B67-5E12C8701A31}0000000" name="Profile" type="REG_SZ" value="{00000000-0000-0000-0000-000000000000}"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="KeyboardLayout" status="KeyboardLayout" image="12" changed="2013-08-22 13:16:57" uid="{BAFA25B0-17B6-4B64-9134-65BD87922474}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\SortOrder\AssemblyItemx00000413\{34745C63-B2F0-4784-8B67-5E12C8701A31}0000000" name="KeyboardLayout" type="REG_DWORD" value="F0010413"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="00000000" status="00000000" image="7" changed="2013-08-22 13:17:38" uid="{058D19D0-2755-4CE5-A304-92F7E677E83D}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\SortOrder\Language" name="00000000" type="REG_SZ" value="00000413"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Top" status="Top" image="12" userContext="1" bypassErrors="1" changed="2013-08-22 13:18:27" uid="{33561FDC-1BF7-4298-BE78-463CBDD621B9}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\MSUTB" name="Top" type="REG_DWORD" value="00000000"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Left" status="Left" image="12" changed="2013-08-22 13:18:50" uid="{28A8B6F2-F4B0-4845-B44D-C391FCAE1D22}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\MSUTB" name="Left" type="REG_DWORD" value="00000580"/></Registry>
 <Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="KeyboardLayout" status="KeyboardLayout" image="12" changed="2013-08-22 13:19:38" uid="{3B36E33D-837C-4C0E-AF79-0EDAB45394A5}" userContext="1" bypassErrors="1"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CURRENT_USER" key="Software\Microsoft\CTF\RemoteSession" name="KeyboardLayout" type="REG_DWORD" value="00000000"/></Registry>
</Collection>
Advertisements

Remove RES Hyperdrive Right Click Context menu

I wanted to remove the RES HyperDrive right-click menu which was created by the installer. It was quite easy, Just import the following keys in the registry

Windows Registry Editor Version 5.00

-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shellex\ContextMenuHandlers\ContextMenuExtensionWithIcons

-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shellex\ContextMenuHandlers\ContextMenuExtensionWithIcons

-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\ContextMenuExtensionWithIcons

Save Certificates with RES Workspace Manager

Ever wondered why (personal) certificate information is not saved when you use folder redirection and RES Workspace Manager? Well the cause is simple, the solution also 🙂

When you choose to redirect the Application Data folder the certificate store folders are NOT redirected (bug??). They resist in the default folder. So when you use a mandatory profile and RES Workspace Manager this information is lost when you logout and your user has to enter the 24-digit passphrase again every day 😉

The solution is quick, dirty and simple. Create a User Preference will that store the following:

%userprofile%\AppData\Roaming\Microsoft\SystemCertificates
%userprofile%\AppData\Roaming\Microsoft\Protect
%userprofile%\AppData\Roaming\Microsoft\Credentials
%userprofile%\AppData\Roaming\Microsoft\Crypto
%userprofile%\AppData\Roaming\Microsoft\CLR Security Config
%userprofile%\AppData\Roaming\Microsoft\CryptNetUrlCache

HKEY_CURRENT_USER\Software\Microsoft\Cryptography
HKEY_CURRENT_USER\Software\Microsoft\Protected Storage System Provider
HKEY_CURRENT_USER\Software\Microsoft\SystemCertificates

Tell the news to your users and you’ll be their hero (for one day) 🙂

Fix NTP Time Settings

What to do when your domain controllers don’t sync time ery well??

On the PDC Emulator run the following in a command prompt:

  • W32tm /config /manualpeerlist:time.nrc.ca /syncfromflags:manual /reliable:yes /update
  •  W32tm /resync /rediscover
  • Restart the time service: net stop w32time && net start w32time

On every Domain Controller that is not holding the PDC Emulator role, run the following in a command prompt:

  • w32tm /config /syncfromflags:domhier /update
  •  W32tm /resync /rediscover
  • Restart the time service: net stop w32time && net start w32time

Fixed?? I my case it was 🙂

Set Internet Explorer As Default Browser Through Registry

The following registry entries must all be changed in order to set Internet Explorer as the default browser and pass the ‘Would you like to set Internet Explorer as default browser’ popup.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice]
“Progid”=”IE.HTTP”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice]
“Progid”=”IE.HTTPS”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoice]
“Progid”=”IE.FTP”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm\UserChoice]
“Progid”=”IE.AssocFile.HTM”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\UserChoice]
“Progid”=”IE.AssocFile.HTM”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mht\UserChoice]
“Progid”=”IE.AssocFile.MHT”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mhtml\UserChoice]
“Progid”=”IE.AssocFile.MHT”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.partial\UserChoice]
“Progid”=”IE.AssocFile.PARTIAL”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.svg\UserChoice]
“Progid”=”IE.AssocFile.SVG”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.url\UserChoice]
“Progid”=”IE.AssocFile.URL”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.website\UserChoice]
“Progid”=”IE.AssocFile.WEBSITE”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xht\UserChoice]
“Progid”=”IE.AssocFile.XHT”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xhtml\UserChoice]
“Progid”=”IE.AssocFile.XHT”

[HKEY_CURRENT_USER\Software\Clients\StartMenuInternet]
@=”IEXPLORE.EXE”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\MIMEAssociations\text/html\UserChoice]
“Progid”=”IE.text/html”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\MIMEAssociations\message/rfc822\UserChoice]
“Progid”=”IE.message/rfc822”

Enable or Disable Client For Microsoft Networks and other Lan Settings using script

Yesterday I was searching the web for a script that would disable the client for Microsoft networks and some other protocols.
I could not find it in the first 10 pages of my search on Google.
Finally I found a great solution that i would like to share with you, and tag my post well so anyone can find it more quickly than I did 🙂

I found the application nvspbind that I could use to disable or enable the following stuff:

  • Broadcom Advanced Server Program Driver
  • Brocade 10G Ethernet Service
  • Intel(R) Advanced Network Services Protocol
  • Link-Layer Topology Discovery Mapper I/O Driver
  • Client for Microsoft Networks
  • NetBIOS Interface
  • WINS Client(TCP/IP) Protocol
  • QoS Packet Scheduler
  • Link-Layer Topology Discovery Responder
  • File and Printer Sharing for Microsoft Networks
  • Microsoft NetbiosSmb
  • Internet Protocol Version 4 (TCP/IPv4)
  • Internet Protocol Version 6 (TCP/IPv6)
  • Microsoft Virtual Network Switch Protocol

I’ve put them all together in a batch script:

REM Configure Network Settings

set lan="LAN Verbinding"

REM brcm_blfp (Broadcom Advanced Server Program Driver)
"%~DP0nvspbind.exe" /d "%lan%" brcm_blfp

REM bnad_imp (Brocade 10G Ethernet Service)
"%~DP0nvspbind.exe" /d "%lan%" bnad_imp

REM iansprotocol (Intel(R) Advanced Network Services Protocol)
"%~DP0nvspbind.exe" /d "%lan%" iansprotocol

REM ms_lltdio (Link-Layer Topology Discovery Mapper I/O Driver)
"%~DP0nvspbind.exe" /d "%lan%" ms_lltdio

REM ms_msclient (Client for Microsoft Networks)
"%~DP0nvspbind.exe" /d "%lan%" ms_msclient

REM ms_netbios (NetBIOS Interface)
"%~DP0nvspbind.exe" /d "%lan%" ms_netbios

REM ms_netbt (WINS Client(TCP/IP) Protocol)
"%~DP0nvspbind.exe" /d "%lan%" ms_netbt

REM ms_pacer (QoS Packet Scheduler)
"%~DP0nvspbind.exe" /d "%lan%" ms_pacer

REM ms_rspndr (Link-Layer Topology Discovery Responder)
"%~DP0nvspbind.exe" /d "%lan%" ms_rspndr

REM ms_server (File and Printer Sharing for Microsoft Networks)
"%~DP0nvspbind.exe" /d "%lan%" ms_server

REM ms_smb (Microsoft NetbiosSmb)
"%~DP0nvspbind.exe" /d "%lan%" NetbiosSmb

REM ms_tcpip (Internet Protocol Version 4 (TCP/IPv4))
"%~DP0nvspbind.exe" /d "%lan%" ms_tcpip

REM ms_tcpip6 (Internet Protocol Version 6 (TCP/IPv6))
"%~DP0nvspbind.exe" /d "%lan%" ms_tcpip6

REM vms_pp (Microsoft Virtual Network Switch Protocol)
"%~DP0nvspbind.exe" /d "%lan%" vms_pp

That’s it!

Use Remote Server Administration Tools RSAT on Windows 7 SP1

Last week I discovered that RSAT cannot be installed on Windows 7 SP1 because of some stupid install check.
When you want to use the RSAT you can accomplish this using the following procedure:

Download RSAT here.

* Unpack the .MSU with 7zip or another unzip utility to let’s say c:\TEMP\RSAT.
* use the package manager for the install:

pkgmgr.exe /n:%temp%\RSAT\Windows6.1-KB958830-x64.xml

* Now watch the taskmanager the process pkgmgr.exe until it automatically closes (this will take several minutes).
* Go to the control panel and in Programs and Windows Features you can add the desired feature you want.

Note: when you’ve got RSAT installed on your computer prior installing Windows 7 SP1, then RSAT will already be available and you don’t need this workaround.

Deploy Printers Using Group Policy Preferences

Deploying printer in Windows Server 2008 using grou policy preferences is pretty straightforward. The web is filled with many manuals like this one: http://www.msserveradmin.com/the-one-reason-you-should-use-group-policy-preferences/

What seems to be a major problem is ‘remembering’ the default printer when using replace option. The default behavour of Windows is the first added printer is being set as the default.
To resolve this, i’ve created a script (with some help from a great collegue). You do need te have a roaming profile or a tool like Immidio profiles to save current use keys. Add the logon.vbs and the logoff.vbs scripts to the user policy.

Set the c:\windows\system32\cscript.exe as application with the logon.vbs as a parameter.

 logon.vbs

Option Explicit
Dim wshShell, strSavekey, strPrtName, objNetwork
'---------------------------------------------------------------------
'Save default printer login script written by 
'Sebastiaan van Weelden and Edward Dijk
'Ictivity 2011
'---------------------------------------------------------------------
' Set string values
strSaveKey = "HKCU\SOFTWARE\Ictivity\"
Set WSHShell = CreateObject("WScript.Shell")
Set objNetwork = CreateObject("WScript.Network")
strPrtName = WshShell.RegRead (strSaveKey & "Printer Name")
'wscript.echo strPrtName
'Add 4 seconds delay so the printers can be added by the policy
WScript.Sleep(4000)
objNetwork.SetDefaultPrinter strPrtName

'Exit script
WScript.Quit

Logoff.vbs reads the key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device and cuts it into pieces.
It creates some keys in hkey_current_user\software\ictivity.
These keys are being ‘read’ at logon and after a while (this time can be set in logon.vbs) the last used printer is set as default.

logoff.vbs

Option Explicit
Dim strKey, wshShell, strSavekey, strPrtName, strPrtSpool, strPrt
Dim strValue
'---------------------------------------------------------------------
'Save default printer logout script written by 
'Sebastiaan van Weelden and Edward Dijk
'Ictivity 2011
'---------------------------------------------------------------------
' Set string values
strSaveKey = "HKCU\SOFTWARE\Ictivity\"
strPrtName = "Printer Name"
strPrt = "Printer Port"
strPrtSpool = "Spooler"
' Create WScript Shell object to read the registry
Set wshShell = CreateObject( "WScript.Shell" )
' Read the current default printer from registry
strKey = "HKEY_CURRENT_USER\Software\Microsoft" _ 
& "\Windows NT\CurrentVersion\Windows\Device"
strValue = Split( wshShell.RegRead( strKey ), "," )
'Write Printer Name
WshShell.RegWrite "HKCU\SOFTWARE\Ictivity\" & strPrtName, strValue(0), "REG_SZ"
'Write Spooler
WshShell.RegWrite "HKCU\SOFTWARE\Ictivity\" & strPrtSpool, strValue(1), "REG_SZ"
'Write Printer Port
WshShell.RegWrite "HKCU\SOFTWARE\Ictivity\" & strPrt, strValue(2), "REG_SZ"
'Exit script
WScript.Quit

The last thing to do is changing the computer policy. Windows will refresh the policy en thereby also readd the printers. This will result in a wrong default printer.
Change the following setting in the computer policy:


Good luck!

Special thanx to my script buddy Edward Dijk

Create Windows 7 image with Novell ZCM

Last week I created a Windows 7 Professional image with Novell ZCM. When I deployed the image to a workstation, it displayed an error when Windows was started:

Windows failed to start. A recent hardware or software change might
be the
cause. File: \Windows\system32\winload.exe Status: 0xc0000225 Info:
The selected entry could not be loaded because the application is missing or corrupt.”

The Solution was very simple:
Execute the following commands before sealing your image with sysprep:

bcdedit /set {bootmgr} device boot
bcdedit /set {default} device boot
bcdedit /set {default} osdevice boot

Now you’ll be able to deploy your image to the workstations!

How to revert renamed user homefolders to My Documents

Today I had this weird problem because of some stupid brain farts by the Microsoft developers team.
When you redirect the my documents folder to a network location let’s say \\servername\sharename\%username% then the %username% looks like it is renamed to my documents, FOR EVERY USER!)
So you’ll have a folder with in my case hundreds of my documents folders..

You definitely don’t want this behaviour!

Apparently this is by design http://support.microsoft.com/kb/947222.
When you take a look at this article you really want to choose between creating a subfolder under the redirected folder in the Universal Naming Convention (UNC) path.

For example, the following UNC path: \\server\users\username\Documents

The best method is the third one from the article: Do not grant the Read permission to the administrator for the Desktop.ini files on the server.

To do this, follow these steps:
Note If more than one Desktop.ini file exists, follow these steps for all the Desktop.ini files.
Right-click the Desktop.ini file, click Properties, and then click the Security tab.
In the Group or user names pane, click Administrators.
Click to select the Deny check box for the Read permission.
Click OK.

You can also use this great PowerShell scipt:
$folders = Get-ChildItem | where-object {$_.psiscontainer};

foreach ($folder in $folders)
{
$ErrorActionPreference = "SilentlyContinue"
$desktopIni = Get-ChildItem $folder -Filter desktop.ini -Force

if ($desktopIni -ne $null)
{
$Acl = (Get-Item $desktopIni.FullName -Force).GetAccessControl("Access")
$Ar = New-Object system.security.accesscontrol.filesystemaccessrule `
("groupName","Read","Deny")
$Acl.SetAccessRule($Ar)
Set-Acl $desktopIni.FullName $Acl
}
}

Thanx to this great blog by Richard Willis!!

Enable Sound Icon Windows XP using script

Today my customer wanted to have the volume icon in the taskbar enabled.
Easy, was the first thought. But during my search i investiogated it was a bit harder.

Here’s the solution:
Import the following registry key:

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\SysTray" /v Services /t REG_DWORD /d 31 /f

Start the following program:
c:\WINDOWS\system32\systray.exe

Voilà !

Show Dell Asset tag / part number / serial number using VB-script

This little vb-script shows the Asset tag / part number of serial number of your Dell computer.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")

For Each objSMBIOS in colSMBIOS
Wscript.Echo "Part Number: " & objSMBIOS.PartNumber
Wscript.Echo "Serial Number: " & objSMBIOS.SerialNumber
Wscript.Echo "Asset Tag: " & objSMBIOS.SMBIOSAssetTag
Next

Windows Update Error 0x8024000C

Today i discovered a solution for a problem with my own laptop. Windows update comes with the error 0x8024000C when i manually click on Windows Update.
Today the windows 7 solution center told me windows updates could not install. When i take a look in the windows update.log, located at c:\Windows\WindowsUpdate.log, i saw the error: WARNING: Returning due to error from GetDownloadProgressUx, error = 0x8024000C

When i visit customers, i always need to fill in a proxy server. This was exactly the problem, and as i don’t frequently use Internet Explorer this problem occured. I was able to solve it by simply deleting the folowing registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
“WinHttpSettings”
Then i restarted the windows update service and checked for updates. yet another problem solved 🙂

Dell OptiPlex 740 i.c.m. Novell ZENworks Endpoint Security Client

Yesterday I was facing a annoying problem. Once a Dell OptiPlex 740 was reimaged and the Novell Zenworks Endpoint Security Client was installed, a blue screen occurred at the next startup. The problem occurred almost immediately at booting.

The cause was a old raid driver nvata.inf (date 2006) which belongs to the nForce4 chipset.
With the new driver (DriverVer=08/18/2008,10.3.0.42) it was all working fine. I downloaded it from www.nvidia.com

Using devcon, I updated the existing devices:

devcon update C:\Drv\B2\nvgts.inf  “PCI\VEN_10DE&DEV_0266&SUBSYS_01EC1028&REV_A1”
devcon update C:\Drv\B2\nvgts.inf  “PCI\VEN_10DE&DEV_0267&SUBSYS_01EC1028&REV_A1”

devcon update C:\Drv\B2\nvgts.inf  “PCI\VEN_10DE&DEV_0266&SUBSYS_01EC1028&REV_A1”
devcon update C:\Drv\B2\nvgts.inf  “PCI\VEN_10DE&DEV_0267&SUBSYS_01EC1028&REV_A1”

If you want to know how to install the Zenworks Endpoint Security Client silent, click here!

Novell ZENworks Endpoint Security Client silent install

If you want to silent install the Novell ZENworks Endpoint Security Client, you must use Wise Install Tailor (or another utility to build a MST file) and Orca.
Open the ZENworks Security Client.msi using install tailor. Walk though the wizard and at the end you’ll have a MST file.

Start Orca and open the “ZENworks Security Client.msi” and select “transforms”, followed by “new transform”.
Now browse to the table “property” and change the value of “STRBR” and change the value “Force” into “ReallySuppress”.

Click transform and close transform. Voila!

SCRIPT: Change Home-directory field in Active Directory

Use this script to change the Home-directory field in Active Directory

'on error resume next must be enabled, otherwise the search will fail on accounts which do not have a
'homedirectory/homedrive defined.
on error resume next

CONST ForReading = 1
CONST ForWriting = 2
CONST ForAppending = 8
CONST Create = true

UitwijkHomeDirServer = "cc-afsr-01"
OriginalHomeDirServer = "fvs-01"

Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
'objCommand.CommandText = ";(objectCategory=User)" & ";adspath;subtree"
'Onderstaande CommandText is om mee te testen.
objCommand.CommandText = ";(objectCategory=User)" & ";adspath;subtree"
Set objRecordSet = objCommand.Execute

Set objShell = CreateObject("WScript.Shell")
Set objFso = CreateObject("scripting.filesystemobject")

Set changehomedirlogtxt = objFso.OpenTextFile("ChangeHomeDir_log.txt", ForAppending, Create)

'Append de datum en tijd in het tekstbestan met een witregel ervoor en erna.
changehomedirlogtxt.WriteBlankLines 1
changehomedirlogtxt.WriteLine(Date & " " & Time)
changehomedirlogtxt.WriteBlankLines 1

'Loop door het recordset en verander van iedere gebruiker die een homedrive op J heeft naar de fvs-01 de homedirectory.
'Schrijf alle usernames en homedirectories die aan de gebruikte if statement voldoen naar een tekstbestand.
Do Until objRecordset.EOF
'Zet de te gebruiken waardes weer op nul, anders worden de waardes gebruikt voor accounts die geen homeDirectory hebben.
currentHomeDir = ""
currentHomeDrive = ""
currentUserName = ""
Set objUser = GetObject(objRecordset.Fields("adspath"))
currentHomeDir = objUser.Get("homeDirectory")
currentHomeDrive = objuser.Get("homeDrive")
currentUserName = objUser.Get("name")
if currentHomeDrive = "J:" and left(currentHomeDir, 8) = "\\" & OriginalHomeDirServer then
'WScript.echo "Gebruiker " & currentUserName & " heeft de gewenste homedir in " & currentHomeDir
changehomedirlogtxt.WriteLine(currentUserName & " " & currentHomeDir)
objUser.Put "homeDirectory", "\\" & UitwijkHomeDirServer & "\Home\" & currentUserName
objUser.SetInfo
end if
objRecordset.MoveNext
Loop

changehomedirlogtxt.Close()

objConnection.Close

MsgBox("Klaar. Alle HomeDirectories zouden nu moeten verwijzen naar de " & UitwijkHomeDirServer)

Set objShell = Nothing
Set objFso = Nothing

SCRIPT: Delete old Windows Update backup files

The following script can be used as a scheduled task on workstations. It deletes old Windows Update backup files which are morely overhead than useful.

Option Explicit
Dim o, oShell, nConfirm
Set o = WScript.Application
o.Interactive = True
Set oShell = CreateObject("WScript.Shell")

Dim oFSO, sWinDir, oFolder, oDictionary, oSubFolder, sFolderName, sFolderPath, sUpdateName, sDeleted
Set oFSO = CreateObject("Scripting.FileSystemObject")
sWinDir = oFSO.GetSpecialFolder(0)
sDeleted = vbNullString
Set oFolder = oFSO.GetFolder(sWinDir)
Set oDictionary = CreateObject("Scripting.Dictionary")
For Each oSubFolder In oFolder.SubFolders
'Zoek de verschillen Hint: het zit um in één regel :-)
sFolderName = LCase(oSubFolder.Name)
sFolderPath = LCase(oSubFolder.Path)
'change days here
If (DateDiff("D", oSubFolder.DateCreated, Date()) > 90) And Left(sFolderName, 12) = "$ntuninstall" And Mid(sFolderName, 13, 2) = "kb" Or Mid(sFolderName, 13, 2) = "q" Then
sUpdateName = Mid(sFolderName, 13, Len(sFolderName) - 13)
oDictionary.Add sUpdateName, sFolderPath
End If
Next

For Each sUpdateName in oDictionary.Keys
sDeleted = sDeleted & vbCrLF & sUpdateName
sFolderPath = oDictionary.Item(sUpdateName)
On Error Resume Next
oShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & sUpdateName & "\"
oShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Management\ARPCache\" & sUpdateName & "\"
On Error Goto 0
oShell.Run "%ComSpec% /C RD /S /Q " & Chr(34) & sFolderPath & Chr(34), 0, True
Next
'If Len(sDeleted) > 0 Then
' MsgBox "The uninstall data for the following updates are now removed:" & vbCrLf & UCase(sDeleted), vbOKOnly + vbInformation, "Files Removed"
' sDeleted = vbNullString
'Else
' MsgBox "No Windows Update Folders found for removal", vbOKOnly + vbInformation, "Nothing To Do"
'End If
o.Quit 0

SCRIPT: Create a folder in every homedirectory

Last week i needed to create a folder in the home directory of every user. I used a simple batch script to accomplish this:
@echo off
REM
H:
for /F "usebackq delims==" %%i in (`dir *.* /B`) DO md "H:\%%i\favorites

SCRIPT: Change Provider Order Windows XP

For my unattended XP installation i was searching for a script which could easily change the provider order. My cutomers use the Novell client a lot, but i want the Microsoft Client to be used first. Here’s the great script created by Anders Olsson, Kentor Teknik AB. Thanx for the great work man!!


' ChangeProviderOrder.vbs, by Anders Olsson, Kentor Teknik AB, 2006-10-31
'
' Reads the "Network provider order" from the registry and reorders it putting
' the "Microsoft Windows Networking" provider on top.
'
' Example: Before - "NCredMgr,NetwareWorkstation,RDPNP,LanmanWorkstation,WebClient"
' would become "LanmanWorkstation,NCredMgr,NetwareWorkstation,RDPNP,WebClient" after
' running this script.
'
Set WshShell = WScript.CreateObject("WScript.Shell")

' Read the reg value of the providers
strKey = WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\ProviderOrder")

' Split the strings up using comma (ASCII #44) as the delimiter
arrProvs = Split(strKey, chr(44), -1, 1)

' If LanmanWorkstation is already first, we don't have to do anything
If arrProvs(0) = "LanmanWorkstation" Then
Wscript.Quit(0)
end if

' "LanmanWorkstation" should always start the string
strNewProvs = "LanmanWorkstation"

' Loop through the old provider strings, and add them to the new string. Don't
' write LanmanWorkstation, since it's already written at the start of the string.
For Each strProv In arrProvs
Select Case strProv
Case "LanmanWorkstation"
Case Else strNewProvs = strNewProvs & "," & strProv
End Select
Next

' Write the new string back to the registry
WshShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\ProviderOrder", strNewProvs, "REG_SZ"

Installshield command line switches

All about InstallShield command line switches

InstallShield Command Line Switches

Special Installation Modes
/a : Administrative installation
/j : Advertise mode
/x : Uninstall mode
/uninst : Uninstall product (Standard projects only)

Silent Installations
/p : Specify password
/r : Record mode (Standard projects only)
/s : Silent mode
/f1 : Specify alternative response file name (Standard projects only)
/f2 : Specify alternative log file name (Standard projects only)

SMS Data
/m : Generate MIF file (Standard projects only)
/m1 : Specify serial number in MIF file (Standard projects only)
/m2 : Specify locale string in MIF file (Standard projects only)

Download and Cache Locations
/ua : Specify URL for InstMsiA.exe
/uw : Specify URL for InstMsiW.exe
/us : Specify URL to ISScript.msi
/um : Specify URL to .msi package
/b : Cache installation locally
Passing Data to the Installation
/v : pass arguments to Msiexec
/z : Pass arguments to CMDLINE variable

Debugging
/d : Debug InstallScript (Standard projects only)
/verbose : Generate verbose InstallScript engine log file (Standard projects only)

Miscellaneous
/f : Specify alternative compiled script (Standard projects only)
/L : Setup language
/w : Wait
/SMS : Wait (Standard projects only)

Information gathered from:
http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q105472&sliceId=
&
http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q105473&sliceId=