The How-To Geek Forums Have Migrated to Discourse

How-To Geek Forums / Windows 7

Problem with Run as command

(1 post)
  • Started 3 years ago by whity
  • Topic Viewed 235 times


Recommended: Clean Your Mac the Easy Way with CleanMyMac 3

If you want to clean up your Mac the easy way, CleanMyMac is a great tool to get the job done easily, and it will even keep your computer clean automatically.

Unlike the competition, it also includes great tools like a Clean Uninstaller, to get rid of applications and clean up the junk that they leave behind. All with the click of a button.

Download CleanMyMac 3 for Free Today

Posted yesterday 
Posts: 1

Hi there,

I am trying to run a .bat file from a non-admin user profile in Windows 7.

This is the code..


runas /user:%computername%\administrator CMD.exe

regedit /s OfficeSoftwareProtectionPlatform.reg


I am trying to run the registry file with elevated permissions.
But once I run the run as command, a new cmd window is getting opened with elevated privileges and the regedit command is not running in this window.

I want the registry file to be run in the elevated cmd rather than the first cmd window.

Posted 3 years ago

Topic Closed

This topic has been closed to new replies.