OICE_15 Folders

After being plagued with hundreds of OICE_15_XXXXXXX folders and the pain in the arse to get rid of them I have decided to make my life a tad easier today.

I have seen these folders being created under AppData in the roaming profiles of users, they get copied up and down as the user logs on and off and ultimately end up causing the roaming profiles not to sync as they are over quota.

I can’t add them to folder exclusions as they are all different and I can’t find a way to move them or stop them being created. We have to delete them as and when we come across them and they are not always easy to delete as some of the file are dot files and windows says it’s not there when you try and delete it! WTF FFS

I normally browse to the folder, shift right click and select `Open Command windows here‘, go into each folder and delete the dot files, then delete the folders. But it takes for bloody ever as I have to do that on the computers and on the server where the OICE_15 folders are.

To make life easier I have added an extra context menu to the right click menu for folders called `KillDOTFiles`

Windows Registry Editor Version 5.00
@=""C:\Windowskilldotfile.bat" %1"

Created a batch file that had the following contents

for %%a in (%1) do set temp=%%~nxa
set OICEDir=%temp:~0,4%
if /I NOT %OICEDir% == OICE (
rem echo No
) ELSE (
rem echo Yes
del %1*.* /q /f
rd %1 /s /q

Now all I need to do is highlight the folders, right click and they get deleted.

Ive added a bit of checking to the batch file, as if I give the file to anyone else i do not want to be held liable if they delete the wrong directory! It will happen!!

Why did I not think of doing this before?

QuickTime Issues – Poxy Apple Software

What a waste of 3 days this has been!

A problem was reported to me – someone couldn’t view a webpage with a QuickTime move in it.
Given that QuickTime was in need of an update as it was well out of date, I decided to update it first.

I am really not sure what the hell was going on, but it was plagued with errors. The main one being when I created the deployment package in SCCM it deployed the Apple Application Support MSI but then failed deploying the QuickTime MSI. The Apple Application Support MSI was a dependency of the QuickTime MSI. That worked fine but the QuickTime MSI failed saying that a version of QuickTime was already installed.
So I deployed a clean image to my test machine that included QuickTime and set about deploying the new version of QuickTime. Same error again – a version of QuickTime was detected again. Ok so much for upgrade! So I removed all Apple components and deployed QuickTime again. The same error.
I double checked and went through the registry and removed every Apple reference, went through ProgramData and removed everything Apple and in Program Files and Common Files etc. With everything gone I deployed it again. The same error?!?!

I then decided to run the MSI files manually. The Apple Application Support installed fine, but the QuickTime failed again with the same error.
This time I ran SysInternals Process Monitor to capture everything so I could see what was going on.

Several hours later I came across a registry entry that looked like it was causing the error. I deleted it and run the QuickTime MSI again only to find the registry key was back and so was the error. Now that made no bloody sense at all?
Thankfully I had a weekend to forget about that crap and start a fresh on Monday, which seemed to work as I redone the 2 deployments in SCCM and it then installed Apple Application Support and QuickTime with no issues. I really do not know what happened there, as nothing was different.

So, back to the original reason for doing this, I checked the online video and it still didn’t play.
So after all that faffing I was no further forward!
I then renamed my roaming profile and logged in and tried it again. This time it worked!
I looked through the roaming profiles folder to see what Apple stuff I could find, but as I severely limit what is allowed to roam there was no Apple files / folders there.
I then coped the old registry file over and logged on again – movie didn’t play again.

So the issue was with the registry.
I loaded up regedit and went through all the references to Apple or Quicktime that I could find, deleting all then one at a time then trying the online video again.
I finally came across a key called

HKCU/Software/Microsoft/Internet Explorer/Internet/Registry/REGISTRY/USER
[SID]/SOFTWARE/Apple Computer, Inc./QuickTime/LocalUserPreferences

With a setting called FolderPath that was set to an invalid location.
I changed the location to a valid one and hey presto it worked! FFS

It’s so nice to see Apple software that is enterprise friendly!

TechNet Subscriptions

Microsoft have decided to retire their TechNet Subscription service

I signed the “Continue TechNet or create an affordable alternative to MSDN” petition to show my support for keeping the Microsoft TechNet Subscription service going.


As an IT Professional I use the software a hell of a lot to test things out and set up test environments. Some environments I have had going for well in excess of a year and having to rebuild them regularly would be a right pain to say the least!

I don’t know any fellow IT Pro’s that could afford an MSDN subscription to match the TechNet one.

If you are a TechNet Subscriber then sign the petition and show your support for keeping it going.

Microsoft, please continue the TechNet Subscription Service.

Thank you

SCCM 2012, PowerShell and Printer Share Creation

Today I wrote a couple of quick PowerShell Scripts to get shared printers from all computers on the domain, and another one to take the data returned and use it in an OSD Task in SCCM 2012 to create the shares printers when we deploy Windows 7.

The first script is as follows

# By Gary Rice
# V1 - 14/05/2013
# Printer information for import needs to be as follows
# $Printers = "HP LaserJet 4250 PCL6","Kyocera FS-1030D KX"
# $Computers = "MININT-HJ0UIN4","MININT-LR30CVS"
# $Sharenames = "MININT-HJ0UIN4-HPLJ4250","MININT-LR30CVS-FS1030D"

$OutPut = ""

$NL = [Environment]::NewLine
$FileName = Get-Date -format "yyyy-MM-dd-HH-mm-ss"
$Filename += ".txt"
$C = ""
$Pstring = "`$Printers = "
$Cstring = "`$Computers = "
$Sstring = "`$Share = "

