|27 Oct 2010||#1|
| || |
Batch file to run MMC as a different domain user?
I have a batch file that I used on XP to run an MMC that I created for common management tasks. In the MMC I have the ability to run regedit as a root forest domain privileged user (for remote system registry editing), password resets (using AD) remote computer management, and several web links for common sites the team uses. I did this so it was all in one place and it worked awesome in Win XP. When I run the batch file it reports that the directory could not be found.
Here's the command in the batch file:
C:\WINDOWS\system32\runas.exe /savecred /profile /env /user:root forest domain account "mmc Admin_Tools.msc"
Obviously the account being used for the privileged access is put after the user switch.
Here is the error I get:
C:\Users\username\Desktop>C:\WINDOWS\system32\runas.exe /savecred /profile /env
/user:elevated username "mmc Admin_Tools.msc"
Attempting to start mmc Admin_Tools.msc as user "root forest domain account" ...
RUNAS ERROR: Unable to run - mmc Admin_Tools.msc
267: The directory name is invalid.
I have verified that runas is in the same place as in XP, as well as MMC. I have run the batch file with elevate access as well as run the command prompt with elevated access (in fact that was copied from an elevated command prompt). The account I'm running it on has admin rights on the box, though UAC is set, I own both the account this was run from and the "root forest" privileged account, this account is NOT a domain admin.
This is all being done on Win 7 Pro in a large enterprise domain environment. Again, this batch file worked and still works on Win XP in the same environment.
I should add that the MMC console runs fine if I don't use the batch file.
|My System Specs|
|Similar help and support threads for2: Batch file to run MMC as a different domain user?|
|How to run a batch file at logoff & some batch scripting help please||Backup and Restore|
|Batch file to automatically log a user off after a time of inactivity||General Discussion|
|Batch File to set user's windows login pic||Customization|
|Batch File that grabs file names from folder to insert into batch file||General Discussion|
|Strange Defult Login User Prompt - Local Admin, Not Domain User||General Discussion|
|Our Sites ||Site Links ||About Us ||Find Us |
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
All times are GMT -5. The time now is 12:23 PM.