How do I make my program run with different privileges at Windows 7 startup?
- by iira
Hi, I am trying to add my program run in Windows 7 startup, but it doesn't work. My program has an embedded UAC manifest.
My current way is by adding a string value at HKCU..\Run.
I found a manual solution for Vista from http://social.technet.microsoft.com/Forums/en/w7itprosecurity/thread/81c3c1f2-0169-493a-8f87-d300ea708ecf
Click Start, right click on Computer and choose “Manage”.
Click “Task Scheduler” on the left panel.
Click “Create Task” on the right panel.
Type a name for the task.
Check “Run with highest privileges”.
Click Actions tab.
Click “New…”.
Browse to the program in the “Program/script” box. Click OK.
On desktop, right click, choose New and click “Shortcut”.
In the box type: schtasks.exe /run /tn TaskName where TaskName is the name of task you put in on the basics tab and click next.
Type a name for the shortcut and click Finish.
Additionally, you need to run the saved scheduled task shortcut to run the program instead of running the application shortcut to ignore the IAC prompt. When startup the system will run the program via the original shortcut. Therefore you need to change the location to run the saved task. Please:
Open Regedit.
Find the entry of the startup item in Registry. It will be stored in one of the following branches.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_USERS.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Double-click on the correct key, change the path to the saved scheduled task you created.
Is there any free code to add item with privileges option in scheduled task? I haven't found the free one in torry.net.
Thanks a lot.