$OutPut += "Computer,Printer Name,Printer Driver,Printer Share Name" + $NL
$OU = "OU=Desktop Computers,DC=test,DC=internal,DC=snowey,DC=com"
$DomainComputers = Get-ADComputer -SearchBase $OU -Filter `*` | Select-Object -ExpandProperty Name

foreach($Computer in $DomainComputers)
    if(!(Test-Connection -Cn $Computer -BufferSize 16 -Count 1 -ea 0 -quiet))
        $OutPut += $Computer + "," + "Error" + $NL
        $Printers = get-wmiobject -computername $Computer -query "select * from win32_printer"
        foreach ($Printer in $Printers)
            if($Printer.Shared -eq "True")
                $OutPut += $Computer + "," + $Printer.name + "," + $Printer.drivername + "," + $Printer.ShareName + $NL
                $Pstring += $C + "`"" + $Printer.drivername + "`""
                $Cstring += $C + "`"" + $Computer + "`""
                $Sstring += $C + "`"" + $Printer.ShareName + "`""
                $C = ","

$FilenameFN ="Computers-Printers-" + $Filename
$Output | Out-File $Env:Temp$FileNameFN
Invoke-Expression $Env:Temp$FileNameFN

$OutPut = $Pstring + $NL + $Cstring + $NL + $Sstring
$FilenameFN ="Computers-printers-OSD-String" + $Filename
$Output | Out-File $Env:Temp$FileNameFN
Invoke-Expression $Env:Temp$FileNameFN

It’s not very complex, it just goes off and gets all the computers in a specific OU, checks that are active then loops through all the printers and if any are shared it saves the computer name, printer driver name and share name to file. I had to use printer driver name as the Printer name was not always accurate or what it should be due to historical renaming.

Then, the script that I included in the OSD Task Sequence was

# By Gary Rice
 # V1.1 - 15/05/2013
 # Uses `Shared Printers on Domain Computers.PS1` to generate data
 # To be run as part of SCCM 2012 OSD Task

$Count = 0
 $Printers = "HP LaserJet 4250 PCL6","Kyocera FS-1030D KX"
 $Computers = "MININT-HJ0UIN4","MININT-LR30CVS"
 $Shares = "MININT-HJ0UIN4-HPLJ4250","MININT-LR30CVS-HPLJ4250"

foreach ($Computer in $Computers)
 if ($Computer -eq $env:computername)
 $TargetPrinters = get-wmiobject -computername $Computers[$count] -query "select * from win32_printer"
 foreach ($Printer in $TargetPrinters)
 if ($Printer.name -eq $Printers[$Count])
 $Printer.shared = $true
 $Printer.sharename = $Shares[$Count]
 $Count += 1

Again very simple, it takes an array of computers (printer names and share names) and loops through them until it finds a match. It then loops through all the printers on the local machine until it finds one that matches Printer Driver and then it creates the share.

There might be a different / easier way of doing this, but when you need something quick.

Hopefully someone might find them useful (or not).

IE10, desktops.exe and noframemerging

Today I upgraded my Windows Server 2008 R2 server to IE10.
Having used it on my work pc and my various Windows 8 installations for a while I thought it’s time to upgrade my server.
A quick install and reboot and it’s all done.

As I use my server for most of my work, it’s on all the time as it hosts Yodacam and is accessible remotely, it is a god send to have it all there when you need it.

I use Desktops from SysInternals to split up my work on to 4 separate desktops to keep the clutter to a minimum. My desktops are split into the following

Main Desktop – various email accounts, web browsing, Excel, Word etc
Development Desktop – php/asp.net websites, mysql and any think VB.net
[Undisclosed] Desktop – used for an [Undisclosed] task
Remote Access Desktop – for RDP/TS sessions to various computers and servers

I was working away on the Main Desktop and the Remote Access Desktop when i needed to do some work on some php files. Loading up a IE10 browser windows resulted in nothing showing. So I clicked it again but still nothing. I checked Task Manager and could not see anything that looked like a hung iexplore.exe process but there was nothing.

I then switched to the Main Desktop only to find several new IE10 windows open on the desktop. It would appear that every time I clicked the IE icon it would open a new window on the main desktop, which is not how it was in IE9.

I done a bit of digging and found a switch for IE10, `-noframemerging` which said `Internet Explorer 8 and later versions. Prevents Internet Explorer from opportunistically merging new frame processes into existing frame processes.`

I created a new shortcut to IE10 and added the -noframemerging switch to it. Now every time i load up a IE10 window it opens on the correct desktop.

Oh and Yes i know other browsers are available to use and I now there are other multiple desktop programs out there, but I am used to using IE and Desktops.exe and will continue to do so. GOI

MSE 0x80070645 Error

Today I had a call from my brother saying that he is having some problems updating his Microsoft Security Essentials on his W7 PC. After running through a few things with him and having a remote session we still weren’t any further, so I suggested that he drop it off so that I could take a `Hands On` look at it.

I was somewhat miffed that I couldn’t install a simple piece of software like Microsoft Security Essentials so made it my job to do so.

While I was waiting for the machine to arrive I have a quick look around on TechNet for the error code 0x80070645 and after sifting through a fair few results it looked like I had 3 options!

Reinstall the operating system – Seriously? Who does that these days?
Put in a support call to Microsoft – Again, seriously?
Install a different Antivirus – Yeah ok I get that, but that is not the point here.

Not willing to do any of those, mainly because I pride myself on trying to fix all computers that come my way without doing a reinstall or getting top level help. 99.49% Fix rate will tell you how serious I am about that.

I tried most things that were suggested by others that were in the same situation.

Microsoft Security Essentials Removal Tool (http://support.microsoft.com/kb/2483120)
That run and said that it had finished ok, but after a reboot MSE still failed to install with the same 0x80070645 error

Manual removal off all files, registry settings and services etc. using a script.
That run with errors as there were some files etc. that were missing because of the former uninstallation. Again after a reboot MSE refused to install with the 0x80070645 error.

I manually checked the file system, registry and services to see if there were any stragglers left over, but there were none.

I tried the install again and when the install failed again I checked the MSE installation log and found an error when it came to remove the mpfilter.sys driver which was odd as there was no mpfilter.sys driver on there?
I extracted all the files from the MSE installation and looked at the mpfilter.inf file to see what had been missed of the uninstallation, but could not see anything that was.
I copied the mpfilter files back to the computer and tried to install the driver again, finally having to recreate the service manually. I then tried to do the install again, and this time it got a bit further according to log, but it still failed with the same 0x80070645 error.

This was now a right pain as I had to copy the files over and recreate the service every time I wanted to run the MSE installer to trouble shoot the next thing that was wrong. More searching on TechNet and further afield did not give me anything else to go on.

I then tried one of my random thoughts – what happens if I install Forefront Endpoint Protection Client on the machine? I had looked at Forefront Endpoint Protection a while back as part of my TechNet subscription.

So I installed FEP, expecting it to fail given some of the similarities, but it installed with no problems, went off and updated and done a full scan. I saved the FEP install logs so that I could take a look and compare it to one of the failed MSE install logs that I had.
I then removed FEP and rebooted and thought I would try and install MSE again.
To my surprise MSE installed fine, updated and done a scan – no sign of the 0x80070645 error.

I saved the install logs so that I could compare the FEP install against the MSE install, but sadly my USB key stick with all my tools, utilities, scripts and install logs decided to die on me! Not a major problem as most of it is somewhere else, but the log files I could not get back.

So, I’m not sure why that happened or what the FEP install did that was different to the MSE install but it did fix the problem. I will have to wait for another machine to turn up with that error before I can take a proper look at the logs to work it out.

Thankfully, another awkward computer fixed.

Windows 8 – well almost

I have just spend a good few hours trying to get Windows 8 on my laptop, so I could get a bit more involved with it.

You would think that in today’s world things would be easy enough to do – installing the latest Windows Operating System should be one of those. Hmmm not quiet

I download an iso of W8Pro x64 and burnt it off ready to install. I pop it in the laptop, boot from it, put in my key and let it install. I come back about 30 mins or so to find an error message on the screen – Error Code:0x80070570

A Quick look on the Knowledge Base that is Google tells me that there could be something up with the hard disk or the DVD media, but as the laptop had W7 on it and had no problems and the DVD was a fresh burn of an iso I used to install the last W8 Hyper-V machines I gave the disk and the dvd rom drive a clean and tried again.

Again I wander off while it’s doing its stuff and then come back a bit later, again to find the same error message! This time I binned the DVD media and burnt a new copy off in case there was some kind of burn issue.

Again I wander off and go and do some more stuff, leaving it not so long this time before I came back. Again I find the same error message! Ok, so this time I downloaded a different ISO and burnt it off. I then booted and went to install that.
This time I sat there watching it, only for it to do the exact same again!

Last thing I could do was to swap the hard disk with another. So I done that, put the DVD back in, booted and let it do its install.

This time, I paid more attention to it, watching it as I was doing some web dev. Yet again it done the same thing at about 11%!

So, still got problems and I have swapped the hard disk and the DVD media, I don’t have a laptop to swap to see if it was that, but then it was working ok with W7 4 hours before I tried to install W8.

Again, I started an install off, paying even more attention to it. It got to 10% and the DVD stopped flickering and spinning, so I checked the mouse worked and then got a CMD prompt up to see if I could get to a log file. No sooner had I typed in DIR than the DVD started to spin up again?! Seriously what is that all about. So I left it carrying on copying more data only for it to do the same again. Another DIR caused it to spin up again. This went on for a good few time until it seemed to carry on ok. So I done the off and went down stairs.

A little later I came back up to find what looked promising, but turned out to be a hung machine – or so I thought. No mouse, no keyboard – no nothing! Bloody thing! So I pressed the power button getting myself ready to have to start again, only to find that it flickered and suddenly sprung back into to life! It then carried on doing its stuff and installed W8.

Really have no idea what was going on there, as I have never seen anything like that before. But it is now installed and working fine!

Another one fixed

Today I done one of the things that I love doing – helping someone out.

I was given a laptop that was knackered and on it was the users personal and company data. Added to the already stressful situation of it being knackered was the fact that there was no backup of the data! Needless to say, they were not in the best of moods and were way from happy.

The situation reminded me of a time at my old company, where some one else was asked to look at one of the bosses computers. I had previously fixed it twice before so was surprised to not do it again.
Anyhow, I sat and watched not one, not two, not three, not four but five people spend time looking at this computer on and off with each other. It took them all day to get it working, well when I say get it working, they said that they installed a dodgy copy of Windows 7 on it and said it would be much better than the operating system that it had on it before?!?!?
Vista may be many things but it was a legal copy and it had been working fine for several years.
I had to have a laugh to myself, while thinking – Idiots!! Any proper technician would not do that, but then …..

So, back to the problem in hand, several hours later I had managed to get all the important and critical data off of the knackered disk and go about setting the laptop back up again.

Its nice to get a good feeling of helping someone out, while kind of saving their life.

Dumbing it down!

You know, sometimes you really do have to dumb it right down to ID10T level – that im afraid is a lesson that I should have remembered from my old company when I was working with some of the people there.

I guess sometimes I look at things far too technically – for example for the past 4 days I’ve been trying to unlock a TA612V Netgear VOIP adapter as I found a couple on eBay cheap. I suggested to the silver fox that he should get one to replace his dodgy ATA device that has been playing up.

While the TA612V is a old bit of kit, I have had one sat in my comms room linked up to my Sipgate service running with no problems for years.

So, 2 TA612V`s turn up for me to find that they are brand new and locked to Sipgate. Not a problem as that is who I want to use it with. Sadly they no longer support the TA612V and have no config files or L2 passwords for them. OH!
So I spend time looking for a way to unlock them. I went searching for a way to get a L2 password and found a few instructions how to get them. I spend the next 2 days researching and soldering wires on the the pcb to establish a com connection, only to find that I had the wrong cable.

