Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

RunAs Shortcut doesn't work


  • Please log in to reply
No replies to this topic

#1 MaryBet82

MaryBet82

  • Members
  • 454 posts
  • OFFLINE
  •  
  • Gender:Female
  • Local time:09:43 AM

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

BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users