Category: Microsoft

Script to Re-Map Windows Shares

I had some problems with the Windows Shares becoming unavailable at odd times, just randomly now and then. This meant I could no longer list and open my media files from my LG Home Theater or my Raspberry Pi.

I discovered that restarting a few services associated with Windows Folder Sharing solved the problem without the need to reboot.

This is a quick little script that I use to re-map my shared folders in Windows, including the disk shares (i.e. d$, e$) every night:

net stop LanmanServer /y
net start LanManServer
net start Browser
net start HomeGroupListener

Copy these lines in to a text-file using Notepad and save the file as “Sharemap.bat”, for example.

To set up an automatic scheduled job to run the script, open Task Scheduler (Start -> Run -> taskschd.msc) and set up a basic task: Right-click the folder area on the left and select “Create basic task”.

For the actions pane, select “Start a program” and point to the Sharemap.bat script.

For the triggers, you can set it to run every night at 5 in the morning or something similar.

If you’re using TrueCrypt and need to make disk shares (d$, e$ etc) map up after TrueCrypt mapping has taken place, create a trigger and set it to run “At log on”, with a delay that’s long enough to allow you to mount the TrueCrypt volumes before it runs (5-10 minutes maybe).

Alternatively, you can simply create a shortcut to “sharemap.bat” or save the file directly to your desktop and run it manually as needed.

How it works:
Stopping the LanmanServer service automatically stops the child services Browser and HomeGroupListener as well, automagically – so we only need to start those services, or at least I chose to do it that way to be on the safe side.

These network services are responsible for making Windows Shares available on the network, so it is sometimes necessary to restart them if there are any issues with finding shares, especially disk shares that are not automatically mapped by Windows, caused perhaps by delayed mounting from TrueCrypt or similar applications.

How To Turn Off The Prompt For Active Content When Opening Local Files In Internet Explorer

I just ran into this little issue when testing a small JavaScript, where Internet Explorer came up with this annoying little pop-up on the bottom of the page every time I wanted to test a new change in the code:

Internet Explorer restricted this webpage from running scripts or ActiveX controls | Allow blocked content

Unless I clicked “Allow blocked content” every single time, JavaScript was simply disabled.

That’s just no good… Continue reading

How To Stretch Your Wallpaper Across Multiple Monitors in Windows

Even Mr Bolt-on knows

Even Mr Bolt-on knows this.

Everyone with some experience with Windows and more than one monitor connected, knows that Microsoft’s good old operating system just can’t handle multiple monitors very well.

Little has improved in Windows 7, and I was therefore faced with some odd challenges just trying to make a simple 3840×1080 pixels wide wallpaper fit properly.

The only built-in “wallpaper mode” that works with multiple monitor wallpapers is the “tile” mode. However, it didn’t work correctly on my setup, as it kind of started on the wrong display due to the internal “ranking” of my monitors, making the result look like so:

After a quick Google query or two, I happened upon the perfect tool to MacGyver this problem away: Continue reading

How to Resolve the “Setup was unable to create a new system partition” Issue During Windows 7 Setup

Just the other day, I stumbled upon a couple of challenges when trying to install Windows 7 on a RAID array of two SSDs on my computer.

1st Issue: The missing RAID drivers

Since they didn’t exist when Windows 7 SP1 was put together, I had to load them manually inside of Windows 7 Setup.

This was simple enough, though:

  • I got on my laptop and downloaded the Intel RAID drivers from the ASUS support page for my Sabertooth X79 motherboard, then extracted the files to a USB drive.
  • I unplugged the USB disk from my laptop and loaded the driver from within Windows 7 Setup by connecting the USB drive to my main computer while in the “Where do you want to install Windows?” screen. I clicked “Load Driver” and browsed to the “Driver\Disk\64bit” folder. The next screen let me choose which driver to install (only gave me one choice).
  • The driver loaded in a couple of minutes and the disk showed up, just like a good student to school.

2nd Issue: “Setup was unable to create a new system partition”

This issue was a little trickier. To my disappointment, Windows 7 wouldn’t let me install on the RAID disk array I had chosen, giving the following error message:

“Setup was unable to create a new system partition or locate an existing system partition. See the Setup log files for more information”. Continue reading

How To Determine Windows Edition

Sometimes you might want to check for which Windows “edition” is installed on a computer. Let’s say you’ve made an app that you want to be free for personal use, but want to force enterprises to pay a licensing fee if they want to use it in their environment.

A quick and dirty registry key check performed in the startup sequence of your application can be enough to find whether the Windows “edition” installed is Home Basic, Home Premium, Ultimate or Enterprise. Continue reading

A First Look at Windows 8 – Finally Some Tablet Power!

Microsoft posted this first of several upcoming “Building Windows 8” videos a few days ago.

I think it showcases some interesting features that look very promising for a good tablet enabled OS, such as a logical app layout and full seamless multi-tasking support for the apps.

We learn that HTML5 and JavaScript are going to be the core technologies for developers looking to make apps for (codename) “Windows 8”, so if you’re aspiring to do so, you might as well get started on sharpening up those skills asap.

Anyways, moving pictures say more than a thousand words, plus Jensen Harris does a great job at presenting through the spoken word. Check it out: