467,173 Members | 1,343 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,173 developers. It's quick & easy.

Detect if autostart

Joh
I've developed an application that is launched at system startup. Is
there a way to detect when an application is started by autostart and
when its launched by a user?

Mar 6 '07 #1
  • viewed: 1185
Share:
4 Replies
On Mar 6, 10:53 am, "Joh" <meanmachine...@hotmail.comwrote:
I've developed an application that is launched at system startup. Is
there a way to detect when an application is started by autostart and
when its launched by a user?
Best way I have figured out to do that is to specify a command line
switch in the auto startup shortcut. If present, the app knows it was
run from that shortcut.

Mar 6 '07 #2
Joh
On 6 Mar, 17:31, z...@construction-imaging.com wrote:
On Mar 6, 10:53 am, "Joh" <meanmachine...@hotmail.comwrote:
I've developed an application that is launched at system startup. Is
there a way to detect when an application is started by autostart and
when its launched by a user?

Best way I have figured out to do that is to specify a command line
switch in the auto startup shortcut. If present, the app knows it was
run from that shortcut.
Thanks for the reply! Currently I'm using registry settings for the
autostart, no a short cut in the auto start-up folder, so it doesn't
work. Anyone else know of another way to solve this? Otherwize I guess
I have to go for the shortcut.

Mar 6 '07 #3
Well specify a command line switch in the registry setting then.
"Joh" <me************@hotmail.comwrote in message
news:11**********************@c51g2000cwc.googlegr oups.com...
On 6 Mar, 17:31, z...@construction-imaging.com wrote:
>On Mar 6, 10:53 am, "Joh" <meanmachine...@hotmail.comwrote:
I've developed an application that is launched at system startup. Is
there a way to detect when an application is started by autostart and
when its launched by a user?

Best way I have figured out to do that is to specify a command line
switch in the auto startup shortcut. If present, the app knows it was
run from that shortcut.

Thanks for the reply! Currently I'm using registry settings for the
autostart, no a short cut in the auto start-up folder, so it doesn't
work. Anyone else know of another way to solve this? Otherwize I guess
I have to go for the shortcut.
Mar 7 '07 #4

"Joh" <me************@hotmail.comwrote in message
news:11**********************@c51g2000cwc.googlegr oups.com...
On 6 Mar, 17:31, z...@construction-imaging.com wrote:
>On Mar 6, 10:53 am, "Joh" <meanmachine...@hotmail.comwrote:
I've developed an application that is launched at system startup. Is
there a way to detect when an application is started by autostart and
when its launched by a user?

Best way I have figured out to do that is to specify a command line
switch in the auto startup shortcut. If present, the app knows it was
run from that shortcut.

Thanks for the reply! Currently I'm using registry settings for the
autostart, no a short cut in the auto start-up folder, so it doesn't
work. Anyone else know of another way to solve this? Otherwize I guess
I have to go for the shortcut.
Put the switch in the registry setting rather than a shortcut?
Either way, you're still pointing to MyApp.exe /autorun

Mar 7 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by Michel Bany | last post: by
1 post views Thread by timtos | last post: by
4 posts views Thread by Dica | last post: by
2 posts views Thread by Ultrak The DBA | last post: by
4 posts views Thread by goscottie@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.