| View previous topic :: View next topic |
| Author |
Message |
TeeTwo
Joined: 29 Dec 2006 Posts: 123 Location: Australia
|
Posted: Thu Jun 19, 2008 3:20 am Post subject: Application directory & Auto start |
|
|
I have an application on a USB memory drive and it works by calling the location by Using
Now when I create a key in the registry the hot key detection program loads but it looks in another directory other that the USB one. In Basic I can use the command "Application.Path" which tells the application where it is. As it is on a USB memory device the drive letter may change.
I have not found an equivenent command as
| Code: | | Run, %A_WorkingDir%\Application.exe | even when the hotkey detection script is in the same folder will not find Application.exe.
It works if I create a shortcut or even a Autorun script
Any ideas welcomed.
Also I am still looking for a autorun method that will autostart a application on USB insertion the best so far is
| Code: |
[Autorun]
Open=Program.exe
icon=Program.exe
label=Program Drive
action=Program
|
That gets it to the option window. It seems to work in all instances Sometimes the Autoplay needs setting.
For a CD its different it runs merrily away. I cannot quite get the same effect with a usb memory device.
Terry _________________ (The guy from Oz) |
|
| Back to top |
|
 |
ttrickyy
Joined: 18 Jun 2008 Posts: 20
|
Posted: Thu Jun 19, 2008 5:21 am Post subject: Re: Application directory & Auto start |
|
|
| TeeTwo wrote: |
Also I am still looking for a autorun method that will autostart a application on USB insertion the best so far is...
For a CD its different it runs merrily away. I cannot quite get the same effect with a usb memory device. |
Autorun for CD drives works differently than autorun for removable devices. http://en.wikipedia.org/wiki/Autorun#How_Explorer_recognizes_AutoRun_capability gives all of the different classes of autorun. Notice how DRIVE_REMOVABLE (what your flash drive falls under) is disabled by default. This is why U3 installs a virtual CD drive, in order to autorun an application in Windows.
For the rest of your problem...
?
--tested in .ahk and .exe to work correctly _________________ ttrickyy |
|
| Back to top |
|
 |
TeeTwo
Joined: 29 Dec 2006 Posts: 123 Location: Australia
|
Posted: Thu Jun 19, 2008 1:52 pm Post subject: |
|
|
I appreciate the heads up and links. Really a U3 should only be a standard USB device with a program on it. I have heard of people reformating one to see what happens and lose the Autostart feature. In Australia I have not come across one yet
Terry _________________ (The guy from Oz) |
|
| Back to top |
|
 |
|