Jump to content

Does executing external program run as admin?


Recommended Posts

Probably this is a stupid question but I need help... o:)

I have a simple Autoit GUI that required admin permission and its run with: #RequireAdmin.

Through this GUI i am executing bat file to run jmeter in non GUI mode as the following.

$JMETER = $JMETER_BIN_FOLDER & "\" & "jmeter.bat"

ShellExecuteWait($JMETER, "-n -t " & '"' & $Jmeter_Script & '"', @WorkingDir, "", @SW_HIDE)

This "jmeter.bat" run the Jmeter's executable jar file that run the $Jmeter_Script script.

How do I verified if Jmeter utility is running as admin?

To be more clear, I want to achieve the same result as launching cmd.exe in windows as 'run as administrator' and executing:

"jmeter.bat scriptname.jmx"

Thanks in advanced.

EDIT: I am running on win 7 and I know that it possible to get the properties of the process in Task Manager -> UAC Virtualization column, but the point is that I am running the script at my work and the IT somehow defined me a domain user that cannot read this property and I see empty column...

Edited by lsakizada

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

To verify that Jmeter is being run as an admin, simply open the Windows Task Manager. Find the Jmeter executable and see what user name it was run under. I just tested it with a message box and ran it as myself and as admin. It showed up as being run as myself and admin.

 

Thanks for the reply, few minutes before you replied I posted in the Edit section why I cannot see it in Task Manager.

EDIT: I am running on win 7 and I know that it possible to get the properties of the process in Task Manager -> UAC Virtualization column, but the point is that I am running the script at my work and the IT somehow defined me a domain user that cannot read this property and I see empty column...

 

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

Every program ran by the script will use the same credentials and should therefor be admin.
You could try making an external program that just verifies it's rights and nothing else just to test it.
If you need a batch command that always requires admin rights you can test with "net session".

Challenge accepted!

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...