Home » Questions » Computers [ Ask a new question ]

Command to run an application with Administrator privileges, but NOT AS administrator (prompt with UAC)

Command to run an application with Administrator privileges, but NOT AS administrator (prompt with UAC)

I want to start Notepad with elevated privileges to edit C:\Windows\System32\drivers\etc\host. Notmally I would type notepad in the search box, and with the program highlighted hot Ctrl + Shift + Enter, click Yes on the UAC prompt and then open the file. I do this often, so I want a batch file to do it.

Asked by: Guest | Views: 154
Total answers/comments: 1
Guest [Entry]

"As Notepad is a Windows tool, you may not set ""Run always as administrator"", but there's a trick. Create a symbolic link and open the properties dialog. Under the link properties, select Advanced (bottom right button) and select ""Run link as administrator"". This should elevate the process.

I hope this is still the same on Windows 7 (I tested on Windows Vista)."