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 

USBAgent - Trigger Apps at Plug In/Off [CMD]

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
BoBo
Guest





PostPosted: Wed Nov 15, 2006 7:28 am    Post subject: USBAgent - Trigger Apps at Plug In/Off [CMD] Reply with quote

Quote:
English version (using Google translation service)



Das Windows-Programm USBAgent ist im Rahmen des c't-Artikels Angesteckt (c't 26/2002 S.206) entstanden und dient dazu, beim Anstecken und Abziehen eines USB-Sticks programmgesteuerte Aktionen ausführen zu lassen.

Zum Betrieb muss der USB-Stick eine Datei "usbagent.inf" enthalten, die beispielsweise wie folgt aufgebaut ist:

[usbagent]
ON=start-app.exe
OFF=stop-app.exe

Beim Anstecken wird das Programm "start-app.exe" ausgeführt, beim Abmelden das Programm "stop-app.exe". Beide Programme müssen im Suchpfad enthalten sein, damit USBAgent sie finden und ausführen kann.

Sie können Aufrufoptionen für beide Programme angeben. Dabei sind folgende Platzhalter möglich:

%date%
wird ersetzt durch das aktuelle Datum im Format JJJJMMTT
%basepath%
wird ersetzt durch die Laufwerksangabe des USB-Sticks

Soll ein Programm ausgeführt werden, das auf dem USB-Stick enthalten ist, so muss %basepath% als Pfadangabe benutzt werden, beispielsweise:
ON=%basepath%\start-app.exe

[Home]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources 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