If an item is place in the C:\Users\All Users\Start Menu\Programs\Startup
folder, will it always be run with admin rights, or the rights of the logged-in user?
1 Answer
When placing something into the C:\Users\All Users\Start Menu\Programs\Startup
folder, it will be run using the logged in user's account with their access rights. If that user has administrative rights, the program will run elevated by default. If that user doesn't have administrative rights and the program requires elevation, then the program will not run at all.
I ran a few tests using a batch script, an .msi
installer and a .exe
installer and shortcuts to each in the folder.
Here's the batch script for reference:
@echo off
echo %username%
net session
pause
The net session
command requires administrative rights to run and will return "Access Denied" if a user without administrative rights attempts to run it.
I created two shortcuts in the Startup folder:
- A shortcut set to run normally.
- A shortcut set to run as administrator.
When I logged into an account as administrator, both shortcuts ran and both ran elevated. When I logged into a normal user account, only the normal shortcut ran and ran without administrative rights. The shortcut set to run as administrator did not run at all.
I also tested creating shortcuts to both .msi
and .exe
installers that require administrative rights in the folder. These also only ran under the account with administrative rights and ran elevated by default without the User Account Control (UAC) prompt.
An interesting side note: A batch file run through the Startup folder under an administrator account will run elevated, as stated, but without the "Administrator: " text in the title bar.