superbem
Joined: 30 Jul 2007 Posts: 20
|
Posted: Sat Sep 01, 2007 12:36 am Post subject: Autorun in flash pen |
|
|
Anyone tried to use autorun.inf in a pen with windows xp? If tried know that the open application didn't work.
I developed a script that does, but it must be running on the target computer, so for people that uses a pen as a update device, here it is one of my firsts contribution from me to the community:
| Code: | #NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
OnMessage(0x219, "notify_change")
notify_change(wParam, lParam, msg, hwnd){
SetTitleMatchMode,2
winwait,:),,7
WinGetTitle, letter,:)
StringRight, letter, letter, 3
StringLeft, letter, letter, 2
Loop, read, %letter%\Autorun.inf
{
StringLeft, check, A_LoopReadLine, 4
if(check=="open"){
StringTrimLeft, exe, A_LoopReadLine, 5
Process, Exist, %exe%
If Not ErrorLevel
run, %letter%\%exe%
}
}
} |
Cumps |
|