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.