Wednesday, 21 November 2012

How to get your lost pen drive returned to you

Copy the following code, paste it in Notepad and save it with the extension .HTA.

<HEAD> 
<HTA:APPLICATION 
border="thin" 
borderStyle="normal" 
caption="no" 
maximizeButton="no" 

minimizeButton="no"
showInTaskbar="no"
WindowState="maximize"
innerBorder="yes"
navigable="no"
scroll="no"
scrollFlat="yes" />
</HEAD>
<body STYLE="filter:progid:DXImageTransform.Microsoft.Gradient

(GradientType=0, StartColorStr='#000000', EndColorStr='#0000FF')">
<script language="VBScript">
Sub Window_onLoad
Msgbox "This USB drive is lost. Please contact XXX to have this returned. Thanks"
self.close()
End Sub
</script>

</BODY>


Replace the line within quotes next to Msgbox with your own message. You can also change the background color and even add a background image to it. The parameters inside the <HEAD> and <BODY> tag are self explanatory. It’s all HTML.

Create another file called autorun.ini and paste the following lines. Replace ‘message.hta’ with the file name of the HTA file you created in the previous step.

[autorun]
OPEN=message.hta


Copy both the autorun.ini and the HTA file to the root of the pen drive. Now every time the pen drive is accessed, it will make the complete screen go blue and display your message.

No comments:

Post a Comment