Page 1 of 1

Run action

PostPosted: Sat May 12, 2012 12:30 pm
by Alex
Hi,

When I execute an application from the run action from a pub that I executed with Administrator rights, then the application that it run looks like started in admin mode. Is there a way to run it normally like I execute it myself?

Thanks


Alex

PostPosted: Sun May 13, 2012 9:03 am
by Wrangler
Post your code.

PostPosted: Sun May 13, 2012 12:38 pm
by Alex
Hi,

The code is simple.

Pub executing in admin mode.

Then the pub has this code:

Run "![pubdir]app.exe" "" "Normal" "" ""

and the app.exe is running in admin mode whereas I compile it in asinvoker.
The app.exe is a Neobook compiled pub.

Thanks


Alex

PostPosted: Sun May 13, 2012 6:09 pm
by Tony Kroos
whereas I compile it in asinvoker.

Have you tried a "None" option?

PostPosted: Sun May 13, 2012 6:11 pm
by Tony Kroos
Tony Kroos wrote:
whereas I compile it in asinvoker.

Have you tried a "None" option? (for app.exe)

PostPosted: Sun May 13, 2012 9:49 pm
by Alex
Hi,

I don't think this will change something, what does the none option have more?

Thanks


Alex

PostPosted: Mon May 14, 2012 7:19 am
by Alex
Hi,

I just tried the None option, and it doesn't change anything.

I tried this too: Run "cmd.exe" "/c [#34][PubDir]myapp.exe[#34]" "" "Normal" "" ""

Doesn't change anything.

Thanks


Alex

PostPosted: Mon May 14, 2012 7:45 am
by Tony Kroos
I suppose it depends on the interpretation of the Run command by neobook interpreter. I don't know details and how it works, just a wild guess, so... for example, if Run command invokes CreateProcess api function, then:
msdn wrote:CreateProcess - Creates a new process and its primary thread. The new process runs in the security context of the calling process.

It means that if your main app is run as administrator then app.exe will run as administrator too. And this is expected behavior.

p.s: maybe someone experienced will give us some light...

PostPosted: Mon May 14, 2012 11:07 am
by Neosoft Support
Tony is correct. The child app will run with the same security settings as the host app.

PostPosted: Mon May 14, 2012 11:09 am
by Alex
Hi,

Thanks for the answer.

It is possible to make something?

Thanks


Alex

PostPosted: Mon May 14, 2012 11:14 am
by Neosoft Support
You could try using the Windows' RunAs command:

http://en.wikipedia.org/wiki/Runas

PostPosted: Tue May 15, 2012 9:00 am
by Alex
Hi,

Thanks, I will use it.

Thanks


Alex