views:

238

answers:

4

Have a standard smart client application that we want to autostart when a user logs into their machine on our network. I've tried the following keys:

HKLM\Software\Microsoft\Windows\CurrentVersion\Run HKCU\Software\Micrisoft\Windows\CurrentVersion\Run HKCU\Software\Micrisoft\Windows\CurrentVersion\Policy\Explorer\Run

etc....

The startup key is something like: J:\Application\NewApp.application on a shared drive or UNC path \\server1\Application\NewApp.application

I've tried changing the file specified to the setup.exe file, a batch file that starts it, a delayed batch file, and even a small .exe created to start the NewApp.application file after a delay via Process.Start().

If i run these options manually once logged in, all work just fine, however none works when logging into the machine (as is the goal).

Anyone got any ideas?

Update: permissions are not the issue. I've been testing with administrator level perms to start with.

A: 

If you are on a domain, you can use group policy to launch your app.

Austin Salonen
+1  A: 

Are the permissions correct for executing a .NET application off a network share?

Richard Nienaber
+2  A: 

My guess is that it has something to do with the network not being available directly at startup. Those batch (delayed) files, are they running from the computer's own harddrive? if not, you can try that.

Sven
A: 

What about putting the app in the Startup section of the Start Menu? I'm not sure whether these are run before or after the items in the registry, but this may cause enough of a delay.

As for the delay you've coded in the batch file or starter app, how long was it set for? Did you try a sufficiently large value, say 5 minutes? I'm wondering if a longer delay is needed, or if the issue is that your app is being started before something else it depends on.

Also, is the failure to start do to it not finding the app, or is the app starting and then immediately dying?

Pedro