SCCM Client 32bit Client Stopping Registry Keys In SYSWOW64 Context Only Using SYSNATIVE

Background

I use SCCM, Operating System Deployment (OSD) and Microsoft Deployment Toolkit (MDT) 2010 update 1 to deploy Windows 7 SP1 (x64) and application installs during the build process.  The problem was a .vbs script which populates some auto-logon keys called via SCCM OSD during the application installation process was being hit with registry redirection, forcing any registry entries to go into
HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\WinLogon
rather than HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon. Continue reading

C# .NET Datagrid – Events Don’t Trigger For Check Boxes Within A DataGrid

Background

I had a datagrid which contains a check box in column one. I wanted to trigger an event when any of the check boxes in column one were selected within the datagrid. This should be quite easy to achieve using the CellValueChanged event, however this would only fire on clicking the check box before the check (tick) had appeared. This would mean that when enumerating each line the check box would still not have a checked item and therefore this would not be what I had expected.

Solution

I found that in addition to the CellValueChanged event I needed to also have an event Cell_ContactClick as below

private void dataGridViewMain_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
    this.dataGridViewMain.CommitEdit(DataGridViewDataErrorContexts.Commit);
}

I assume CommitEdit states that I have finished editing, now commit the changes straight away and therefore the CellValueChanged is fired again after the check mark has had a chance to appeared in the check box., after which my enumerating each line for a check box would work.

VBScript – Passing Named Arguments

I am always forgetting this so I have posted it so I can refer back to this when needed.  Sometimes via a command line you want to be able to pass command line parameters to a vbscript. e.g.

cscript.exe myscript.vbs /Parameter:value

The vbscript to handle this is as follow:

Option Explicit
Dim colNamedArguments

Set colNamedArguments = Wscript.Arguments.Named
If colNamedArguments.Exists("Parameter") Then
    Wscript.echo "Parameter Exists!"
    Wscript.echo "Parameter = " & _
         colNamedArguments.Item("Parameter")
End If

For more information see the following microsoft article :  http://technet.microsoft.com/en-us/library/ee156618.aspx