Posts Tagged ‘Scripting’

Uninstall Ranger from a Computer without the RangerRemove User

Sometimes it might be necessary to remove Sentinel’s Ranger software from a computer with the minimum of fuss. Even though there is a removal user account. For instance, this may not work.
So here’s a handy script to automitcally disable Ranger on a workstation. This returns some Windows settings back to normal and backs up the [...]

Read the rest of this entry »

Adding Printers will Hang a Vista Logon to a Domain

Vista’s UAC prevents standard users from installing printerr drivers by default. This can cause a problem, especially if you use a logon script or group policy preferences to add shared printers to the user profile.

Luckily there’s a quick group policy fix that will allow users to add printers without any prompt. Once configured, you should be able to log on with a user account that automatically adds the printer without a hitch.

Read the rest of this entry »

Deleting files older than a specific date or age

I needed to delete a chunk of cookies today – but I didn’t want to delete them all.
Thankfully there is a handy command that is within Windows versions after XP such as Server 2003 and Vista that will enable to clean up without too many problems.
The forfiles command will allow you to set a specific [...]

Read the rest of this entry »

Praise Be for Regular Expressions

I used a regular expression in VB for the first time ever (I think) today!
The reason is that I cached some generated ASP and realised that when I needed to use it on different pages, the id lookup for certain elements would change. So, no problem (except for the fact that I’m coding in ASP):
Dim [...]

Read the rest of this entry »

PHP Toggle Variable

A neat trick I use in PHP is a toggle variable, usually when I’m creating tables and want to alternate the styles.
To use a toggle variable:
#Create the variable
$toggle=true;
#Switch it
$toggle=(!$toggle);
Simple!

Read the rest of this entry »

TrueCrypt Autorun Script for USB

You can easily create an Autorun file on a USB pen drive to mount and dismount the encrypted file systems. This is very useful for carry portable TrueCrypt USB drives.
The only downside is that using TrueCrypt on the move means that you need administrator rights to access the disk.
Once you plug in the USB stick, [...]

Read the rest of this entry »