Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I placed a shortcut to a program (with one parameter) in the startup folder. That program does not get started up upon Windows startup. The shortcut's target is something like:

"C:\Program Files (x86)\MyProgram\MyProgram.exe" -param

And the "Start in" is

"C:\Program Files (x86)\MyProgram\"

The program, when executed, would be run as Administrator.

Does anyone know what went wrong and how I could "debug" this?

share|improve this question
    
Where exactly on the disk have you put your shortcut? –  Nifle Oct 15 '10 at 8:58
    
I made the shortcut for all users: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup –  William Oct 18 '10 at 3:30
add comment

2 Answers 2

up vote 2 down vote accepted

I had exactly the same problem, UAC blocks the program because it asks for administrator rights, but does not pop up the "Do you feel lucky" dialog because of the way the program was initiated.

Solution: Instead of a startup shortcut, schedule a task to run at log on.

Go to: Start -> Control Panel -> System and Security -> Administrative Tools -> Schedule tasks

Here you can create tasks that do all sorts of stuff given a variety of conditions. When you create a task to run programs with administrator privileges you need to tick a box labeled "Run with highest privileges" under General -> Security options in the Create Task dialog.

share|improve this answer
    
Thanks for the suggestino! One problem is that the shortcut was created by InstallAnywhere (an intallation packaging program), and i'm not sure it is capable to schedule a task...any other suggestions? –  William Oct 29 '10 at 3:12
    
You mean that you need to do this programmatically, and pack the solution in the installer for some program? It is certainly possible, here is a suggestion for reading material: msdn.microsoft.com/en-us/library/aa384138(VS.85).aspx –  eBusiness Oct 29 '10 at 20:47
    
I haven't actually tested the method, but it does sound reasonable. I might be able to write a script and execute it after the installation. Thanks! –  William Nov 1 '10 at 6:32
add comment

Have you tried clicking on the shortcut manually to see that it actually runs your program?

If it does not, you can then open a command prompt, change to the directory using cut/paste from the shortcut, and then cut/paste the command from the shortcut and hit enter.

That might give a clue as to what's happening.

share|improve this answer
    
Thanks for your reply. Yes, I have. The shortcut works fine: a UNC challenge would pop up and the program would start running after the challenge as been confirmed. –  William Oct 15 '10 at 6:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.