Posted 18 January 2010 - 04:36 PM
I tried putting a RunAs shortcut to computer management on my desktop using
runas /user:ComputerName\administrator "mmc %windir%\system32\compmgmt.msc"
There was another example for a runas shortcut to run Active Directory Users & Computers:
runas /user: ComputerName'administrator "mmc dsa.msc"
I don't know if computers in domains have different conventions for this but I tried it anyway
runas /user: ComputerName'administrator "mmc %windir%\system32\compmgmt.msc" tried w/ and w/out the space between user: and ComputerName.
I checked the computer management shortcut I copied from CP to the desktop and noticed it has a space/s at the end so I tried adding that right before the last quote marks
I noticed that windows changes "runas" to c:\windows\system32\runas.exe so the whole command would be
c:\windows\system32\runas.exe /user:ComputerName\administrator "mmc %windir%\system32\compmgmt.msc"
I used the user name for the "user" whose administrator account I wanted to runas - when that didn't work I tried the user name for the account I was logged into.
With any of the variations I tried if I doubleclick the shortcut or rightclick > open, the command window opens and closes, but computer management doesn't open. I can rightclick the computer management shortcut on the desktop and choose runas and that gives me the option to type in the administrator username and pw, but I'm trying to learn how to properly write shortcuts.
What am I doing wrong?
Also, can someone recommend a good beginner's How To tutorial or book on writing script? What I'd really like to do is write a batch file script to open computer management as a user administrator that enters in the password, convert it to an exe and put that shortcut on my desktop.
mac 10.6 on macbook pro
WinXP sp2 on Dell 380 w/ 512 MB RAM- currently dead in the water
WinXP tab ed sp 3 on Thinkpad X41 w/ 1.5 GB RAM - lemony flavored
Win2K Sp4 on Sony VAIO GXR600 w/ 512 MB RAM - currently blue screening