1. Home
  2. Windows

How to run an app as admin at startup on Windows 10

Running an app at system startup is easy; you can add it to the Startup folder on Windows 10, or if the app has an option to automatically start at startup, you can enable it. Many apps that need such an option e.g., Dropbox, have one built-in.

These apps run with normal user privileges and that’s fine in almost every case. If you happen to have an app that needs admin rights to do its job, and you need it to run at startup, the startup folder will fail you here. It will run the app with normal user rights, and there’s nothing that can change this behavior. If you need to run an app as admin at startup, you’re going to have to change how it’s run, and you’re going to have to use a VB script.

Creating VB script

Open a new Notepad file, and enter the following in it. You will need to make changes before you can save the script.

Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run("""path-to-app.exe""")
Set objShell = Nothing

The line you need to change it the third one. Replace the path with the actual path to the EXE of the app that you want to run as an admin. Make sure the path is enclosed in double-quotes.

Example

Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run("""C:\Program Files\IrfanView\i_view64.exe""")
Set objShell = Nothing

Save the file with the VBS file extension.

Set app to run as admin

Open File Explorer and navigate to the EXE of the app that you want to run as admin on startup. Right-click it, and select Properties from the context menu. Go to the Compatibility tab.

Note: If the compatibility tab is absent, this method will not work.

On the Compatibility tab, enable the ‘Run this program as an administrator’ option. Apply the change.

Move Script to Startup folder

The final step is to move the script to the startup folder. It’s easy to do; open the run box with the Win+R keyboard shortcut and enter the following. Tap Enter and move the script into the folder that opens.

shell:startup

When you next boot your system, this script will run and it will, in turn, run the app that you selected. The app is set up to run with admin rights and you will see the UAC prompt confirming that you want to run the app with admin rights.

Limitations

This method has two limitations; the first is that for apps that do not allow you to run them as an administrator e.g., Notepad, this method won’t work. The second is that it may not work for all apps. I tried this with Firefox and ended up having to confirm an unending number of UAC prompts. Firefox never launched because the prompts never stopped unless I clicked No.

To check if this method will work for an app, run the VB script first before you move it to the startup folder.

Leave a comment