Source language: Translate to:

Run action

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Run action

Postby Alex » Sat May 12, 2012 12:30 pm

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
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Wrangler » Sun May 13, 2012 9:03 am

Post your code.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Alex » Sun May 13, 2012 12:38 pm

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
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Tony Kroos » Sun May 13, 2012 6:09 pm

whereas I compile it in asinvoker.

Have you tried a "None" option?
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby Tony Kroos » Sun May 13, 2012 6:11 pm

Tony Kroos wrote:
whereas I compile it in asinvoker.

Have you tried a "None" option? (for app.exe)
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby Alex » Sun May 13, 2012 9:49 pm

Hi,

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

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Alex » Mon May 14, 2012 7:19 am

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
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Tony Kroos » Mon May 14, 2012 7:45 am

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...
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby Neosoft Support » Mon May 14, 2012 11:07 am

Tony is correct. The child app will run with the same security settings as the host app.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Alex » Mon May 14, 2012 11:09 am

Hi,

Thanks for the answer.

It is possible to make something?

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Neosoft Support » Mon May 14, 2012 11:14 am

You could try using the Windows' RunAs command:

http://en.wikipedia.org/wiki/Runas
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Alex » Tue May 15, 2012 9:00 am

Hi,

Thanks, I will use it.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests