Category: How To Guides

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: Batch Converting FLV files to MKV

FLV to MKV batch conversion (article illustration picture)

To convert, or not convert? That is the question
And the answer is binary…

I wanted to convert some FLV files to a format that would play on my stand-alone LG Blu-Ray player via Home-Link and found a working solution worth sharing.

To convert one or more FLV (Adobe Flash Video Container) files to the more compatible MKV (Matroska) container “format”, simply follow the instructions below:

  1. You’ll need a copy of the FFmpeg executable:
    Download the latest Static 32-bit build from Zeranoe’s FFmpeg Builds page.
  2. You’ll now extract the compressed FFmpeg build you just downloaded.
    To extract the .7z file, I recommend using either 7-Zip (free!) or WinRAR (unlimited use shareware).
  3. Now copy the executable ffmpeg.exe from the bin folder that you just extracted to the same folder as your FLV files reside in.
  4. Open Notepad. (Shortcut: Windows key + R / Windows key + Q and type “notepad”. Hit enter.)
    1. Write or copy the following line into the empty notepad text editor box:
      for %%a in (“*.flv”) do ffmpeg -i %%a -vcodec copy -acodec copy %%~na.mkv
  1. Go to File and click “Save As…”
  2. Browse to the folder where your FLV files reside.
  3. In the file name box, enter (including the double quotes) a name for the file, with a .bat extension. For example:
  4. Hit Save.
  5. Browse to your newly created batch file and double click it to start the batch conversion process. It should only take up to a couple of minutes for a 300 MB file on a relatively new computer. You should see the progress clearly in the black command box that pops up.

NOTE #1: If nothing happens or you get an error message that you can’t read, try running the .bat file from the command line: Hit the Windows key + R / Windows key + Q . Type CMD. Hit ENTER. Type the full path to the batch file and hit ENTER again. You should now be able to read any error messages.

NOTE #2: You may need to rename the files to remove any spaces or special characters, or else the script can fail. I would suggest making copies of the original files, then you can simply copy and paste the old filenames back after conversion.

NOTE #3: Some FLV files may have MP4 extensions, and vice-versa. Either rename the extension to FLV if this is the case, or try changing the .bat command line to:
for %%a in (“*.mp4”) do ffmpeg -i %%a -vcodec copy -acodec copy %%~na.mkv

How-To: Upgrading the WiFi on the ASUS E45M1-I DELUXE

My media center has an excellent ASUS E45M1-I DELUXE motherboard, based on the dual-core AMD Fusion E-450 (aka “Zakate”) chip. This motherboard has a built-in AMD Radeon HD 6320 graphics chip which can render full HD content just fine.


Mini ITX Motherboard

The only problem is that the WiFi card that comes with the ASUS E45M1-I DELUXE motherboard lacks support for the 5GHz band.

The ASUS E45M1-I DELUXE is a Mini ITX  (6.7×6.7 inches / 17×17 cm) card, which I’ve stashed inside an old Silvestone Sugo SG05 case to make a decent media center PC for cheap. I’ve replaced the single 12cm case fan in the front with a silent Noctua fan and used an SSD instead of a regular harddisk, all in the name of silence.

Being the DELUXE edition, it comes with an onboard wireless card, which is connected by two wires to two antenna connectors sticking out at the back of the case (by the IO shield).

It all sounds great, but there’s a problem: the WiFi card that comes with the motherboard doesn’t support the 5GHz band on my wireless home router.

Read on to find out exactly why this is a problem and how I fixed it! Continue reading

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