Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Running task manager under non administrator users

- - - - -

  • Please log in to reply
5 replies to this topic

#1
am12348

am12348

    Newbie

  • Member
  • 21 posts
  • Joined 29-December 12
  • OS:none specified
  • Country: Country Flag

Hello to all,

 

    In the organization I'm working with, there are users, that don't have administrator's   permissions.

 

    I was asked to write a batch that displays the task manager in any workstation.

 

    The command for displaying the task manager is relatively simple: taskmgr

 

    If the batch runs under an administrator user, the task manager is displayed. 

 

    However if I try to  run it  under a non administrator user, a message concerning to

    permissions is displayed.

 

    My question is , if there is a way to impersonate the command in the batch, namely running

    the command as an administrator?

 

Thank you in advance,

    Amos




How to remove advertisement from MSFN

#2
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,105 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

Have you tried runAs?

 

http://www.windows-c...command-prompt/


Posted Image

#3
am12348

am12348

    Newbie

  • Member
  • 21 posts
  • Joined 29-December 12
  • OS:none specified
  • Country: Country Flag
MagicAndre1981, on 17 Nov 2013 - 08:56 AM, said:

Have you tried runAs?

http://www.windows-c...command-prompt/

 

Hello,

 

      I've tried: runas /user:Administrator taskmgr.

However I'm required to type the administrator's

password. I need that the batch will be run

automatically without intervention. Namely I'm

looking for a way to store the administrator's

password in the command/batch.

 

Thank you,

Amos



#4
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,105 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

you can pass the password to the RunAs exe


Posted Image

#5
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag

Andre, I can't find any working example that shows passing the administrator password with the batch.  I only found posts by folks that say they can't get it to work.  Can you elaborate or provide a link?  Thanks in advance.

 

Cheers and Regards


Posted Image


#6
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,105 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

Use /savecred to save the password, so you only have to enter it once.


Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users