AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Autorun in flash pen

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
superbem



Joined: 30 Jul 2007
Posts: 20

PostPosted: Sat Sep 01, 2007 12:36 am    Post subject: Autorun in flash pen Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group