So new cable ordered I thought I would leave it for a bit, but then found a 3rd TA612V in my broadband equipment box, which amazingly was unlocked.

I configured it to use the details of the Silver Fox`s VOIP connection, which took a few tries as it seems the specifics were different from mine. Finally I got it configured and it went off and connected. I tested a phone call but found that I could not hear the other end.

So I changed IP addresses and put it in place of my box and plugged the phone in and turned it on. My firewall was set to point certain traffic to my TA612V so I guess that was the issue. After it connected I made another phone call and got the same problem. So I compared configs to make sure that nothing was different, but they were exactly the same. I then changed the settings back to my account and tried that – still the same problem.

I then put my box back on and let that boot up, only to find that the same problem was happening! How could that be, as I had not changed anything on my TA612V.
So, what the hell was wrong? Maybe the TA612V was blocked as I had been swapping 2 of them around?
I left the TA612V to `settle down` for a few hours but it made no difference!
I left the TA612V off all night but it made no difference!
Maybe my firewall had got confused – rebooted it but no different!

I then spoke to the Silver Fox who told me that his TA612V worked fine, not only could he hear other people and they hear him but he had his working behind his firewall with no ports open??

By this time I had lost the plot and was ready to go back to the fast food industry, when I had a thought – let me try the landline phone on the TA612V instead of the phone i have plugged into it.

The rest you can guess!