Backup PC via Batch Script

I made a few small alterations to the script found [http://www.speedguide.net/read_articles.php?id=1547] and use it on a regular basis to backup my Windows 7 PC.

The source code is as follows, where F:Backup is the location on my external drive where I want my files to be copied to:

@echo off
:: variables
set drive=F:Backup
set backupcmd=xcopy /s /c /d /e /h /i /r /y
echo Starting Backup – %date% %time% >> %drive%backup.log
echo ### Backing up Documents…
echo   Documents >> %drive%backup.log
%backupcmd% “%USERPROFILE%Documents” “%drive%Documents”
echo ### Backing up Pictures…
echo   Pictures >> %drive%backup.log
%backupcmd% “%USERPROFILE%Pictures” “%drive%Pictures”
echo ### Backing up Desktop…
echo   Desktop >> %drive%backup.log
%backupcmd% “%USERPROFILE%Desktop” “%drive%Desktop”
echo ### Backing up Downloads…
echo   Downloads >> %drive%backup.log
%backupcmd% “%USERPROFILE%Pictures” “%drive%Downloads”
echo ### Backing up Favorites…
echo   Favorites >> %drive%backup.log
%backupcmd% “%USERPROFILE%Favorites” “%drive%Favorites”
echo ### Backing up Music…
echo   Music >> %drive%backup.log
%backupcmd% “%USERPROFILE%Music” “%drive%Music”
echo ### Backing up Videos…
echo   Videos >> %drive%backup.log
%backupcmd% “%USERPROFILE%Videos” “%drive%Videos”
echo Backup Complete!
echo Backup Complete – %date% %time% >> %drive%backup.log
Click [this link] to download the above batch script and enjoy!

reader_s.exe Virus Removal Instructions

A couple of my clients came to me because their computer seemed to be infected with a virus.  I hear this often and never know what exactly I’m getting myself into when I arrive to fix the issue.  Recently, “reader_s.exe” has been the pain that I have been encountering, but I think that I have finally figured out how to completely rid the infected machine of the lil bugger.

Symptoms:

  1. Internet not working
  2. Constant pop-ups (scareware) indicating that the machine was “infected” and prompting the user to pay a certain amount of money to purchase and download their “antivirus” software, which was actually a bogus program that simply removed the pop-ups that they, themselves, created.
  3. USB drives not working

Resolution:

  1. Booted the computer into Safe Mode by pressing the F8 key on the keyboard when the computer is booting up and the Windows XP logo screen appears.  Select Safe Mode from the boot menu and hit Enter.
  2. Once in Safe Mode, delete the Reader_s.exe files from the C:WindowsSystem32 and C:Documents and SettingsYourUserName directories
  3. Most essential Windows Services had also been disabled, so I used a “clean” XP machine as master list of what needed to be re-enabled.  To re-enable the services:
    1. Click on your Start menu and then click on Run.
    2. In the Run box type “services.msc” and press OK.
    3. When the Services list appears, open (by double-clicking) each of the below services (if currently “disabled”) and changing their Startup type to “Automatic” and press OK to save the changes.
      1. Automatic Updates
      2. Computer Browser
      3. Cryptographic Services
      4. DCOM Server Process Launcher
      5. DHCP Client
      6. Distributed Link Tracking Client
      7. DNS Client
      8. Error Reporting Service
      9. Event Log
      10. Help and Support
      11. IPSEC Services
      12. Logical Disk Manager
      13. Plug and Play
      14. Print Spooler
      15. Protected Storage
      16. Remote Procedure Call (RPC)
      17. Remote Registry
      18. Secondary Logon
      19. Security Accounts Manager
      20. Security Center
      21. Server
      22. Shell Hardware Detection
      23. System Event Notification
      24. System Restore Service
      25. Task Scheduler
      26. TCP/IP NetBIOS Helper
      27. Themes
      28. WebClient
      29. Windows Audio
      30. Windows Firewall/Internet Connection Sharing (ICS)
      31. Windows Management Instrumentation
      32. Windows Time
      33. Wireless Zero Configuration
  4. Once all of the above Services have have been re-enabled and the “reader_s.exe” files deleted, reboot the computer.
  5. You should notice that your machine booted into Windows faster and that you can now plug USB devices and drives into your computer and have them recognized by Windows; this is because the Plug and Play Service was previously disabled.
  6. Your network connections probably don’t work still, so on another machine, copy this [ndis.sys] file (copied from my Windows XP SP3 CD) to a thumb drive.
  7. Now, plug the thumb drive into your “infected” PC and copy the ndis.sys file from the thumb drive into the C:WindowsSystem32Drivers folder and overwrite the existing file
  8. Reboot the computer one more time, and the network adapters should all be working!
  9. Have a beer to celebrate that you didn’t lose all of your files!

It’s scary to think that you might lose all of your files because of a scamware/scareware program, so BACKUP YOUR FILES REGULARLY!  I recommend purchasing an external hard drive and either manually copy your important files to the disk, or setup an automatic backup program on your PC to copy the files for you.  Here is a [link] to the backup script that I use personally.

Twice baked potatoes on the grill

Start with two 6-7″ Russet (Idaho) potatoes.

Wash potatoes with cold water

Place 2 potatoes on a paper towel on a plate.

Using a fork, stab the top of the potatoes deep enough to simply pierce the skin and allow moisture/steam to escape.

To speed up the cooking process, place plate of potatoes into microwave.

Cook in microwave on High for 15 minutes, flipping the taters over every 5 mins.

After they have been in the micro for 15 mins, remove from microwave and allow to cool 5-10 mins or until they are cool enough to touch.  This is a good time to begin pre-heating your grill.  Heat to medium (400 degrees give or take)

Next, cut the potato length-wise, removing the top 1/3 of the tater.

Now, grab a spoon and gently begin scooping the “meat” out of the potato and place it into a medium size bowl, thus turning the potato into a tater boat.  Try to leave about 1/4″ of the potato against the skin for strength.

Tater boat

Tater boat

In the bowl that you scooped the innards into, add 1/2 cup sour cream, 2/3 cup cheddar cheese, 1 tbsp minced parsley (parsley flakes will work too), a little salt and pepper, and mix around.  Don’t over-mix the filling, leave it chunky.

Tater filling

Scoop the mixture back into the tater boats.  There should be a little too much mixture left over after filling the boats.  Om nom nom…

I like to add bacon pieces on top of my potatoes.  Any salad bacon toppers work fine for this.

Place the potatoes directly on the grill and cook for approximately 10-15 mins.  Try to keep the lid down so that the heat permeates all sides of the taters.

Tater 1

Tater 1

Tater 2 - with bacon pieces

Tater 2 - with bacon pieces

Remove the potatoes once they start to become golden and you can see the cheese mixture starting to bubble out.

Twice baked potatoes, fresh off the grill!

Twice baked potatoes, fresh off the grill!

Twice baked potato with thin-cut NY Strip steak (Montreal steak seasoning), both grilled.

Twice baked potato with thin-cut NY Strip steak (Montreal steak seasoning), both grilled.

Om nom nom!

Stop the loud system beep on remote desktop sessions

Sick of the ridiculously loud system beep coming from your Remote Desktop sessions, even if you have Remote Audio Playback turned off?  If so, do the following on your local machine that you are connecting from:

  • Open Device Manager
  • View > Show Hidden Devices
  • Expand the Non-Plug and Play Drivers node
  • Right-click Beep and choose Disable

You’ll have to reboot or log-off and back in for the change to take effect.

That’s all there is to it!

Sequentially run all VB Script (.vbs) files in a directory

Create a new C# Console Application in Visual Studio and compile the code.  Copy the compiled .exe file to the directory containing the .vbs scripts you want to run in sequence.

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Diagnostics;
/*————————————————————————–
* Developer: Tom Gee
* Date: April 6, 2010
* Description: This .exe file will run every .VBS file in the same directory
*              as the .exe, but will wait for the current .VBS script to end
*              before beginning the next.
————————————————————————–*/
namespace RunAllVBSinDirectory
{
class Program
{
static void Main(string[] args)
{
try
{
string[] scripts = Directory.GetFiles(Directory.GetCurrentDirectory(), “*.vbs”);
int i = 0;
foreach (string script in scripts)
{
i++;
Console.WriteLine(“Running: ” + script);
using (Process exeProcess = Process.Start(script))
{
exeProcess.WaitForExit();
exeProcess.Close();
exeProcess.Dispose();
}
}
Console.WriteLine(“Ran all ” + i + ” script files in current directory (” + Directory.GetCurrentDirectory() + “)“);
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine(“ERROR! ” + ex.Message + Environment.NewLine + “Inner Exception: ” + ex.InnerException + Environment.NewLine + “Stack Trace: ” + ex.StackTrace);
Console.ReadLine();
}
}
}
}