Case of the Unexplained: 2014

Mark Russinovich’s famous “Case of the Unexplained” for 2014 from TechEd Europe 2014:

– Soli Deo Gloria

Migrating from XP to Windows 7 – Inventory What’s There

In the mist of upgrading from Windows XP to Windows 7 on all of our computers, I thought I would share some of the scripts I’m using to make life a little easier.  We currently use local user profiles, printers added manually by hand through a Windows print server and sometimes statically mapped network drives for users that need to perform cross duty work in other departments.

Yes, I give you permission to laugh and yes I know there’s ways of doing these things in an automated and centralized fashion.  Going into the companies we buy, however, I’m seeing even sillier things in their environments.  One was a guy that was using Clonezilla, an external hard drive, a USB stick (at least it wasn’t a CD-ROM) and doing a custom image for each and every model of computer hardware he had.  He had an impressive talent for scripting however and I found many clever VBScript snippets all over the network he was firing via the login script to do things automated and in the background.

The below script is quick, dirty and thrown together from many different sources.  It will give you:

All the drives and UNC paths mapped under the logged in user’s profile

All of the printers networked and local under the logged in user’s profile

The default printer of the logged in user

Names of all Outlook profiles of the logged in user (this will error out if this does not exist)

List of unsorted software as given from WMI

Simply call it as the user from the login script and SCCM and dump the file to some where world writable.  It will dump the contents in plain text to a file in the format of

– Soli Deo Gloria

On Error Resume Next

Const HKEY_CURRENT_USER = &H80000001
Const r_ProfilesRoot = "Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"

