471,066 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

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
4 1287
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 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.