<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cluberti.com</title>
	<atom:link href="http://www.cluberti.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cluberti.com/blog</link>
	<description>Random bits of flair pinned to the internet</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:41:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Internet Explorer 8 uninstalls itself if setup is run a second time?</title>
		<link>http://www.cluberti.com/blog/2010/07/29/internet-explorer-8-uninstalls-itself-if-setup-is-run-a-second-time/</link>
		<comments>http://www.cluberti.com/blog/2010/07/29/internet-explorer-8-uninstalls-itself-if-setup-is-run-a-second-time/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 16:36:00 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/2010/07/29/internet-explorer-8-uninstalls-itself-if-setup-is-run-a-second-time/</guid>
		<description><![CDATA[I’ve stumbled across a rather odd issue where users were starting to complain that all of the sudden they were running a previous version of IE again, even though IE8 had been installed previously in the environment.  Also, they were complaining that when starting IE, it would simply close right after the UI was displayed.  [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve stumbled across a rather odd issue where users were starting to complain that all of the sudden they were running a previous version of IE again, even though IE8 had been installed previously in the environment.  Also, they were complaining that when starting IE, it would simply close right after the UI was displayed.  In troubleshooting the issue, we went back and looked at the IE8*.log files and found out that IE8’s setup had been run twice on these machines for some reason (still haven’t figured out why yet – that’s for another day), and had uninstalled IE8 during the second run of the installer!</p>
<p>To see if I could repro this, I built up a set of test VMs running XP SP3 in the environment and installed IE8 in the IE6 and IE7 test VMs, and as expected in both cases I had IE8 installed after the reboot.  I then re-ran the IE8 setup, and it gave me a very odd message – that it was removing “a previous version of Internet Explorer”, rather than trying to install again.  It rebooted the machine after this “removal” finished, and then after logging in as Administrator after the reboot, the IE8 setup continued and installed IE8 again.</p>
<p>Curious now, I recreated the XP SP3 VMs, creating a non-administrative user this time along with the standard Administrator account.  I ran IE8 setup, and as expected I had IE8 installed after the reboot.  I re-ran the IE8 setup, and got the same “removing a previous version of Internet Explorer” message, along with the reboot of the machine after that finished.  At this point, IE on the VM had probably been reverted back to the previously installed version of IE prior to IE8, so I logged on with a non-administrative account to see if the IE8 installation would be retried, and it was not.  Also, the machine had a previous IE6 or IE7 version installed, but any time a user went to open it IE would immediately crash.  Administrators could open IE, but it would not browse to any sites at all (internal or external).</p>
<p>We tried to replicate this on Vista, just to see if it was affecting our Vista users, and it did not repro – instead, when IE8’s setup was run a second time, we got a message that setup had found that the version of IE installed was equal or greater to the version attempting to be installed and that installation would not continue in the IE8.log file.  After debugging the setup further, it appears that because the setup engine on Vista is using WUSA it can’t rollback from IE8, so it logs the warning.</p>
<p>I can’t imagine many people are going to ever run across this in their environments, but it took a good amount of time to figure this out, so I’ll throw this out there so if someone *does* ever run into this, they don’t lose the amount of blood I did while hitting my head against the proverbial wall.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2010/07/29/internet-explorer-8-uninstalls-itself-if-setup-is-run-a-second-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress upgraded to 3.0</title>
		<link>http://www.cluberti.com/blog/2010/07/22/wordpress-upgraded-to-3-0/</link>
		<comments>http://www.cluberti.com/blog/2010/07/22/wordpress-upgraded-to-3-0/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 05:26:02 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/?p=131</guid>
		<description><![CDATA[The upgrade was not a painless process, and I had to hack my site back together after the upgrade.  If you run into any issues, let me know.]]></description>
			<content:encoded><![CDATA[<p>The upgrade was not a painless process, and I had to hack my site back together after the upgrade.  If you run into any issues, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2010/07/22/wordpress-upgraded-to-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vacation over, back to work</title>
		<link>http://www.cluberti.com/blog/2010/07/19/vacation-over-back-to-work/</link>
		<comments>http://www.cluberti.com/blog/2010/07/19/vacation-over-back-to-work/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 20:01:56 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/?p=128</guid>
		<description><![CDATA[OK, vacation&#8217;s over.  Back to work, but enjoyed the time off.  Hopefully I&#8217;ll get something useful up here again soon, but so far I&#8217;ve not come across anything useful enough to post about recently.  Oh well, guess those are the lazy days of summer for you!]]></description>
			<content:encoded><![CDATA[<p>OK, vacation&#8217;s over.  Back to work, but enjoyed the time off.  Hopefully I&#8217;ll get something useful up here again soon, but so far I&#8217;ve not come across anything useful enough to post about recently.  Oh well, guess those are the lazy days of summer for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2010/07/19/vacation-over-back-to-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PageFile vbs for Vista/Win7 systems (may work on XP/2003, not tested)</title>
		<link>http://www.cluberti.com/blog/2010/06/17/pagefile-vbs-for-vistawin7-systems-may-work-on-xp2003-not-tested/</link>
		<comments>http://www.cluberti.com/blog/2010/06/17/pagefile-vbs-for-vistawin7-systems-may-work-on-xp2003-not-tested/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 15:24:15 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/?p=123</guid>
		<description><![CDATA[Wrote up a very small vbscript to handle paging file creation/deletion/modification on Vista/Win7 systems (as PageFileConfig.vbs doesn&#8217;t exist inbox, and it didn&#8217;t have the ability to handle some of the situations that can arise during setup), and it ended up morphing into this.  Figured I&#8217;d save someone the time if they had a need for [...]]]></description>
			<content:encoded><![CDATA[<p>Wrote up a very small vbscript to handle paging file creation/deletion/modification on Vista/Win7 systems (as PageFileConfig.vbs doesn&#8217;t exist inbox, and it didn&#8217;t have the ability to handle some of the situations that can arise during setup), and it ended up morphing into this.  Figured I&#8217;d save someone the time if they had a need for it, so here it is:</p>
<p><span style="font-family: Consolas;">
<pre class="brush: vb;">
'// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// NAME:        setpagefile.vbs
'//
'// Original:    http://www.cluberti.com/blog
'// Last Update: 16th June 2010
'//
'// Comment:     VBS example file for use in configuring the paging file on Windows
'//
'// NOTE:        Provided as-is - usage of this source assumes that you are at the
'//              very least familiar with the vbscript language being used and
'//              the tools used to create and debug this file.
'//
'//              In other words, if you break it, you get to keep the pieces.
'//
'// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Option Explicit
Dim strComputer, strPageFileSizeInput, strPageFileNameInput, strInput
Dim objWMIService, objStaticPageFileItem, objDynamicPageFileItem, objShellApp
Dim colStaticPageFileItems, colDynamicPageFileItems, isRunning, execOutput, gErrData, bRebootNeeded, bNoStaticPageFile, bNoPageFile

'// Ensure that cscript is the engine used to run this script:
RunMeWithCScript()

On Error Resume Next

'// Configure our variables:
strComputer = &quot;.&quot;
bRebootNeeded = False
bNoStaticPageFile = True
bNoPageFile = True

Set objShellApp = CreateObject(&quot;WScript.Shell&quot;)
Set objWMIService = GetObject(&quot;winmgmts:\\&quot; &amp; strComputer &amp; &quot;\root\CIMV2&quot;)
'// Win32_PageFile is deprecated - it still (mostly) works, but Win32_PageFileSetting is not deprecated, so use that:
Set colStaticPageFileItems = objWMIService.ExecQuery(&quot;SELECT * FROM Win32_PageFileSetting&quot;,,48)
Set colDynamicPageFileItems = objWMIService.ExecQuery(&quot;SELECT * FROM Win32_PageFileUsage&quot;,,48)

'// Execute the ChangePagingFile sub:
ChangePagingFile()

'// Check execution of ChangePagingFile(), and handle when &quot;system managed&quot; is set, or no paging file exists:
If bRebootNeeded = True Then
    RebootSystem()
Else
    '// Can't use WMI to create a paging file when it is &quot;system managed&quot; or none exists - handle this condition:
    If bNoStaticPageFile = True Then
        CheckForDynamicPagingFile()
        If bNoPageFile = False Then
            WScript.Quit
        Else
            If bNoPageFile = True Then
                WScript.Echo &quot;No paging file found.&quot;
                WScript.Echo &quot;&quot;
                strPageFileNameInput = UserInput(&quot;Enter new pagefile name (full path and filename) - leave blank to use C:\pagefile.sys: &quot;)
                strPageFileSizeInput = UserInput(&quot;Enter new pagefile size (in MB) - leave blank to keep the system with no paging file:  &quot;)
               
                '// Check to see if the user left the input blank, otherwise set up a paging file:
                If Not strPageFileSizeInput = &quot;&quot; Then
                    If strPageFileNameInput = &quot;&quot; Then
                        strPageFileNameInput = &quot;C:\pagefile.sys&quot;
                    End If
                    WScript.Echo &quot;New pagefile file will be: &quot; &amp; strPageFileNameInput
                    WScript.Echo &quot;New pagefile size will be: &quot; &amp; strPageFileSizeInput &amp; &quot;MB&quot;
                    bNoStaticPageFile = False
                   
                    '// Change the registry to add paging file information:
                    objShellApp.Exec(&quot;reg add &quot;&quot;HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management&quot;&quot; /v PagingFiles /t REG_MULTI_SZ /d &quot;&quot;&quot; &amp; strPageFileNameInput &amp; &quot; &quot; &amp; strPageFileSizeInput &amp; &quot; &quot; &amp; strPageFileSizeInput &amp; &quot;&quot;&quot; /f&quot;)
                   
                    '// Check the return to make sure we succeeded - otherwise, tell the user why we didn't:
                    If Not Err.Number = 0 Then
                        gErrData = gErrData &amp; vbCrLf &amp; &quot;Error writing to registry - reason: &quot; &amp; Err.Number &amp; &quot;  - &quot; &amp; Err.Description
                        WScript.Echo gErrData
                        Err.Clear
                    Else
                        WScript.Echo &quot;Registry edit to add &quot; &amp; strPageFileNameInput &amp; &quot; as size &quot; &amp; strPageFileSizeInput &amp; &quot;MB was successful.&quot;
                        bRebootNeeded = True
                    End If
               
                '// If we've made changes that have succeeded, we need to reboot - otherwise, do nothing:
                    If bRebootNeeded = True Then
                        RebootSystem()
                    Else
                        WScript.Echo &quot;No changes made that require a reboot.  Exiting script.&quot;
                    End If
                Else
                    WScript.Echo &quot;You have elected to continue with no paging file.  Exiting script.&quot;
                End If
            Else
                WScript.Echo &quot;No changes made that require a reboot.  Exiting script.&quot;
            End If
        End If
    End If
End If
Sub ChangePagingFile()
    For Each objStaticPageFileItem In colStaticPageFileItems
        '// There's a static paging file - use WMI to make changes:
        bNoStaticPageFile = False
        bNoPageFile = False
       
        WScript.Echo &quot; --------------------------&quot;
        WScript.Echo &quot;  Current PageFile Details&quot;
        WScript.Echo &quot; --------------------------&quot;
        WScript.Echo &quot;Name:                &quot; &amp; objStaticPageFileItem.Name
        WScript.Echo &quot;InitialSize:         &quot; &amp; objStaticPageFileItem.InitialSize
        WScript.Echo &quot;MaximumSize:         &quot; &amp; objStaticPageFileItem.MaximumSize
        WScript.Echo &quot;&quot;
       
        '// Get user input:
        strInput = UserInput(&quot;Enter new pagefile size (in MB) - leave blank to delete existing paging file: &quot;)
       
        '// If the user entered a value, configure the new paging file size:
        If Not strInput = &quot;&quot; Then
        WScript.Echo &quot;New pagefile size will be: &quot; &amp; strInput &amp; &quot;MB&quot;
            WScript.Echo &quot;&quot;
           
            objStaticPageFileItem.InitialSize = strInput
            objStaticPageFileItem.MaximumSize = strInput
            objStaticPageFileItem.Put_
            bRebootNeeded = True
           
            WScript.Echo &quot; --------------------------&quot;
            WScript.Echo &quot;    New PageFile Details&quot;
            WScript.Echo &quot; --------------------------&quot;
            WScript.Echo &quot;Name:                &quot; &amp; objStaticPageFileItem.Name
            WScript.Echo &quot;InitialSize:         &quot; &amp; objStaticPageFileItem.InitialSize
            WScript.Echo &quot;MaximumSize:         &quot; &amp; objStaticPageFileItem.MaximumSize
            WScript.Echo &quot;&quot;
            WScript.Echo &quot;A reboot is needed for this change to take effect.&quot;
       
        '// If the user left the input blank, delete the paging file - note that Delete and DeleteEx from Win32_PagingFile are deprecated, and
        '// while they'll return 0 on Windows 7, they don't actually delete the paging file.  Using reg add instead, as it works just fine:
        Else
            WScript.Echo &quot;Deleting paging file: &quot; &amp; objStaticPageFileItem.Name
            objShellApp.Exec(&quot;reg add &quot;&quot;HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management&quot;&quot; /v PagingFiles /t REG_MULTI_SZ /d &quot;&quot;&quot;&quot; /f&quot;)
           
            '// Check the return to make sure we succeeded - otherwise, tell the user why we didn't:
            If Not Err.Number = 0 Then
                gErrData = gErrData &amp; vbCrLf &amp; &quot;Error writing to registry - reason: &quot; &amp; Err.Number &amp; &quot;  - &quot; &amp; Err.Description
                WScript.Echo gErrData
                Err.Clear
            Else
                WScript.Echo &quot;Registry edit to remove &quot; &amp; objStaticPageFileItem.Name &amp; &quot; was successful.&quot;
                bRebootNeeded = True
            End If
        End If
    Next
End Sub
Sub CheckForDynamicPagingFile()
    For Each objDynamicPageFileItem In colDynamicPageFileItems
        '// There's a paging file - use WMI to make changes:
        bNoPageFile = False
       
        WScript.Echo &quot;Paging file is configured for 'System managed size'&quot;
        WScript.Echo &quot;&quot;

        WScript.Echo &quot; --------------------------&quot;
        WScript.Echo &quot;  Current PageFile Details&quot;
        WScript.Echo &quot; --------------------------&quot;
        WScript.Echo &quot;Name:                &quot; &amp; objDynamicPageFileItem.Name
        WScript.Echo &quot;Size:                &quot; &amp; objDynamicPageFileItem.AllocatedBaseSize
        WScript.Echo &quot;Current Usage:       &quot; &amp; objDynamicPageFileItem.CurrentUsage
        WScript.Echo &quot;&quot;
       
        WScript.Echo &quot;&quot;
        strPageFileNameInput = UserInput(&quot;Enter new pagefile name (full path and filename) - leave blank to use C:\pagefile.sys: &quot;)
        strPageFileSizeInput = UserInput(&quot;Enter new pagefile size (in MB) - leave blank to remove the paging file:               &quot;)
       
        '// Check to see if the user left the input blank, otherwise set up a paging file:
        If Not strPageFileSizeInput = &quot;&quot; Then
            If strPageFileNameInput = &quot;&quot; Then
                strPageFileNameInput = &quot;C:\pagefile.sys&quot;
            End If
            WScript.Echo &quot;New pagefile file will be: &quot; &amp; strPageFileNameInput
            WScript.Echo &quot;New pagefile size will be: &quot; &amp; strPageFileSizeInput &amp; &quot;MB&quot;
            bNoStaticPageFile = False
           
            '// Change the registry to add paging file information:
            objShellApp.Exec(&quot;reg add &quot;&quot;HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management&quot;&quot; /v PagingFiles /t REG_MULTI_SZ /d &quot;&quot;&quot; &amp; strPageFileNameInput &amp; &quot; &quot; &amp; strPageFileSizeInput &amp; &quot; &quot; &amp; strPageFileSizeInput &amp; &quot;&quot;&quot; /f&quot;)
               
                '// Check the return to make sure we succeeded - otherwise, tell the user why we didn't:
                If Not Err.Number = 0 Then
                    gErrData = gErrData &amp; vbCrLf &amp; &quot;Error writing to registry - reason: &quot; &amp; Err.Number &amp; &quot;  - &quot; &amp; Err.Description
                    WScript.Echo gErrData
                    Err.Clear
                Else
                    WScript.Echo &quot;Registry edit to add &quot; &amp; strPageFileNameInput &amp; &quot; as size &quot; &amp; strPageFileSizeInput &amp; &quot;MB was successful.&quot;
                    bRebootNeeded = True
                End If
           
            '// If we've made changes that have succeeded, we need to reboot - otherwise, do nothing:
            If bRebootNeeded = True Then
                RebootSystem()
                WScript.Quit
            Else
                WScript.Echo &quot;No changes made that require a reboot.  Exiting script.&quot;
                WScript.Quit
            End If
       
        '// If the user left the input blank, delete the paging file - note that Delete and DeleteEx from Win32_PagingFile are deprecated, and
        '// while they'll return 0 on Windows 7, they don't actually delete the paging file.  Using reg add instead, as it works just fine:
        Else
            WScript.Echo &quot;Deleting paging file: &quot; &amp; objDynamicPageFileItem.Name
            objShellApp.Exec(&quot;reg add &quot;&quot;HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management&quot;&quot; /v PagingFiles /t REG_MULTI_SZ /d &quot;&quot;&quot;&quot; /f&quot;)
           
            '// Check the return to make sure we succeeded - otherwise, tell the user why we didn't:
            If Not Err.Number = 0 Then
                gErrData = gErrData &amp; vbCrLf &amp; &quot;Error writing to registry - reason: &quot; &amp; Err.Number &amp; &quot;  - &quot; &amp; Err.Description
                WScript.Echo gErrData
                Err.Clear
            Else
                WScript.Echo &quot;Registry edit to remove &quot; &amp; objDynamicPageFileItem.Name &amp; &quot; was successful.&quot;
                bRebootNeeded = True
            End If
        End If
    Next
End Sub
Sub RebootSystem()
    WScript.Echo &quot;The system will reboot in 5 seconds...&quot;
    Set isRunning = objShellApp.Exec(&quot;shutdown /r /t 5 /f /d p:2:4&quot;)
    '// As long as shutdown.exe is running, wait:
    Do While isRunning.Status = 0
        WScript.Sleep 100
        execOutput = isRunning.StdOut.ReadAll
    Loop
End Sub
Function UserInput(strInput)
    WScript.StdOut.Write strInput &amp; &quot; &quot;
    UserInput = WScript.StdIn.ReadLine
End Function
On Error GoTo 0
Sub RunMeWithCScript()
    Dim ScriptEngine, engineFolder, Args, arg, scriptName, argString, scriptCommand
   
    ScriptEngine = UCase(Mid(WScript.FullName, InstrRev(WScript.FullName, &quot;\&quot;) + 1))
    engineFolder = Left(WScript.FullName, InstrRev(WScript.FullName, &quot;\&quot;))
    argString = &quot;&quot;
   
    If ScriptEngine = &quot;WSCRIPT.EXE&quot; Then
        Dim Shell
        Set Shell = CreateObject(&quot;WScript.Shell&quot;)
        Set Args = WScript.Arguments
       
        For Each arg in Args
            If InStr(arg, &quot; &quot;) &gt; 0 Then arg = &quot;&quot;&quot;&quot; &amp; arg &amp; &quot;&quot;&quot;&quot;
            argString = argString &amp; &quot; &quot; &amp; Arg
        Next
       
        scriptCommand = &quot;cmd.exe /k &quot; &amp; engineFolder &amp; &quot;cscript.exe &quot;&quot;&quot; &amp; WScript.ScriptFullName &amp; &quot;&quot;&quot;&quot; &amp; argString
       
        Shell.Run scriptCommand, , False
        WScript.Quit
    Else
        Exit Sub
    End If
End Sub
</pre>
<p> </p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2010/06/17/pagefile-vbs-for-vistawin7-systems-may-work-on-xp2003-not-tested/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SCCM 2007 client certificate issues with 2008 R2 CA</title>
		<link>http://www.cluberti.com/blog/2010/05/24/sccm-2007-client-certificate-issues-with-2008-r2-ca/</link>
		<comments>http://www.cluberti.com/blog/2010/05/24/sccm-2007-client-certificate-issues-with-2008-r2-ca/#comments</comments>
		<pubDate>Mon, 24 May 2010 16:12:49 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/?p=119</guid>
		<description><![CDATA[Microsoft supports running SCCM 2007 SP2 on a 2008 R2 server, but I&#8217;m doubting whether or not running SCCM 2007 SP2 in Native mode in an environment using a 2008 R2 CA is supported (and if so, there&#8217;s an issue to be aware of).  Specifically, it seems like client certificates created with a 2008 R2 CA [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft supports running SCCM 2007 SP2 on a 2008 R2 server, but I&#8217;m doubting whether or not running SCCM 2007 SP2 in Native mode in an environment using a 2008 R2 CA is supported (and if so, there&#8217;s an issue to be aware of).  Specifically, it seems like client certificates created with a 2008 R2 CA (following the <a href="http://technet.microsoft.com/en-us/library/cc872789.aspx" target="_blank">instructions on Technet</a> for a 2008 CA) do not work by default in SCCM 2007 when running a site in Native mode (you&#8217;ll get MP errors stating that it cannot connect via HTTP, and mpcontrol.log will contain errors that the SAN2 fields have errors).  It seems if you create your 2008 R2 CA with the default Key store provider, the client certificates just do not work.  However, if you create your 2008 R2 CA with the Microsoft Strong cryptography provider (which is the default for 2003 and 2008 CAs), magically the certs created work fine.  If you look at the contents of the certs created between a 2008 and 2008 R2 CA, they &#8220;look&#8221; identical, but something else must be happening I haven&#8217;t dug into yet.</p>
<p>I don&#8217;t know if a 2008 R2 CA is technically supported for use with 2007 SCCM certificates, but for those of you who are doing this, be aware that how you set up your CA on it&#8217;s initial install will determine if your client certificates work properly or not.  There are workarounds, of course, for those few of you who are already running 2008 R2 CAs from a default installation - in the Site Mode tab of the Site properties, you can change the &#8220;If multiple certificates match criteria:&#8221; from &#8220;Fail selection and send error message&#8221; to &#8220;Select any certificate that matches&#8221;, and set &#8220;Certificate criteria:&#8221; to &#8220;Check only certificate purpose&#8221;.  Doing this allows the MP communications to start up again, although I&#8217;m not sure of the potential risks (if any) that are taken if you allow this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2010/05/24/sccm-2007-client-certificate-issues-with-2008-r2-ca/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Server 2008 Storage Server default Administrator password</title>
		<link>http://www.cluberti.com/blog/2010/04/09/windows-server-2008-storage-server-default-administrator-password/</link>
		<comments>http://www.cluberti.com/blog/2010/04/09/windows-server-2008-storage-server-default-administrator-password/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 00:18:20 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/2010/04/09/windows-server-2008-storage-server-default-administrator-password/</guid>
		<description><![CDATA[I finally got around to downloading Storage Server 2008 for some hyper-v / iscsi tests I am working on, and after installing Storage Server it did not ask for me to create a password like other Server 2008 / Server 2008 R2 server installs do on first boot.  It appears the default password is “wSS2008!” [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got around to downloading Storage Server 2008 for some hyper-v / iscsi tests I am working on, and after installing Storage Server it did not ask for me to create a password like other Server 2008 / Server 2008 R2 server installs do on first boot.  It appears the default password is “<strong>wSS2008!</strong>” (minus the quotes, of course).  I found it from a bing search, <a href="http://resume.jimmarch.com/2009/05/windows-storage-server-2008-rc-default-password/" target="_blank">here</a>.  I figured maybe someone else will run across it and read this, and not have to resort to using DaRT to reset the password offline as I did.</p>
<p>Obviously, if you&#8217;re using SS 2008, you&#8217;ll want to change this password anyway &#8211; not sure why this was done this way, but it was.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2010/04/09/windows-server-2008-storage-server-default-administrator-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KB974417 installation failure</title>
		<link>http://www.cluberti.com/blog/2010/04/07/kb974417-installation-failure/</link>
		<comments>http://www.cluberti.com/blog/2010/04/07/kb974417-installation-failure/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 19:35:19 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/2010/04/07/kb974417-installation-failure/</guid>
		<description><![CDATA[OK, ran across this today, and there are a few ways to fix it.  The most time-consuming way (but seems to me to be the least invasive) is to remove 976569 and 976570, install 974417 (reboot), and then re-install 976569 and 976570.  I do not know what it is about those two updates that seems [...]]]></description>
			<content:encoded><![CDATA[<p>OK, ran across <a href="https://blogs.msdn.com/smondal/archive/2010/04/06/none-of-the-products-that-are-addressed-by-this-software-update-are-installed-on-this-computer-click-cancel-to-exit-setup.aspx" target="_blank">this</a> today, and there are a few ways to fix it.  The most time-consuming way (but seems to me to be the least invasive) is to remove 976569 and 976570, install 974417 (reboot), and then re-install 976569 and 976570.  I do not know what it is about those two updates that seems to cause the failure, but since I’m building images I don’t really care either – the workaround “fixes” it well enough for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2010/04/07/kb974417-installation-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2 Windows 7 Rollouts happening at once &#8211; posting delayed</title>
		<link>http://www.cluberti.com/blog/2010/02/19/2-windows-7-rollouts-happening-at-once-posting-delayed/</link>
		<comments>http://www.cluberti.com/blog/2010/02/19/2-windows-7-rollouts-happening-at-once-posting-delayed/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 20:21:58 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/2010/02/19/2-windows-7-rollouts-happening-at-once-posting-delayed/</guid>
		<description><![CDATA[I’ve been fairly silent recently, and the reason is I’m involved in rollouts of Win7, Server 2008 R2, Exchange 2010, SCCM 2007 R2, and Office 2007 with 2 distinct organizations (not to mention the movement of physical to hyper-v servers at the same time).  I’ll probably blog something about this later, but I wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been fairly silent recently, and the reason is I’m involved in rollouts of Win7, Server 2008 R2, Exchange 2010, SCCM 2007 R2, and Office 2007 with 2 distinct organizations (not to mention the movement of physical to hyper-v servers at the same time).  I’ll probably blog something about this later, but I wanted to give <a href="http://www.windows-noob.com">http://www.windows-noob.com</a> some credit for getting me “unstuck” when the Microsoft documentation is lacking on SCCM 2007.  Bravo <img src='http://www.cluberti.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2010/02/19/2-windows-7-rollouts-happening-at-once-posting-delayed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Computer Info VBScript</title>
		<link>http://www.cluberti.com/blog/2009/12/26/computer-info-vbscript/</link>
		<comments>http://www.cluberti.com/blog/2009/12/26/computer-info-vbscript/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 04:17:46 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/2009/12/26/computer-info-vbscript/</guid>
		<description><![CDATA[EDIT 9th January 2010 &#8211; the script has gone a fairly major revision due to changes in the Office 2010 product key storage location, as well as migrating this to a class-based script for speed. Again, another side project – a computer info VBScript. I’ve modified it a bit to output information to screen (execute [...]]]></description>
			<content:encoded><![CDATA[<p>EDIT 9th January 2010 &#8211; the script has gone a fairly major revision due to changes in the Office 2010 product key storage location, as well as migrating this to a class-based script for speed.</p>
<p>Again, another side project – a computer info VBScript.  I’ve modified it a bit to output information to screen (execute with cscript from a cmd prompt), but this could be modified to do a lot more.  This is just a simple script template, and as usual I’m posting here for consumption in the event anyone finds this useful:</p>
<pre class="brush: vb;">
'// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// NAME:        osinfo.vbs
'//
'// Original:    http://www.cluberti.com/blog
'// Last Update: 15th January 2010
'//
'// Comment:     VBS example file for use as an OS info gathering template.
'//
'// NOTE:        Provided as-is - usage of this source assumes that you are at the
'//              very least familiar with the vbscript language being used and
'//              the tools used to create and debug this file.
'//
'//              In other words, if you break it, you get to keep the pieces.
'//
'//              Also, if you want to use this on W2K, prepare to hack, as this
'//              was really designed with XP+ systems in mind.
'//
'// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// This script will require elevated privileges if run from a non-admin account, so
'// calling the ElevateThisScript() Sub should get the script a full admin token. This is
'// currently disabled, but if you need non-admin users to run this script, enable the
'// call to this subroutine to pop-up a dialog box (they'll of course need administrative
'// credentials to put in the challenge dialog before the script will execute with an
'// administrative token):

Dim ScriptHelper
Set ScriptHelper = New ScriptHelperClass

ScriptHelper.RunMeWithCScript()
'ScriptHelper.ElevateThisScript()

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables and WMI connections for scripting against:

strComputer = ScriptHelper.Network.ComputerName

CONST HKEY_CLASSES_ROOT  = &amp;H80000000
CONST HKEY_CURRENT_USER  = &amp;H80000001
CONST HKEY_LOCAL_MACHINE = &amp;H80000002
CONST HKEY_USERS         = &amp;H80000003
CONST KEY_QUERY_VALUE      = 1
CONST KEY_SET_VALUE          = 2
CONST SEARCH_KEY = &quot;DigitalProductID&quot;

Dim arrSubKeys(4,1)
Dim foundKeys
Dim iValues, arrDPID
foundKeys = Array()
iValues = Array()
arrSubKeys(0,0) = &quot;Windows PID Key:       &quot;
arrSubKeys(0,1) = &quot;SOFTWARE\Microsoft\Windows NT\CurrentVersion&quot;
arrSubKeys(2,0) = &quot;Office XP PID Key:     &quot;
arrSubKeys(2,1) = &quot;SOFTWARE\Microsoft\Office\10.0\Registration&quot;
arrSubKeys(1,0) = &quot;Office 2003 PID Key:   &quot;
arrSubKeys(1,1) = &quot;SOFTWARE\Microsoft\Office\11.0\Registration&quot;
arrSubKeys(3,0) = &quot;Office 2007 PID Key:   &quot;
arrSubKeys(3,1) = &quot;SOFTWARE\Microsoft\Office\12.0\Registration&quot;
arrSubKeys(4,0) = &quot;Office 2010 PID Key:   &quot;

Arch = &quot;&quot;
Sku = &quot;&quot;

Set colOSItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_OperatingSystem&quot;,,48)

Set colProcItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_Processor&quot;,,48)

Set colCompSysItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_ComputerSystem&quot;,,48)

Set colTZItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_TimeZone&quot;,,48)

Set colCompSysProdItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_ComputerSystemProduct&quot;,,48)

Set colBIOSItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_BIOS&quot;,,48)

Set colDiskItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_LogicalDisk&quot;,,48)

Set colNetAdapConfigItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_NetworkAdapterConfiguration&quot;,,48)

Set colVideoItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_VideoController&quot;,,48)

Set colSoundItems = ScriptHelper.WMI.ExecQuery( _
    &quot;SELECT * FROM Win32_SoundDevice&quot;,,48)

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// If Office 2010 is installed, find the Office 2010 registry key holding the ProductID:

Dim strKey, subkey, arrSubkeys2, strOfficeKey, strValue
strKey = &quot;SOFTWARE\Microsoft\Office\14.0\Registration&quot;

ScriptHelper.Registry.EnumKey HKEY_LOCAL_MACHINE, strKey, arrSubkeys2
If IsNull(arrSubkeys2) Then
    'Office 2010 not installed, skip it
    arrSubKeys(4,1) = &quot;&quot;
Else
    For Each subkey In arrSubkeys2
        ScriptHelper.Registry.GetBinaryValue HKEY_LOCAL_MACHINE, strKey &amp; &quot;\&quot; &amp; subkey, SEARCH_KEY, strValue
        If IsNull(strValue) Then
            strOfficeKey = &quot;&quot;
        Else
            strOfficeKey = strKey &amp; &quot;\&quot; &amp; subkey
            arrSubKeys(4,1) = strOfficeKey
        End If
    Next
End If

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Get OS SKU from Win32_OperatingSystem class:

    For Each objOSItem in colOSItems
    If objOSItem.BuildNumber =&gt; 6000 Then
        Arch = objOSItem.OSArchitecture

        Select Case objOSItem.OperatingSystemSKU
            Case 0 Sku = &quot;Unknown Windows version&quot;
            Case 1 Sku = &quot;Ultimate Edition&quot;
            Case 2 Sku = &quot;Home Basic Edition&quot;
            Case 3 Sku = &quot;Home Premium Edition&quot;
            Case 4 Sku = &quot;Enterprise Edition&quot;
            Case 5 Sku = &quot;Home Basic N Edition&quot;
            Case 6 Sku = &quot;Business Edition&quot;
            Case 7 Sku = &quot;Standard Server Edition&quot;
            Case 8 Sku = &quot;Datacenter Server Edition&quot;
            Case 9 Sku = &quot;Small Business Server Edition&quot;
            Case 10 Sku = &quot;Enterprise Server Edition&quot;
            Case 11 Sku = &quot;Starter Edition&quot;
            Case 12 Sku = &quot;Datacenter Server Core Edition&quot;
            Case 13 Sku = &quot;Standard Server Core Edition&quot;
            Case 14 Sku = &quot;Enterprise Server Core Edition&quot;
            Case 15 Sku = &quot;Enterprise Server Edition for Itanium-Based Systems&quot;
            Case 16 Sku = &quot;Business N Edition&quot;
            Case 17 Sku = &quot;Web Server Edition&quot;
            Case 18 Sku = &quot;Cluster Server Edition&quot;
            Case 19 Sku = &quot;Home Server Edition&quot;
            Case 20 Sku = &quot;Storage Express Server Edition&quot;
            Case 21 Sku = &quot;Storage Standard Server Edition&quot;
            Case 22 Sku = &quot;Storage Workgroup Server Edition&quot;
            Case 23 Sku = &quot;Storage Enterprise Server Edition&quot;
            Case 24 Sku = &quot;Server For Small Business Edition&quot;
            Case 25 Sku = &quot;Small Business Server Premium Edition&quot;
            Case Else
            Sku = &quot;Could Not Determine Operating System SKU&quot;
        End Select
    End If

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Get current OS locale setting from Win32_OperatingSystem class:

        Select Case objOSItem.Locale
            Case 0436 Locale = &quot;Afrikaans (South Africa)&quot;
            Case 041c Locale = &quot;Albanian (Albania)&quot;
            ' Case 045e Locale = &quot;Amharic (Ethiopia)&quot;
            Case 0401 Locale = &quot;Arabic (Saudi Arabia)&quot;
            Case 1401 Locale = &quot;Arabic (Algeria)&quot;
            Case 3c01 Locale = &quot;Arabic (Bahrain)&quot;
            Case 0c01 Locale = &quot;Arabic (Egypt)&quot;
            Case 0801 Locale = &quot;Arabic (Iraq)&quot;
            Case 2c01 Locale = &quot;Arabic (Jordan)&quot;
            Case 3401 Locale = &quot;Arabic (Kuwait)&quot;
            Case 3001 Locale = &quot;Arabic (Lebanon)&quot;
            Case 1001 Locale = &quot;Arabic (Libya)&quot;
            Case 1801 Locale = &quot;Arabic (Morocco)&quot;
            Case 2001 Locale = &quot;Arabic (Oman)&quot;
            Case 4001 Locale = &quot;Arabic (Qatar)&quot;
            Case 2801 Locale = &quot;Arabic (Syria)&quot;
            Case 1c01 Locale = &quot;Arabic (Tunisia)&quot;
            Case 3801 Locale = &quot;Arabic (U.A.E.)&quot;
            Case 2401 Locale = &quot;Arabic (Yemen)&quot;
            Case 042b Locale = &quot;Armenian (Armenia)&quot;
            Case 044d Locale = &quot;Assamese&quot;
            Case 082c Locale = &quot;Azeri (Cyrillic)&quot;
            Case 042c Locale = &quot;Azeri (Latin)&quot;
            Case 042d Locale = &quot;Basque&quot;
            Case 0423 Locale = &quot;Belarusian&quot;
            Case 0445 Locale = &quot;Bengali (India)&quot;
            Case 0845 Locale = &quot;Bengali (Bangladesh)&quot;
            Case 141A Locale = &quot;Bosnian (Bosnia/Herzegovina)&quot;
            Case 0402 Locale = &quot;Bulgarian&quot;
            Case 0455 Locale = &quot;Burmese&quot;
            Case 0403 Locale = &quot;Catalan&quot;
            Case 045c Locale = &quot;Cherokee (United States)&quot;
            Case 0804 Locale = &quot;Chinese (PRC)&quot;
            Case 1004 Locale = &quot;Chinese (Singapore)&quot;
            Case 0404 Locale = &quot;Chinese (Taiwan)&quot;
            Case 0c04 Locale = &quot;Chinese (Hong Kong SAR)&quot;
            Case 1404 Locale = &quot;Chinese (Macao SAR)&quot;
            Case 041a Locale = &quot;Croatian&quot;
            Case 101a Locale = &quot;Croatian (Bosnia/Herzegovina)&quot;
            Case 0405 Locale = &quot;Czech&quot;
            Case 0406 Locale = &quot;Danish&quot;
            Case 0465 Locale = &quot;Divehi&quot;
            Case 0413 Locale = &quot;Dutch (Netherlands)&quot;
            Case 0813 Locale = &quot;Dutch (Belgium)&quot;
            Case 0466 Locale = &quot;Edo&quot;
            Case 0409 Locale = &quot;English (United States)&quot;
            Case 0809 Locale = &quot;English (United Kingdom)&quot;
            Case 0c09 Locale = &quot;English (Australia)&quot;
            Case 2809 Locale = &quot;English (Belize)&quot;
            Case 1009 Locale = &quot;English (Canada)&quot;
            Case 2409 Locale = &quot;English (Caribbean)&quot;
            Case 3c09 Locale = &quot;English (Hong Kong SAR)&quot;
            Case 4009 Locale = &quot;English (India)&quot;
            Case 3809 Locale = &quot;English (Indonesia)&quot;
            Case 1809 Locale = &quot;English (Ireland)&quot;
            Case 2009 Locale = &quot;English (Jamaica)&quot;
            Case 4409 Locale = &quot;English (Malaysia)&quot;
            Case 1409 Locale = &quot;English (New Zealand)&quot;
            Case 3409 Locale = &quot;English (Philippines)&quot;
            Case 4809 Locale = &quot;English (Singapore)&quot;
            Case 1c09 Locale = &quot;English (South Africa)&quot;
            Case 2c09 Locale = &quot;English (Trinidad)&quot;
            Case 3009 Locale = &quot;English (Zimbabwe)&quot;
            Case 0425 Locale = &quot;Estonian&quot;
            Case 0438 Locale = &quot;Faroese&quot;
            Case 0429 Locale = &quot;Farsi&quot;
            Case 0464 Locale = &quot;Filipino&quot;
            Case 040b Locale = &quot;Finnish&quot;
            Case 040c Locale = &quot;French (France)&quot;
            Case 080c Locale = &quot;French (Belgium)&quot;
            Case 2c0c Locale = &quot;French (Cameroon)&quot;
            Case 0c0c Locale = &quot;French (Canada)&quot;
            Case 240c Locale = &quot;French (DRC)&quot;
            Case 300c Locale = &quot;French (Cote d'Ivoire)&quot;
            Case 3c0c Locale = &quot;French (Haiti)&quot;
            Case 140c Locale = &quot;French (Luxembourg)&quot;
            Case 340c Locale = &quot;French (Mali)&quot;
            Case 180c Locale = &quot;French (Monaco)&quot;
            Case 380c Locale = &quot;French (Morocco)&quot;
            Case e40c Locale = &quot;French (North Africa)&quot;
            Case 200c Locale = &quot;French (Reunion)&quot;
            Case 280c Locale = &quot;French (Senegal)&quot;
            Case 100c Locale = &quot;French (Switzerland)&quot;
            Case 1c0c Locale = &quot;French (West Indies)&quot;
            Case 0462 Locale = &quot;Frisian (Netherlands)&quot;
            Case 0467 Locale = &quot;Fulfulde (Nigeria)&quot;
            Case 042f Locale = &quot;FYRO Macedonian&quot;
            Case 083c Locale = &quot;Gaelic (Ireland)&quot;
            Case 043c Locale = &quot;Gaelic (Scotland)&quot;
            Case 0456 Locale = &quot;Galician&quot;
            Case 0437 Locale = &quot;Georgian&quot;
            Case 0407 Locale = &quot;German (Germany)&quot;
            Case 0c07 Locale = &quot;German (Austria)&quot;
            Case 1407 Locale = &quot;German (Liechtenstein)&quot;
            Case 1007 Locale = &quot;German (Luxembourg)&quot;
            Case 0807 Locale = &quot;German (Switzerland)&quot;
            Case 0408 Locale = &quot;Greek&quot;
            Case 0474 Locale = &quot;Guarani (Paraguay)&quot;
            Case 0447 Locale = &quot;Gujarati&quot;
            Case 0468 Locale = &quot;Hausa (Nigeria)&quot;
            Case 0475 Locale = &quot;Hawaiian (United States)&quot;
            Case 040d Locale = &quot;Hebrew&quot;
            Case 0439 Locale = &quot;Hindi&quot;
            ' Case 040e Locale = &quot;Hungarian&quot;
            Case 0469 Locale = &quot;Ibibio (Nigeria)&quot;
            Case 040f Locale = &quot;Icelandic&quot;
            Case 0470 Locale = &quot;Igbo (Nigeria)&quot;
            Case 0421 Locale = &quot;Indonesian&quot;
            Case 045d Locale = &quot;Inuktitut&quot;
            Case 0410 Locale = &quot;Italian (Italy)&quot;
            Case 0810 Locale = &quot;Italian (Switzerland)&quot;
            Case 0411 Locale = &quot;Japanese&quot;
            Case 044b Locale = &quot;Kannada&quot;
            Case 0471 Locale = &quot;Kanuri (Nigeria)&quot;
            Case 0860 Locale = &quot;Kashmiri&quot;
            Case 0460 Locale = &quot;Kashmiri (Arabic)&quot;
            Case 043f Locale = &quot;Kazakh&quot;
            Case 0453 Locale = &quot;Khmer&quot;
            Case 0457 Locale = &quot;Konkani&quot;
            Case 0412 Locale = &quot;Korean&quot;
            Case 0440 Locale = &quot;Kyrgyz (Cyrillic)&quot;
            Case 0454 Locale = &quot;Lao&quot;
            Case 0476 Locale = &quot;Latin&quot;
            Case 0426 Locale = &quot;Latvian&quot;
            Case 0427 Locale = &quot;Lithuanian&quot;
            ' Case 043e Locale = &quot;Malay (Malaysia)&quot;
            ' Case 083e Locale = &quot;Malay (Brunei Darussalam)&quot;
            Case 044c Locale = &quot;Malayalam&quot;
            Case 043a Locale = &quot;Maltese&quot;
            Case 0458 Locale = &quot;Manipuri&quot;
            Case 0481 Locale = &quot;Maori (New Zealand)&quot;
            ' Case 044e Locale = &quot;Marathi&quot;
            Case 0450 Locale = &quot;Mongolian (Cyrillic)&quot;
            Case 0850 Locale = &quot;Mongolian (Mongolian)&quot;
            Case 0461 Locale = &quot;Nepali&quot;
            Case 0861 Locale = &quot;Nepali (India)&quot;
            Case 0414 Locale = &quot;Norwegian (Bokmål)&quot;
            Case 0814 Locale = &quot;Norwegian (Nynorsk)&quot;
            Case 0448 Locale = &quot;Oriya&quot;
            Case 0472 Locale = &quot;Oromo&quot;
            Case 0479 Locale = &quot;Papiamentu&quot;
            Case 0463 Locale = &quot;Pashto&quot;
            Case 0415 Locale = &quot;Polish&quot;
            Case 0416 Locale = &quot;Portuguese (Brazil)&quot;
            Case 0816 Locale = &quot;Portuguese (Portugal)&quot;
            Case 0446 Locale = &quot;Punjabi&quot;
            Case 0846 Locale = &quot;Punjabi (Pakistan)&quot;
            Case 046B Locale = &quot;Quecha (Bolivia)&quot;
            Case 086B Locale = &quot;Quecha (Ecuador)&quot;
            Case 0C6B Locale = &quot;Quecha (Peru)&quot;
            Case 0417 Locale = &quot;Rhaeto-Romanic&quot;
            Case 0418 Locale = &quot;Romanian&quot;
            Case 0818 Locale = &quot;Romanian (Moldava)&quot;
            Case 0419 Locale = &quot;Russian&quot;
            Case 0819 Locale = &quot;Russian (Moldava)&quot;
            Case 043b Locale = &quot;Sami (Lappish)&quot;
            Case 044f Locale = &quot;Sanskrit&quot;
            Case 046c Locale = &quot;Sepedi&quot;
            Case 0c1a Locale = &quot;Serbian (Cyrillic)&quot;
            Case 081a Locale = &quot;Serbian (Latin)&quot;
            Case 0459 Locale = &quot;Sindhi (India)&quot;
            Case 0859 Locale = &quot;Sindhi (Pakistan)&quot;
            Case 045b Locale = &quot;Sinhalese (Sri Lanka)&quot;
            Case 041b Locale = &quot;Slovak&quot;
            Case 0424 Locale = &quot;Slovenian&quot;
            Case 0477 Locale = &quot;Somali&quot;
            ' Case 042e Locale = &quot;Sorbian&quot;
            Case 0c0a Locale = &quot;Spanish (Spain - Modern Sort)&quot;
            Case 040a Locale = &quot;Spanish (Spain - Traditional Sort)&quot;
            Case 2c0a Locale = &quot;Spanish (Argentina)&quot;
            Case 400a Locale = &quot;Spanish (Bolivia)&quot;
            Case 340a Locale = &quot;Spanish (Chile)&quot;
            Case 240a Locale = &quot;Spanish (Colombia)&quot;
            Case 140a Locale = &quot;Spanish (Costa Rica)&quot;
            Case 1c0a Locale = &quot;Spanish (Dominican Republic)&quot;
            Case 300a Locale = &quot;Spanish (Ecuador)&quot;
            Case 440a Locale = &quot;Spanish (El Salvador)&quot;
            Case 100a Locale = &quot;Spanish (Guatemala)&quot;
            Case 480a Locale = &quot;Spanish (Honduras)&quot;
            Case 580a Locale = &quot;Spanish (Latin America)&quot;
            Case 080a Locale = &quot;Spanish (Mexico)&quot;
            Case 4c0a Locale = &quot;Spanish (Nicaragua)&quot;
            Case 180a Locale = &quot;Spanish (Panama)&quot;
            Case 3c0a Locale = &quot;Spanish (Paraguay)&quot;
            Case 280a Locale = &quot;Spanish (Peru)&quot;
            Case 500a Locale = &quot;Spanish (Puerto Rico)&quot;
            Case 540a Locale = &quot;Spanish (United States)&quot;
            Case 380a Locale = &quot;Spanish (Uruguay)&quot;
            Case 200a Locale = &quot;Spanish (Venezuela)&quot;
            Case 0430 Locale = &quot;Sutu&quot;
            Case 0441 Locale = &quot;Swahili&quot;
            Case 041d Locale = &quot;Swedish&quot;
            Case 081d Locale = &quot;Swedish (Finland)&quot;
            Case 045a Locale = &quot;Syriac&quot;
            Case 0428 Locale = &quot;Tajik&quot;
            Case 045f Locale = &quot;Tamazight (Arabic)&quot;
            Case 085f Locale = &quot;Tamazight (Latin)&quot;
            Case 0449 Locale = &quot;Tamil&quot;
            Case 0444 Locale = &quot;Tatar&quot;
            Case 044a Locale = &quot;Telugu&quot;
            ' Case 041e Locale = &quot;Thai&quot;
            Case 0851 Locale = &quot;Tibetan (Bhutan)&quot;
            Case 0451 Locale = &quot;Tibetan (PRC)&quot;
            Case 0873 Locale = &quot;Tigrigna (Eritrea)&quot;
            Case 0473 Locale = &quot;Tigrigna (Ethiopia)&quot;
            Case 0431 Locale = &quot;Tsonga&quot;
            Case 0432 Locale = &quot;Tswana&quot;
            Case 041f Locale = &quot;Turkish&quot;
            Case 0442 Locale = &quot;Turkmen&quot;
            Case 0480 Locale = &quot;Uighur (China)&quot;
            Case 0422 Locale = &quot;Ukrainian&quot;
            Case 0420 Locale = &quot;Urdu&quot;
            Case 0820 Locale = &quot;Urdu (India)&quot;
            Case 0843 Locale = &quot;Uzbek (Cyrillic)&quot;
            Case 0443 Locale = &quot;Uzbek (Latin)&quot;
            Case 0433 Locale = &quot;Venda&quot;
            Case 042a Locale = &quot;Vietnamese&quot;
            Case 0452 Locale = &quot;Welsh&quot;
            Case 0434 Locale = &quot;Xhosa&quot;
            Case 0478 Locale = &quot;Yi&quot;
            Case 043d Locale = &quot;Yiddish&quot;
            Case 046a Locale = &quot;Yoruba&quot;
            Case 0435 Locale = &quot;Zulu&quot;
            Case 04ff Locale = &quot;HID (Human Interface Device)&quot;
            Case Else
            Locale = &quot;Could Not Determine OS Locale&quot;
        End Select

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables gathered from Win32_OperatingSystem class:

        Caption = objOSItem.Caption
        CSDVersion = objOSItem.CSDVersion
        CSName = objOSItem.CSName
        Version = objOSItem.Version
        BuildType = objOSItem.BuildType
        BuildNumber = objOSItem.BuildNumber
        SerialNumber = objOSItem.SerialNumber

        ScriptHelper.SWbemDateTime.Value = objOSItem.InstallDate
        InstallDate = ScriptHelper.SWbemDateTime.GetVarDate(True)

        ScriptHelper.SWbemDateTime.Value = objOSItem.LastBootUpTime
        LastBootUpTime = ScriptHelper.SWbemDateTime.GetVarDate(True)

        Status = objOSItem.Status
    Next

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables gathered from Win32_ComputerSystem class:

    For Each objCompSysItem in colCompSysItems
        CurrentTimeZone = objCompSysItem.CurrentTimeZone
        DaylightInEffect = objCompSysItem.DaylightInEffect
        TotalMemory = FormatNumber(objCompSysItem.TotalPhysicalMemory/1024^3, 2)
    Next

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables gathered from Win32_TimeZone class:

    For Each objTZItem in colTZItems
        TZName = objTZItem.StandardName
    Next

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables gathered from Win32_ComputerSystemProduct class:

    For Each objCompSysProdItem in colCompSysProdItems
        CompSysName = objCompSysProdItem.Name
        IdentifyingNumber = objCompSysProdItem.IdentifyingNumber
        UUID = objCompSysProdItem.UUID
    Next

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables gathered from Win32_BIOS class:

    For Each objBIOSItem in colBIOSItems
        SMBIOSVersion = objBIOSItem.SMBIOSBIOSVersion
    Next

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Start echoing output to the screen

    Wscript.Echo &quot;     ------------------------------------------&quot;
    Wscript.Echo &quot;                   System Details&quot;
    Wscript.Echo &quot;     ------------------------------------------&quot;
    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;     Computer Name:        &quot; &amp; CSName
    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;     Operating System Information:&quot;
    Wscript.Echo &quot;     =============================&quot;
    Wscript.Echo &quot;     Operating System:     &quot; &amp; Caption &amp; Arch
    Wscript.Echo &quot;     Version:               &quot; &amp; Version &amp; &quot; &quot; &amp; Sku &amp; &quot; &quot; &amp; CSDVersion
    Wscript.Echo &quot;     Build Type:            &quot; &amp; BuildType
    Wscript.Echo &quot;     Locale:                &quot; &amp; Locale
    Wscript.Echo &quot;     Serial Number:         &quot; &amp; SerialNumber
    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;     Current Time Zone:     &quot; &amp; TZName
    Wscript.Echo &quot;     Offset from UTC:       &quot; &amp; CurrentTimeZone/60 &amp; &quot; hours&quot;
    Wscript.Echo &quot;     DST In Effect:         &quot; &amp; DaylightInEffect
    Wscript.Echo &quot;&quot;

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Get the product keys (function at the end of script):

GetKeys()

    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;     Install Date:          &quot; &amp; InstallDate
    Wscript.Echo &quot;     Last Boot Time:        &quot; &amp; LastBootUpTime
    Wscript.Echo &quot;     Local Date/Time:       &quot; &amp; Now()
    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;     System Status:         &quot; &amp; Status
    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;     Hardware Information:&quot;
    Wscript.Echo &quot;     =====================&quot;

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set and echo variables gathered from Win32_Processor class:

    For Each objProcItem in colProcItems
        Select Case objProcItem.Architecture
            Case 0 CPUArch = &quot;x86&quot;
            Case 1 CPUArch = &quot;MIPS&quot;
            Case 2 CPUArch = &quot;Alpha&quot;
            Case 3 CPUArch = &quot;PowerPC&quot;
            Case 6 CPUArch = &quot;Itanium&quot;
            Case 9 CPUArch = &quot;x64&quot;
            Case Else
            CPUArch = &quot;Could Not Determine CPU Architecture&quot;
        End Select
    Wscript.Echo &quot;     CPU:                  &quot; &amp; objProcItem.Name &amp; &quot; (&quot; &amp; CPUArch &amp; &quot;)&quot;
    Next
    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;     Physical Memory:      &quot; &amp; TotalMemory &amp; &quot; GB&quot;
    Wscript.Echo &quot;&quot;

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables gathered from Win32_VideoController class:

    For Each objVideoItem in colVideoItems
        Wscript.Echo &quot;     Video Card:           &quot; &amp; objVideoItem.Name

        If Not objVideoItem.AdapterDACType = &quot;&quot; Then
            Wscript.Echo &quot;     Adapter DAC:           &quot; &amp; objVideoItem.AdapterDACType
        End if

        Wscript.Echo &quot;     PNP Device ID:         &quot; &amp; objVideoItem.PNPDeviceID

        If Not objVideoItem.AdapterRAM = &quot;&quot; Then
            Wscript.Echo &quot;     Video RAM:             &quot; &amp; objVideoItem.AdapterRAM/1024^2 &amp; &quot; MB&quot;
        End If

        Wscript.Echo &quot;     Driver Version:        &quot; &amp; objVideoItem.DriverVersion

        On Error Resume Next
        ScriptHelper.SWbemDateTime.Value = objVideoItem.DriverDate
            If Err.number &lt;&gt; 0 Then
                DriverDate = &quot;&quot;
                ' No DriverDate, do not echo
            Else
                DriverDate = ScriptHelper.SWbemDateTime.GetVarDate(False)
                Wscript.Echo &quot;     Driver Date:           &quot; &amp; DriverDate
            End If
        On Error Goto 0
        Wscript.Echo &quot;&quot;
    Next

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables gathered from Win32_SoundDevice class:

    For Each objSoundItem in colSoundItems
        Wscript.Echo &quot;     Sound Card:           &quot; &amp; objSoundItem.Name
        Wscript.Echo &quot;     Manufacturer:          &quot; &amp; objSoundItem.Manufacturer
        Wscript.Echo &quot;     PNP Device ID:         &quot; &amp; objSoundItem.PNPDeviceID
        Wscript.Echo &quot;&quot;
    Next

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables gathered from Win32_LogicalDisk class:

    For Each objDiskItem in colDiskItems
        If objDiskItem.DriveType = 3 Then
            Wscript.Echo &quot;     Volume:               &quot; &amp; objDiskItem.Caption
            Wscript.Echo &quot;     Compressed:            &quot; &amp; objDiskItem.Compressed
            Wscript.Echo &quot;     File System:           &quot; &amp; objDiskItem.FileSystem
            Wscript.Echo &quot;     Volume Size:           &quot; &amp; FormatNumber(objDiskItem.Size/1024^3, 2) &amp; &quot; GB&quot;
            Wscript.Echo &quot;     Free Space:            &quot; &amp; FormatNumber(objDiskItem.FreeSpace/1024^3, 2) &amp; &quot; GB&quot;
            Wscript.Echo &quot;&quot;
        End If
    Next

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Set variables gathered from Win32_NetworkAdapterConfiguration class:

    For Each objNetAdapConfigItem in colNetAdapConfigItems
        If isNull(objNetAdapConfigItem.IPAddress) Then
            '// Skip adapter, not currently used
        Else
            Wscript.Echo &quot;     Network Adapter:      &quot; &amp; objNetAdapConfigItem.Description
            Wscript.Echo &quot;     MAC Address:           &quot; &amp; objNetAdapConfigItem.MACAddress
            Wscript.Echo &quot;     DHCP Enabled:          &quot; &amp; objNetAdapConfigItem.DHCPEnabled
            Wscript.Echo &quot;     IP Address:            &quot; &amp; Join(objNetAdapConfigItem.IPAddress, &quot;,&quot;)
            Wscript.Echo &quot;     Subnet Mask:           &quot; &amp; Join(objNetAdapConfigItem.IPSubnet, &quot;,&quot;)
            Wscript.Echo &quot;     Default Gateway:       &quot; &amp; Join(objNetAdapConfigItem.DefaultIPGateway, &quot;,&quot;)
            If objNetAdapConfigItem.DHCPEnabled = True Then

                ScriptHelper.SWbemDateTime.Value = objNetAdapConfigItem.DHCPLeaseObtained
                DHCPLeaseObtained = ScriptHelper.SWbemDateTime.GetVarDate(True)
                Wscript.Echo &quot;     Lease Obtained:        &quot; &amp; DHCPLeaseObtained

                ScriptHelper.SWbemDateTime.Value = objNetAdapConfigItem.DHCPLeaseExpires
                DHCPLeaseExpires = ScriptHelper.SWbemDateTime.GetVarDate(True)
                Wscript.Echo &quot;     Lease Exipres:         &quot; &amp; DHCPLeaseExpires

                Wscript.Echo &quot;     DHCP Servers:          &quot; &amp; objNetAdapConfigItem.DHCPServer
            End If
            Wscript.Echo &quot;     DNS Server:            &quot; &amp; Join(objNetAdapConfigItem.DNSServerSearchOrder, &quot;,&quot;)
            If Not objNetAdapConfigItem.WINSPrimaryServer = &quot;&quot; Then
                Wscript.Echo &quot;     WINS Primary Server:   &quot; &amp; objNetAdapConfigItem.WINSPrimaryServer
                If Not objNetAdapConfigItem.WINSSecondaryServer = &quot;&quot; Then
                    Wscript.Echo &quot;     WINS Secondary Server: &quot; &amp; objNetAdapConfigItem.WINSPrimaryServer
                End If
                Wscript.Echo &quot;     Enable LMHosts Lookup: &quot; &amp; objNetAdapConfigItem.WINSEnableLMHostsLookup
            End If
            Wscript.Echo &quot;&quot;
        End If
    Next
    Wscript.Echo &quot;&quot;
    Wscript.Echo &quot;     System Information:&quot;
    Wscript.Echo &quot;     ===================&quot;
    Wscript.Echo &quot;     Computer:             &quot; &amp; CompSysName
    Wscript.Echo &quot;     Serial Number:         &quot; &amp; IdentifyingNumber
    Wscript.Echo &quot;     BIOS Version:          &quot; &amp; SMBIOSVersion
    Wscript.Echo &quot;     UUID:                  &quot; &amp; UUID
    Wscript.Echo &quot;&quot;

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// This pause call is disabled, but you may wish to enable it if running this script
'// with the ElevateThisScript() subroutine call enabled above:

' PressEnter()

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Functions: GetKeys() and decodeKey(iValues, strProduct)
'//
'// Credit where credit is due - I found and modified script posted by user &quot;Parabellum&quot;
'// found on http://www.visualbasicscript.com/m42793.aspx, hacked it up a bit, and used
'// it here to post keys:

Public Function GetKeys()

    For x = LBound(arrSubKeys, 1) To UBound(arrSubKeys, 1)
    ScriptHelper.Registry.GetBinaryValue HKEY_LOCAL_MACHINE, arrSubKeys(x,1), SEARCH_KEY, arrDPIDBytes

        If Not IsNull(arrDPIDBytes) Then
            Call decodeKey(arrDPIDBytes, arrSubKeys(x,0))
        Else
            ScriptHelper.Registry.EnumKey HKEY_LOCAL_MACHINE, arrSubKeys(x,1), arrGUIDKeys

            If Not IsNull(arrGUIDKeys) Then
                For Each GUIDKey In arrGUIDKeys
                    ScriptHelper.Registry.GetBinaryValue HKEY_LOCAL_MACHINE, arrSubKeys(x,1) &amp; &quot;\&quot; &amp; GUIDKey, SEARCH_KEY, arrDPIDBytes

                    If Not IsNull(arrDPIDBytes) Then
                        Call decodeKey(arrDPIDBytes, arrSubKeys(x,0))
                    End If
                Next
            End If
        End If
    Next

End Function

    Public Function decodeKey(iValues, strProduct)

        Dim arrDPID
        arrDPID = Array()

            For i = 52 to 66
                ReDim Preserve arrDPID( UBound(arrDPID) + 1 )
                arrDPID( UBound(arrDPID) ) = iValues(i)
            Next

        Dim arrChars
        arrChars = Array(&quot;B&quot;,&quot;C&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;M&quot;,&quot;P&quot;,&quot;Q&quot;,&quot;R&quot;,&quot;T&quot;,&quot;V&quot;,&quot;W&quot;,&quot;X&quot;,&quot;Y&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;)

            For i = 24 To 0 Step -1
                k = 0

                For j = 14 To 0 Step -1
                    k = k * 256 Xor arrDPID(j)
                    arrDPID(j) = Int(k / 24)
                    k = k Mod 24
                Next

                strProductKey = arrChars(k) &amp; strProductKey

                If i Mod 5 = 0 And i &lt;&gt; 0 Then
                    strProductKey = &quot;-&quot; &amp; strProductKey
                End If
            Next

        ReDim Preserve foundKeys( UBound(foundKeys) + 1 )
        foundKeys( UBound(foundKeys) ) = strProductKey
        strKey = UBound(foundKeys)
        Wscript.Echo &quot;     &quot; &amp; strProduct &amp; &quot;&quot; &amp; foundKeys(strKey)
    End Function

'//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// Subroutine: PressEnter()
'//
'// Adds a pause with a &quot;Press the ENTER key to continue.&quot; message when called.
'//
'// Usage:  Call this Subroutine to get a pause that will clear when the user presses the
'// ENTER key (and ONLY the ENTER key) on their keyboard:

Sub PressEnter()
    Wscript.Echo &quot;&quot;
    strMessage = &quot;Press the ENTER key to continue. &quot;
    Wscript.StdOut.Write strMessage

    Do While Not WScript.StdIn.AtEndOfLine
        Input = WScript.StdIn.Read(1)
    Loop
End Sub

'// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'//
'// ScriptHelperClass and EnvironmentClass are helper classes to simplify
'// script work. Declare and use globally throughout the script.
'//
'//     Example code:
'//
'//     Option Explicit
'//     Dim ScriptHelper
'//     Set ScriptHelper = New ScriptHelperClass
'//     ScriptHelper.RunMeWithCScript()
'//     ScriptHelper.ElevateThisScript()
'//     WScript.Echo &quot;User profile : &quot; &amp; ScriptHelper.Environment.UserProfile
'//     WScript.Echo &quot;Domain : &quot; &amp; ScriptHelper.Network.UserDomain
'//     ScriptHelper.CreateFolder &quot;\\SERVER\Share\Folder\With\Path&quot;
'//     ScriptHelper.FileSystem.FileExists(&quot;C:\command.com&quot;)
'//     ScriptHelper.Shell.RegRead(&quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions\ProductType&quot;)
'//
'// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Class ScriptHelperClass

        Private objEnvironment
        Private objFileSystem
        Private objNetwork
        Private objShell
        Private objSWBemlocator
        Private objWMI
        Private objRegistry
        Private objSWbemDateTime

        Public Computer

        Public Property Get Environment
            If objEnvironment Is Nothing Then
                Set objEnvironment = New EnvironmentClass
                objEnvironment.Shell = Shell
            End If
            Set Environment = objEnvironment
        End Property

        Public Property Get FileSystem
            If objFileSystem Is Nothing Then Set objFileSystem = CreateObject(&quot;Scripting.FileSystemObject&quot;)
            Set FileSystem = objFileSystem
        End Property

        Public Property Get Network
            If objNetwork Is Nothing Then Set objNetwork = CreateObject(&quot;WScript.Network&quot;)
            Set Network = objNetwork
        End Property

        Public Property Get Shell
            If objShell Is Nothing Then Set objShell = CreateObject(&quot;WScript.Shell&quot;)
            Set Shell = objShell
        End Property

        Public Property Get WMI
            If objWMI Is Nothing Then
                On Error Resume Next
                Set objSWBemlocator = CreateObject(&quot;WbemScripting.SWbemLocator&quot;)
                Set objWMI = objSWBemlocator.ConnectServer(Computer, &quot;root\CIMV2&quot;)
                objWMI.Security_.ImpersonationLevel = 3
                On Error Goto 0
            End If
            Set WMI = objWMI
        End Property

        Public Property Get Registry
            If objRegistry Is Nothing Then Set objRegistry = GetObject(&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot; &amp; strComputer &amp; &quot;\root\default:StdRegProv&quot;)
            Set Registry = objRegistry
        End Property

        Public Property Get SWbemDateTime
            If objSWbemDateTime Is Nothing Then Set objSWbemDateTime = CreateObject(&quot;WbemScripting.SWbemDateTime&quot;)
            Set SWbemDateTime = objSWbemDateTime
        End Property

        Private Sub Class_Initialize()
            Computer = &quot;.&quot;
            Set objEnvironment = Nothing
            Set objFileSystem = Nothing
            Set objNetwork = Nothing
            Set objShell = Nothing
            Set objSWBemlocator = Nothing
            Set objWMI = Nothing
            Set objRegistry = Nothing
            Set objSWbemDateTime = Nothing
        End Sub

        Private Sub Class_Terminate
            Set objSWbemDateTime = Nothing
            Set objRegistry = Nothing
            Set objWMI = Nothing
            Set objSWBemlocator = Nothing
            Set objShell = Nothing
            Set objNetwork = Nothing
            Set objFileSystem = Nothing
            Set objEnvironment = Nothing
        End Sub

        Public Property Get ScriptPath()
            ScriptPath = FileSystem.GetFile(WScript.ScriptFullName).ParentFolder
        End Property

        Public Function GetCurrentUserSID()
            Dim intCount, colItems, objItem, strSID

            Set colItems = WMI.ExecQuery(&quot;SELECT * FROM Win32_UserAccount WHERE Name = '&quot; &amp; Network.Username &amp; &quot;' AND Domain = '&quot; &amp; Network.UserDomain &amp; &quot;'&quot;, , 48)

            intCount = 0
            For Each objItem In colItems
                strSID = Cstr(objItem.SID)
                intCount = intCount + 1
            Next

            If intCount &gt; 0 Then
                GetCurrentUserSID = strSID
            Else
                GetCurrentUserSID = &quot;NOTFOUND&quot;
            End If
        End Function

        Public Sub CreateFolder(strFldPath)
            Dim fldArray, x, intStartIndex, blnUNC, strDestFold : strDestFold = &quot;&quot;

            If Left(strFldPath, 2) = &quot;\\&quot;  Then
                blnUNC = True
                intStartIndex = 3                                        'Start at the first folder in UNC path
            Else
                blnUNC = False
                intStartIndex = 0
            End If

            fldArray = Split(strFldPath, &quot;\&quot;)                                                        'Split folders into array

            If fldArray(intStartIndex) = &quot;&quot; Then Exit Sub

            For x = intStartIndex To UBound(fldArray)

                If strDestFold = &quot;&quot; Then
                    If blnUNC Then
                        strDestFold = &quot;\\&quot; &amp; fldArray(x-1) &amp; &quot;\&quot; &amp; fldArray(x)                    'Prefix UNC with server and share
                    Else
                        strDestFold = fldArray(x)
                    End If
                Else
                    strDestFold = strDestFold &amp; &quot;\&quot; &amp; fldArray(x)                                'Append each folder to end of path
                End If

                If Not FileSystem.FolderExists(strDestFold) Then FileSystem.CreateFolder(strDestFold)
            Next
        End Sub

        Public Sub DeleteFolder(strFldPath)
            If FileSystem.FolderExists(strFldPath) Then FileSystem.DeleteFolder strFldPath, True
        End Sub

        '//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        '// Subroutine: RunMeWithCScript()
        '//
        '// Purpose:    Forces the currently running script to use Cscript.exe as the Script
        '//             engine.  If the script is already running with cscript.exe the sub exits
        '//             and continues the script.
        '//
        '//             Sub Attempts to call the script with its original arguments.  Arguments
        '//             that contain a space will be wrapped in double quotes when the script
        '//             calls itself again.  To verify your command string you can echo out the
        '//             scriptCommand variable.
        '//
        '// Usage:      Add a call to this sub (RunMeWithCscript) to the beggining of your script
        '//             to ensure that cscript.exe is used as the script engine.
        '//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Public Sub RunMeWithCScript()

            Dim scriptEngine, engineFolder, Args, arg, scriptName, argString, scriptCommand

            scriptEngine = Ucase(Mid(Wscript.FullName,InstrRev(Wscript.FullName,&quot;\&quot;)+1))
            engineFolder = Left(Wscript.FullName,InstrRev(Wscript.FullName,&quot;\&quot;))
            argString = &quot;&quot;

            If scriptEngine = &quot;WSCRIPT.EXE&quot; Then
                Dim Shell : Set Shell = CreateObject(&quot;Wscript.Shell&quot;)
                Set Args = Wscript.Arguments

                For each arg in Args                        'loop though argument array as a collection to rebuild argument string
                    If instr(arg,&quot; &quot;) &gt; 0 Then arg = &quot;&quot;&quot;&quot; &amp; arg &amp; &quot;&quot;&quot;&quot;    'if the argument contains a space wrap it in double quotes
                    argString = argString &amp; &quot; &quot; &amp; Arg
                Next

                'Create a persistent command prompt for the cscript output window and call the script with its original arguments
                scriptCommand = &quot;cmd.exe /k &quot; &amp; engineFolder &amp; &quot;cscript.exe &quot;&quot;&quot; &amp; Wscript.ScriptFullName &amp; &quot;&quot;&quot;&quot; &amp; argString

                Shell.Run scriptCommand,,False
                Wscript.Quit
            Else
                Exit Sub                    'Already Running with Cscript Exit this Subroutine
            End If

        End Sub

        '//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        '// Subroutine: ElevateThisScript()
        '//
        '// Purpose:    (Intended for Vista+)
        '//             Forces the currently running script to prompt for UAC elevation if it
        '//             detects that the current user credentials do not have administrative
        '//             privileges.
        '//
        '//             If run on Windows XP this script will cause the RunAs dialog to appear if
        '//             the user does not have administrative rights, giving the opportunity to
        '//             run as an administrator.
        '//
        '//             This Sub Attempts to call the script with its original arguments.
        '//             Arguments that contain a space will be wrapped in double quotes when the
        '//             script calls itself again.
        '//
        '// Usage:      Add a call to this sub (ElevateThisScript) to the beginning of your
        '//             script to ensure that the script gets an administrative token.
        '//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Public Sub ElevateThisScript()

            Const HKEY_CLASSES_ROOT  = &amp;H80000000
            Const HKEY_CURRENT_USER  = &amp;H80000001
            Const HKEY_LOCAL_MACHINE = &amp;H80000002
            Const HKEY_USERS         = &amp;H80000003
            const KEY_QUERY_VALUE      = 1
            Const KEY_SET_VALUE          = 2

            Dim scriptEngine, engineFolder, argString, arg, Args, scriptCommand, HasRequiredRegAccess
            Dim objShellApp : Set objShellApp = CreateObject(&quot;Shell.Application&quot;)

            scriptEngine = Ucase(Mid(Wscript.FullName,InstrRev(Wscript.FullName,&quot;\&quot;)+1))
            engineFolder = Left(Wscript.FullName,InstrRev(Wscript.FullName,&quot;\&quot;))
            argString = &quot;&quot;

            Set Args = Wscript.Arguments

            For each arg in Args                        'loop though argument array as a collection to rebuild argument string
                If instr(arg,&quot; &quot;) &gt; 0 Then arg = &quot;&quot;&quot;&quot; &amp; arg &amp; &quot;&quot;&quot;&quot;    'if the argument contains a space wrap it in double quotes
                argString = argString &amp; &quot; &quot; &amp; Arg
            Next

            scriptCommand = engineFolder &amp; scriptEngine

            Dim objReg, bHasAccessRight
            Set objReg=GetObject(&quot;winmgmts:&quot;_
                &amp; &quot;{impersonationLevel=impersonate}!\\&quot; &amp;_
                Computer &amp; &quot;\root\default:StdRegProv&quot;)

            'Check for administrative registry access rights
            objReg.CheckAccess HKEY_LOCAL_MACHINE, &quot;System\CurrentControlSet\Control\CrashControl&quot;, _
                KEY_SET_VALUE, bHasAccessRight

            If bHasAccessRight = True Then

                HasRequiredRegAccess = True
                Exit Sub

            Else

                HasRequiredRegAccess = False
                objShellApp.ShellExecute scriptCommand, &quot; &quot;&quot;&quot; &amp; Wscript.ScriptFullName &amp; &quot;&quot;&quot;&quot; &amp; argString, &quot;&quot;, &quot;runas&quot;
                WScript.Quit
            End If

        End Sub
    End Class

    Class EnvironmentClass
        Private objShell
        Private strLogonServer
        Private strProgramFiles
        Private strProgramFilesX86
        Private strUserProfile
        Private strWinDir

        Public Cache

        Public Property Let Shell(objParentShell)
            Set objShell = objParentShell
        End Property

        Public Property Get LogonServer
            If IsNull(strLogonServer) Or Cache = False Then strLogonServer = objShell.ExpandEnvironmentStrings(&quot;%LOGONSERVER%&quot;)
            LogonServer = strLogonServer
        End Property

        Public Property Get ProgramFiles
            If IsNull(strProgramFiles) Or Cache = False Then strProgramFiles = objShell.ExpandEnvironmentStrings(&quot;%PROGRAMFILES%&quot;)
            ProgramFiles = strProgramFiles
        End Property

        Public Property Get ProgramFilesX86
            If IsNull(strProgramFilesX86) Or Cache = False Then strProgramFilesX86 = objShell.ExpandEnvironmentStrings(&quot;%PROGRAMFILES(x86)%&quot;)
            ProgramFilesX86 = strProgramFilesX86
        End Property

        Public Property Get UserProfile
            If IsNull(strUserProfile) Or Cache = False Then strUserProfile = objShell.ExpandEnvironmentStrings(&quot;%USERPROFILE%&quot;)
            UserProfile = strUserProfile
        End Property

        Public Property Get WinDir
            If IsNull(strWinDir) Or Cache = False Then strWinDir = objShell.ExpandEnvironmentStrings(&quot;%WINDIR%&quot;)
            WinDir = strWinDir
        End Property

        Private Sub Class_Initialize()
            Cache = True
            strLogonServer = Null
            strProgramFiles = Null
            strProgramFilesX86 = Null
            strUserProfile = Null
            strWinDir = Null
        End Sub
    End Class
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2009/12/26/computer-info-vbscript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Proxy PAC configuration file</title>
		<link>http://www.cluberti.com/blog/2009/12/18/proxy-pac-configuration-file/</link>
		<comments>http://www.cluberti.com/blog/2009/12/18/proxy-pac-configuration-file/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 22:36:42 +0000</pubDate>
		<dc:creator>cluberti</dc:creator>
				<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Proxy Autoconfig]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.cluberti.com/blog/2009/12/18/proxy-pac-configuration-file/</guid>
		<description><![CDATA[Had to work on one of these for a client, and decided that while there’s a whole host of documentation out there, there aren’t a lot of good working examples of how to use the proxy auto config functions properly in a complex file. Since I spent the better part of 8 hours getting something [...]]]></description>
			<content:encoded><![CDATA[<p>Had to work on one of these for a client, and decided that while there’s a whole host of documentation out there, there aren’t a lot of good working examples of how to use the proxy auto config functions properly in a complex file.</p>
<p>Since I spent the better part of 8 hours getting something that works properly in the environment (including site blocking to a custom server), I figured I’d share it with the users of this series of tubes in the hope it helps someone.</p>
<pre class="brush: jscript;">
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// NAME:        proxy.pac
//
// Original:    http://www.cluberti.com/blog
// Last Update: 14th May 2010
//
// Comment:     Proxy.pac example file for use as an auto configuration script
//              template.
//
// NOTE:        Provided as-is - usage of this source assumes that you are at the
//              very least familiar with the javascript language being used and
//              the tools used to create and debug this file.
//
//              In other words, if you break it, you get to keep the pieces.
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// javascript:alert (&quot;Using PAC file&quot;);

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Start of the PAC file - function FindProxyForUrl:

function FindProxyForURL(url, host)
{

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Set proxy values as strings to use during return
// NOTE that if a rule directs the browser to return proxy_block, in this example
// the browser should attempt to visit http://internalserver:80, and will display
// the default web site at that location.

	var proxy_primary = &quot;PROXY proxy.primary.internal.domain.com:80&quot;;
	var proxy_secondary = &quot;PROXY proxy.secondary.internal.domain.com:80&quot;;
	var proxy_testing = &quot;PROXY proxy.testing.internal.domain.com:80&quot;;
	var proxy_block = &quot;PROXY internalserver:80&quot;; //&lt;- useful for blocking sites
	var proxy_no = &quot;DIRECT&quot;;

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Some proxies may have issues with mixed-case URLs, so change host variable to
// all lower case, and resolve the host IP to reduce DNS lookups later:

	host = host.toLowerCase();
	var resolved_IP = dnsResolve(host);

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Master blocked sites list
// NOTE: Add all sies you wish to redirect to proxy_block here:

	// if destination is .someblockeddomain.com, return proxy_block:
	if (dnsDomainIs(host, &quot;.someblockeddomain.com&quot;))
	{
		return proxy_block;
	}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// If URL has no dots in host name, send traffic direct.

	if (isPlainHostName(host))
	{
		return proxy_no;
	}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Master proxy bypass list
// NOTE: Add all other proxy bypass entries into this section:

	// If destination is to an RFC 1918 IP, return direct:
	if (isInNet(resolved_IP, &quot;10.0.0.0&quot;, &quot;255.0.0.0&quot;) ||
			isInNet(resolved_IP, &quot;172.16.0.0&quot;,  &quot;255.240.0.0&quot;) ||
			isInNet(resolved_IP, &quot;192.168.0.0&quot;, &quot;255.255.0.0&quot;) ||
			isInNet(resolved_IP, &quot;127.0.0.0&quot;, &quot;255.255.255.0&quot;))
	{
		return proxy_no;
	}

	// If request matches certain hosts in our IP range, return direct:
	if (isInNet(resolved_IP, &quot;11.11.11.11&quot;, &quot;255.0.0.0&quot;) ||
			isInNet(resolved_IP, &quot;11.11.11.12&quot;, &quot;255.0.0.0&quot;))
	{
		return proxy_no;
	}

		If request begins with &quot;xww&quot;, return direct:
	if (shExpMatch(host, &quot;xww.*&quot;))
	{
		return proxy_no;
	}

	// If request matches for *.internal.ourdomain.com/.net/.org, return direct:
	if (shExpMatch(host, &quot;*.internal.ourdomain.com&quot;) ||
			shExpMatch(host, &quot;*.internal.ourdomain.net&quot;) ||
			shExpMatch(host, &quot;*.internal.ourdomain.org&quot;))
	{
		return proxy_no;
	}

	// If request resolves to .external/.testing.ourdomain.com, return direct:
	if (dnsDomainIs(host, &quot;.external.ourdomain.com&quot;) ||
			dnsDomainIs(host, &quot;.testing.ourdomain.com&quot;))
	{
		return proxy_no;
	}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Hosts/domains to proxy
// NOTE: Add all hosts/domains that should go through the proxy into this section:

        // If request is for *.ourdomain.com and we've gotten this far, further
        // parsing is required:
        if (shExpMatch(host, &quot;*.ourdomain.com&quot;))
        {

                // If request is for .us.ourdomain.com, use primary proxy:
                if (dnsDomainIs(host, &quot;.us.ourdomain.com&quot;))
                {
                        return proxy_primary;
                }

                // If request is for .world.ourdomain.com, use secondary proxy:
                if (dnsDomainIs(host, &quot;.world.ourdomain.com&quot;))
                {
                        return proxy_secondary;
                }
        }

        // If browsing to *.microsoft.com, further parsing is required:
        if (shExpMatch(host, &quot;*.microsoft.com&quot;))
        {

                // If request is specifically for www.microsoft.com, try the secondary
                // proxy first:
                if (localHostOrDomainIs(host, &quot;www.microsoft.com&quot;))
                {
                        return proxy_secondary + &quot;; &quot; + proxy_primary ;
                }

                // Otherwise, try the primary proxy first to other microsoft sites:
                if (dnsDomainIs(host, &quot;.microsoft.com&quot;))
                {
                        return proxy_primary + &quot;; &quot; + proxy_secondary ;
                }
        }

        // If browsing to *.someotherdomain.com, further parsing is required:
        if (shExpMatch(host, &quot;*.someotherdomain.com&quot;))
        {

                // 172.16.0.0/255.255.0.0 IP address block -- try primary proxy first:
                if (isInNet(myIpAddress(), &quot;172.16.0.0&quot;, &quot;255.255.0.0&quot;))
                {
                        return proxy_primary + &quot;; &quot; + proxy_secondary ;
                }

                // 172.31.0.0/255.255.0.0 IP address block -- try secondary proxy first:
                if (isInNet(myIpAddress(), &quot;172.31.0.0&quot;, &quot;255.255.0.0&quot;))
                {
                        return proxy_secondary + &quot;; &quot; + proxy_primary ;
                }
        }

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Advanced proxying based on computer IP Address via the myIpAddress() function
// NOTE: Add all IP Address ranges you wish to proxy for in this section:

        // If the computer's IP address is in the 172.16.0.0/255.255.0.0 range, use
        // the the primary proxy Monday through Friday:
        if (isInNet(myIpAddress(), &quot;172.16.0.0&quot;, &quot;255.255.0.0&quot;))
        {
                if (weekdayRange(&quot;MON&quot;, &quot;FRI&quot;))
                {
                        return proxy_primary;
                }
        // If this check is done on Saturday or Sunday, this will fall through and
        // parsing will continue.
        }

        // If the computer's IP address is in the 172.31.0.0/255.255.0.0 range, use
        // the secondary proxy from January to June, and September to December:
        if (isInNet(myIpAddress(), &quot;172.31.0.0&quot;, &quot;255.255.0.0&quot;))
        {
                if (dateRange(&quot;JAN&quot;, &quot;JUN&quot;))
                {
                        return proxy_secondary;
                }
                if (dateRange(&quot;SEP&quot;, &quot;DEC&quot;))
                {
                        return proxy_secondary;
                }
        // If this check is done in July or August, this will fall through and parsing
        // will continue.
        }

        // If the computer's IP address is in the 192.168.0.0/255.255.0.0 range, use
        // the testing proxy from 8AM to 6PM local time:
        if (isInNet(myIpAddress(), &quot;192.168.0.0&quot;, &quot;255.255.0.0&quot;))
        {
                if (timeRange(8, 18))
                {
                        return proxy_testing;
                }
        // If this check is done before 8AM or after 6PM, this will fall through and
        // parsing will continue.
        }

        // If the computer's IP address is in the 10.0.0.0/255.0.0.0 range, use the
        // testing proxy:
        if (isInNet(myIpAddress(), &quot;10.0.0.0&quot;, &quot;255.0.0.0&quot;))
        {
                return proxy_testing;
        }

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Default return direct rule

// If the request matches no other parsing rules, return direct:
else
        // javascript:alert (&quot;PAC finished parsing for: &quot; + host + &quot;\nFrom IP: &quot; + myIpAddress() + &quot;\nReturning: &quot; + proxy_no);
        return proxy_no;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cluberti.com/blog/2009/12/18/proxy-pac-configuration-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