strComputer = "." 
Set objWMIService = GetObject("winmgmts:" _ 
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 
Set colInstalledPrinters = objWMIService.ExecQuery _ 
 ("Select * from Win32_Printer where Default = True") 
For Each objPrinter in colInstalledPrinters 
Dim objFileSystem, objOutputFile
Dim strOutputFile


Set objFileSystem = CreateObject("Scripting.fileSystemObject")

Set Shell = CreateObject("WScript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set oDrives = WshNetwork.EnumNetworkDrives
Set oPrinters = WshNetwork.EnumPrinterConnections
oUser = WshNetwork.UserName

computername = Shell.ExpandEnvironmentStrings("%computername%")

strOutputFile="\\wksms01\logs\" & oUser & "." & computername & ".txt"
Set objOutputFile = objFileSystem.CreateTextFile(strOutputFile, TRUE)

objOutputFile.WriteLine("Network drive mappings:")
For i = 0 to oDrives.Count - 1 Step 2
objOutputFile.WriteLine("Drive " & oDrives.Item(i) & " = " & oDrives.Item(i+1))
objOutputFile.WriteLine("Network printer mappings:")
For i = 0 to oPrinters.Count - 1 Step 2
objOutputFile.WriteLine("Port " & oPrinters.Item(i) & " = " & oPrinters.Item(i+1))

objOutputFile.WriteLine("Default Printer: ") & PrinterDefault

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ 
 strComputer & "\root\default:StdRegProv")

oReg.EnumKey HKEY_CURRENT_USER,r_ProfilesRoot,subKeys

objOutputFile.WriteLine(" ") 
objOutputFile.WriteLine("Outlook Profiles: ") 

For Each profileName In subKeys
 objOutputFile.WriteLine( profileName ) 

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery ("Select * from Win32_Product")

objOutputFile.WriteLine(" ") 
objOutputFile.WriteLine("Installed Software: ") 

For Each objSoftware in colSoftware
 objOutputFile.WriteLine objSoftware.Caption & ", " & objSoftware.installDate & ", " & objSoftware.installDate2


Set objFileSystem = Nothing

AutoAdministator: A Nifty Free Remote Management Tool

This tip comes from the website  There is a program called AutoAdministrator that used to be payware, but is now freeware.  This program allows you to drill into your Active Directory structure and check off a bunch of computers for an action.  What can you do?

  • Password updates
  • Remote shutdown / reboot
  • Services maintenance
  • Registry maintenance
  • Network ping
  • Remote file management
  • Remote file information
  • Logged on user information
  • Execute processes locally or remotely
  • WMI queries
  • ODBC maintenance

I used it to select all the computers in an OU and then look at the logged in user to see if the computer description matched up.  I was also able to remotely execute programs against multiple computers which is very cool!

– Soli Deo Gloria

Set Folder and Registry Permissions with VBScript

Sample VBScript opens up registry and folder access with write access for the Everyone group:


' Create temp file with the script that regini.exe will use
set oFSO = CreateObject("Scripting.FileSystemObject")
strFileName = oFSO.GetTempName
set oFile = oFSO.CreateTextFile(strFileName)
oFile.WriteLine "HKEY_LOCAL_MACHINE\Software\TraxStar Technologies LLC\Client [1 5 7 11 17]"

' Change registry permissions with regini.exe
set oShell = CreateObject("WScript.Shell")
oShell.Run "regini " & strFileName, 8, true

' Delete temp file
oFSO.DeleteFile strFileName

Dim strHomeFolder, strHome, strUser
 Dim intRunError, objShell, objFSO

 strHomeFolder="C:\Program Files\TraxStar"

 Set objShell = CreateObject("Wscript.Shell")
 Set objFSO = CreateObject("Scripting.FileSystemObject")
 If objFSO.FolderExists(strHomeFolder) Then
 intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls """ & strHomeFolder & """ /t /c /g everyone:F ", 2, True)
 End If

– Soli Deo Gloria

Giveaway of the Day: XYplorer 14.40

Very nice filemanager.  I own the full version, but this free one is almost as good!  Today only.

– Soli Deo Gloria

A Weekend with Plex

Finally decided to take the plunge and bought the lifetime subscription for Plex so I could dump all my TV shows into it and stream them to my TV in the living using Chromecast. However, certain TV shows just wouldn’t show up and the server log files weren’t much help.  The issue is that Plex expects to see files in the SXXEXX format, where S is the season and E is the episode number.  If your files don’t have this format, Plex will refuse to add them properly.

The real bear of course is that you may have many files…thousands of files…that do not fit this format.  What’s a guy to do?  Filebot to the rescue!  Basically: this program looks at each filename trying to determine what TV show it belongs to from an online TV database and then offers to put it in the proper naming format.  If the files are missing the TV show name, you can use Bulk Rename to add the show name to any part of the file en mass.  To find out if you are missing any episodes you can use TV Rename.

– Soli Deo Gloria

Bill Gates Trashed the Charms Bar, Win9 to RTM by end of 2014

– Soli Deo Gloria

Windows 9 Tech Preview Coming in Late September

– Soli Deo Gloria

Paragon Rescue Kit 14 Free

Got an e-mail from Paragon this morning about the Windows PE based Paragon Rescue Kit 14 Free:  Decided to take it for a test drive and unfortunately, I am disappointed.  First, you cannot install the program without registering.  It’s free to register to get the codes, but that’s a pain!  It wanted to use the Windows 8.1 ADK which I downloaded.  There’s two versions you can build: x86 and x64.  I built the x86 version.  I booted it and it comes up with a screen with several buttons: backup to virtual disk, postmortem backup, undelete partition, boot corrector, transfer files, load drivers, setup network.  You can also do a restore of course.  That’s it.  No file manager, no desktop and…no thanks.

There are better WinPE discs out there such as this one or the ones over at

– Soli Deo Gloria Fall in love with e-mail again

My e-mail has been pretty stable.  I was using my own domain with Tuffmail for the past 9 years.  Tuffmail has been rock solid, but has been lacking in infrastructure upgrades.  Recently, I tried changing my password on Tuffmail and had to contact tech support to do so.  The writing was on the wall: it was time to look for alternatives.  I copied all my e-mail over to my web host Eleven2.  They offer unlimited mailboxes and bandwidth.  It was already included in the price I pay for web hosting, so why not?  Well, I can tell you why not.  First, Eleven2 is a web host and not an e-mail provider.  The controls you have over your e-mail are very basic and I got a lot more spam than I did at Tuffmail.  I tried to e-mail an ATT e-mail address and it was bounced back: the server my website is on was on some type of blacklist.  Then, I couldn’t get to Eleven2 at all: they had blacklisted my IP for too many failed IMAP logins (what?).  Enough was enough: I had to move, AGAIN.

I decided to try since it is highly recommended over at and I have to say: I found my new home!  I love the web interface: simple, elegant, clean and functional.  Tons of options you can configure…setting up my aliases and rules was a breeze. Discounts for multiple year subscriptions.  Clear descriptions on each account level.  Oh look: you can import e-mail from another provider!  I tried it and it worked flawlessly.  Wow, I’m hooked!

Then it was to over to configure Outlook 2013 to work with Fastmail and that’s where the trouble started.  For some reason, Outlook would show me new mail in Inbox but not any of the subfolders I had created unless I clicked on each folder.  Basically, my setup is if you e-mail, I create a rule for that alias and then move that message into the something folder.  It helps route messages into bins for sorting.  If someone adds to a spam list, I can delete and re-create a new alias.  I deleted and re-created the account in Outlook several times, toying with settings…no dice.

I went looking on the Internet for a new mail client.  Ah, there was Eudora!  I had used that for many years back in the 90s.  I loaded it and yeah…crash, crash, crash.  Tried Operamail and then I tried Mailbird and this program actually worked correctly with IMAP at Fastmail. Mailbird allows you to add up to 3 accounts in the lite version…works naively with Google’s calendar…very nice!  It can check all 3 of my accounts and then it places the number of new messages in a little envelope in the taskbar.  Goodbye Outlook 2013!

– Soli Deo Gloria