Monitor File or Directory Changes with PowerShell and Email Changes

I had a need to monitor a file/directory for changes, or more specifically entries into an error log by an application. I wanted a trigger on file change using a PowerShell or some other script, since the application didn’t have alerting capabilities built in. I wanted a script to check read the log file and send an email when the file changes containing what was changed, or in this case what the error was.

You can tweak the script to monitor a directory or specific file, and customize the email with the file name or more. Either way this is the basic script. Schedule a task in Task Scheduler (Windows 7) or Scheduled Tasks (Windows XP) to run at login for that specific user, and make sure it never terminates or times out. Set your application to run:
Continue reading Monitor File or Directory Changes with PowerShell and Email Changes

Run Windows Applications In Elevated Mode (UAC Prompt) sudo for Windows 7

So how do you get a batch file to run as an elevated user? For example, I have a batch file that will copy the contents of an XP user’s profile to a Windows 7 user’s profile. The only catch is that the Windows 7 user profile structure is different, and the batch file must be run elevated in order to read the junctions so as to not fail the copying. So how do you do this without having the user right click and “Run as Administrator”? Elevation PowerToys for Windows Vista 7. This file contains a ton of useful scripts for the admin, or even the average power user. I can’t believe this has been out since June 2008 and i’m only finding it now! Great tool without having to use the runas command, or play with a Power Shell script. This will most certainly be deployed on all my future Windows 7 machines!

The two key files in this package are:

  1. elevate.cmd (+)
  2. elevate.vbs (+)

The CMD is a simple batch file that will pass arguments into the VBS file. The VBS file will prompt the end user with the typical UAC prompt to allow or cancel, or display a usage box if no arguments are specified.

I only made one slight modification, since I would always be launching this from a Run or Command window. I changed the last line in the batch file to read:

I dumped these two files in my C:\WINDOWS\SYSTEM32 directory, and renamed them to SUDO.CMD and SUDO.VBS. I no longer need the Start++ application for the sudo command!
sudo for Windows 7

Install Flash on Ubuntu 10.04 (lucid) 64bit

Credit to “My Science is Better” for the tutorial on installing native 64bit Flash Player 10 on Linux. You can find the article here, but most importantly the script here.

chmod +x the script and run it…

Since I lost my tapt script, here’s my mirror…

Fix PDF Viewer on Windows 7 x64 with Outlook 2007

Followed directions from:

http://www pretentiousname com/adobe_pdf_x64_fix/index.html (LINK REMOVED)

This fixes the PDF Preview Viewer integration with Outlook. This prevents you from having to open the PDF and you can now view it like other office documents. Bug with x64 bit versions of Windows and Adobe.

Download it here: adobe_pdf_x64_fix

Keep track of your apt-get’s with tapt

Yes, I run Ubuntu, and I love it. But the problem is that I need Windows, and a Virtual OS isn’t good enough. Therefore I don’t get the time to use Ubuntu as much as i’d like too. As Ubuntu keeps updating, so do the the features and usability. I always use “sudo apt-get” to install my programs, but after several months of time between tests, I always forget which apps I installed. Continue reading Keep track of your apt-get’s with tapt

Virus scanning recommendations for Windows 7

I posted this on the old site, but it’s worth posting again due to the release of Windows 7. This Microsoft KB article outlines the recommended configuration for Anti-Virus programs on almost all versions of Windows. A must see for Administrators!

Starts out:

“This article contains recommendations that may help you protect a computer that is running Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Microsoft Windows 2000, Windows XP, Windows Vista, or Windows 7 from viruses. This article also contains information to help you minimize the effect of antivirus software on system and network performance.”

Windows 7 Remote Server Administration Tools (Adminpak.msi?)

Where did adminpak.msi go for Windows 7? If your running Windows 7 and need to manage Server 2003 and Server 2008 remotely, this lets you do it! There’s a x64 and x86 version, so download the right one! I am able to remotely manage my 2003 forest using these tools.

Microsoft’s Download Page

Microsoft’s Info Page

Disable or Hide Windows 7 FolderBand (AKA Organize Bar)

Modify your ShellStyle.dll file found under:

to Auto-Hide or disable completely this FolderBand (which I call the Organize bar). Continue reading Disable or Hide Windows 7 FolderBand (AKA Organize Bar)

Sudo for Windows 7 (via Start ++)

User Account Control (UAC) has finally been “fixed” in Windows 7 eliminating the endless prompts to allow something to happen, like simply copying, pasting or deleting files. Since Microsoft had “tweaked” the UAC settings you only get the prompt when making major system changes like Running Programs as Administrators Continue reading Sudo for Windows 7 (via Start ++)

Glasser Ad-On for Firefox (Windows 7)

This is a must have for Firefox to blend it in to Windows 7!

Screen Shot Glasser Ad-On Firefox
Screen Shot Glasser Ad-On Firefox