Saturday, January 2, 2010

A Hand on Windows Live Writer

Well, I had to start something new for this new year. So, here I am, trying out Windows Live Writer to update my blog. Thanx to Rajesh, he gave the little push I needed to use it. ^_^

Happy new year Folks..

HAPPY_NEW_YEAR_2010_by_ArtemMostovoy

Monday, December 28, 2009

Detect a USB and Do As You Wish..

I was going through a Topic in CHIP Forum About preventing pendrive access in a PC and someone asked how we could distinguish PenDrive from other USB devices. Then a thought came to my mind. What if we can avoid all those USB disabling stuff and simply configure what to do with a device when it's connected, determining whether its a pendrive or not?

Then did some googling and got my hand on this stuff.

USB Detect & Launch

USB Detect & Launch allows you to automatically execute a script or application each time a USB storage device is plugged into your PC.
Actually, this application can detect a USB device depending on its Label. So you can define individual scripts for each PenDrive/NetworkDrive/any USB device..

Some examples of actions might be -
o Ejecting the drive right away
o copying certain files from USB to PC or vice versa
o Delete certain file from USB (Can prove handy when deleting autorun.inf or any suspicious file)
o Fire external app
o Do more with the help of Microsoft RoboCopy Apps..
o And use your imagination for further stuff. ~_^

So, here're how stuffs go -

First download the App and install it.

The first window you'll see is this



Tick those two options.
Then click the Vertical Button on the middle Right. It'll take you to the Edit Script page.


Write your scripts, Press Validate to ensure all is well, then Save and Press START.. That's all. Minimize it now. It'll stay in System tray and do its job.

Here're some examples of scripting -
label:BIGUN
exec:"c:\batch\batch-backup-bigun.cmd" %1 %2


label:(no label)
exec:"c:\batch\batch-backup-something.cmd" %1 %2


label:(any)
exec:"c:\batch\batch-backup-all.cmd" %1 %2


label:PENDRIVE
exec:wscript "c:\batch\batch-insert-pendrive.vbs" "%3"
menurun:"c:\batch\batch-eject-pendrive.cmd" "%2"


ignore:d:\,e:\,g:\
Here
%1 = the Drive letter like "c:\"
%2 = Volume Label
%3 = Drive letter alone like "c"
ignore = To ignore those drives that needs not to be concerned, Like Network drives.

You can also use RoboCopy tools/RoboCopy GUI like this. 

robocopy “%1podcasts” “c:\podcasts” /MOV /V /NP /S

I think you'll understand the rest by yourself. Say thanx if it helped. ^_^