3 Replies - 372 Views - Last Post: 05 December 2016 - 05:52 PM

#1 Morpheus212  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 05-December 16

Batch run as admin command?

Posted 05 December 2016 - 05:17 PM

Hello DIC Community. I am looking for a batch/CMD command to run the current batch file as an administrator. Anybody have any ideas? Here's my program i wanna run in admin:

net user Testuser testpass /ADD /PASSWORDCHG:No




Thanks!
Morpheus
Is This A Good Question/Topic? 0
  • +

Replies To: Batch run as admin command?

#2 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6559
  • View blog
  • Posts: 30,699
  • Joined: 10-May 07

Re: Batch run as admin command?

Posted 05 December 2016 - 05:24 PM

** Topic moved from "Introduce yourself" to Computer Support -> Software Support -> Windows.

Open the command prompt with elevated privileges : "Start -> cmd" but don't run, right click & select run as admin. Then you can enter your command & run as administrator.
Was This Post Helpful? 0
  • +
  • -

#3 Morpheus212  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 05-December 16

Re: Batch run as admin command?

Posted 05 December 2016 - 05:42 PM

Well duh. I meant is there a specific batch command i could enter in the program to automatically run in as admin
Something like:

runasadmincommandhere
net user Testuser testpass /add


Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6559
  • View blog
  • Posts: 30,699
  • Joined: 10-May 07

Re: Batch run as admin command?

Posted 05 December 2016 - 05:52 PM

Well, automating account elevation is a slipper slope, & I'm going to take a guess this is for something malicious.

I'm not aware of a way to do this, which is probably by design.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1