Re: Batch files and MSC

From: Miha Pihler [MVP] (mihap-news_at_atlantis.si)
Date: 10/19/05


Date: Wed, 19 Oct 2005 19:05:51 +0200

Hi,

You can't do this with runas command for security reasons.

If client computers have same password for their local administrators you
could start MMC and disk management tools on your PC and then use "Connect
to" option to switch between PCs remotely without the need to enter
password...

You could also use command line tools like diskpart for managing volumes,
partitions, . and use it in combination with pstools (free tools) from
sysinternals http://www.sysinternals.com/utilities/pstools.html where you
can actually also script in the password (but be aware of security
implications). You can also use pstools to start MMC as described in your
post without using runas. Again be aware of security implications.

-- 
Mike
Microsoft MVP - Windows Security
<mrturner@aapt.net.au> wrote in message 
news:1129701801.208833.119750@g49g2000cwa.googlegroups.com...
> Is there anyone who might be able to tell me how I can incorporate and
> password into a batch file that runs an MSC. Specifically, the Disk
> Management MSC. As you can plainly see, I don;t write a lot of batch
> files. The text is below.
>
> runas /user:Administrator "cmd /c c:\windows\system32\diskmgmt.msc"
>
> The aim of this is to allow me to change a drive letter on my end users
> computers without having to type in the administrator password 130
> times.
>
> Any assistance would be great.
>
> Matt
> 


Relevant Pages

  • RE: Remotely Manage Windows Service
    ... In local security settings, under user rights assignment, can the user ... Services have ACLs just like other resources on your server. ... Now apply the policy using the Security Configuration and Analysis MMC ... all services via the MMC for the server, but the netsvc command still says ...
    (microsoft.public.windows.server.general)
  • Re: Security Config and Analysis issue
    ... I have member servers that we want to roll out a custom security template ... We created the template and verified the settings. ... when we re analyze we see a green check mark but when we go to the ... (not in the mmc), we still see power users and others that should have ...
    (microsoft.public.windows.server.security)
  • Re: Giving users permission to an MMC
    ... > Right click on .msc file, security and sharing, tab security, add user ... > CONFIDENTIALITY NOTICE ... > above and may contain confidential information. ... >> I have place the MMC on a share on the network and I would like to enable ...
    (microsoft.public.windows.server.security)
  • Re: problems with admin tools
    ... That simply doing a start / run of mmc does this is some ... received inherited permissions from Windows\System32 ... Restore XP to installation Security Defaults ... >>Microsoft MVP (Windows Server System: ...
    (microsoft.public.windowsxp.security_admin)
  • RE: Remotely Manage Windows Service
    ... The way that Microsoft would recommend you do this is by using the Security ... Services have ACLs just like other resources on your server. ... Now apply the policy using the Security Configuration and Analysis MMC ... all services via the MMC for the server, but the netsvc command still says ...
    (microsoft.public.windows.server.general)