Jump to content

Recommended Posts

Posted (edited)

Muzaiyan the OP is trying to run this from a non-admin domain profile; essentially you cannot use that as you would not be able to run the script with:

#requireAdmin
IsAdmin
Edited by MikahS

Snips & Scripts

  Reveal hidden contents

My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Posted

i get the message the script is running with admin rights but then it still just hangs on the command line C:\Windows\System32\ command prompt

Posted

Did you try specifying the full path instead of just the program name with the cmd param?

Snips & Scripts

  Reveal hidden contents

My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

  • Developers
Posted
  On 8/20/2014 at 2:16 PM, itye1970 said:

 ok now it opens a command window with the cursor at C:\Windows\System32\  and nothing happens

What should it do? (Can't test this on my setup)

What happens when you type the commandline manually like this: bitlockerwizardelev.exe " u" in the opened window?

You could also try this format:

Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, 0, @comspec & ' /k bitlockerwizardelev.exe \ u', "", @SW_SHOWMAXIMIZED)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 8/20/2014 at 2:33 PM, Jos said:

 

What should it do? (Can't test this on my setup)

What happens when you type the commandline manually like this: bitlockerwizardelev.exe " u" in the opened window?

You could also try this format:

Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, 0, @comspec & ' /k bitlockerwizardelev.exe \ u', "", @SW_SHOWMAXIMIZED)

Ive only got one post left, its supposed to open a password reset screen for users to allow them to change their

bitlocker password

  • Developers
Posted
  On 8/20/2014 at 2:37 PM, itye1970 said:

Ive only got one post left,

Should be OK now.

  On 8/20/2014 at 2:37 PM, itye1970 said:

its supposed to open a password reset screen for users to allow them to change their

bitlocker password

So what happened with the other 2 questions? :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 8/20/2014 at 2:51 PM, Jos said:

Should be OK now.

So what happened with the other 2 questions? :)

doesnt work nothing happens , it runs from command prompt manually  but not from autoit script. any more ideas or has this got you all thinking :-)

Posted

Its hard to guess when we don't have all the information. Post the most recent script used inside autoit tags or using the code editor in the comment menu.

Snips & Scripts

  Reveal hidden contents

My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

  • Developers
Posted
  On 8/20/2014 at 5:37 PM, itye1970 said:

doesnt work nothing happens , it runs from command prompt manually  but not from autoit script. any more ideas or has this got you all thinking :-)

The question was what happens when you manually run the command from the window opened by the script?

Just want to get confirmation that works too when running under different credential.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 8/20/2014 at 5:56 PM, Jos said:

The question was what happens when you manually run the command from the window opened by the script?

Just want to get confirmation that works too when running under different credential.

Jos

Nothing happens 

Posted
  On 8/20/2014 at 2:27 PM, Muzaiyan said:

try also

_RunDos()

direct from example:

#include <Process.au3>

Local $rc = _RunDos("start Http://www.autoitscript.com")

run your program on DOS prompt

your code works but when i replace it with Local $rc = _RunDos(""C:\Windows\System32\bitlockerwizardelev.exe u"")  nothing happens

Posted

i worked it out myself, basically created a cmd file with the parameters and called that cmd file instead from autoit, looks  like a bug in autoit not accepting parameters with a space

Posted

I doubt it's a bug in Autoit, instead its more or less debugging that hasn't been done :shifty:

Snips & Scripts

  Reveal hidden contents

My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Posted

  On 8/20/2014 at 1:26 PM, Jos said:
Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, 0, 'bitlockerwizard.elev "\ u"', "", @SW_SHOWMAXIMIZED)

this code works fine but you should try this one:

Local $Program = "bitlockerwizardelev.exe"

Local $parms = '\ U'
Local $sUserName = ""
Local $sPassword = ""

; try all flags one by one
Local $flags = 0
;~ $flags = 1
;~ $flags = 2
;~ $flags = 4
If Not FileExists(@SystemDir & "\" & $Program) Then MsgBox(16, "(File Not Found)", "Please Check The Existance of file.")
Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, $flags, @ComSpec & " /C " & $Program & " " & $parms, @SystemDir, @SW_SHOWMAXIMIZED)
If @error Then
    MsgBox(16, "ERROR: " & @error, "Process failed")
    If StringRight($Program, 4) <> ".exe" Then MsgBox(16, "", "Please make sure that file is an executable or use ShellExecute() function")
EndIf

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...