Jump to content

Recommended Posts

Posted

Hey,

I have a script that creates a symbolic link and launches an application afterwards.

It works fine if I launch my script as an admin but then the application it launches also runs as admin.

Is there a way to prevent that?

Thank you for reading :]

Posted
3 hours ago, paw said:

Hey,

I have a script that creates a symbolic link and launches an application afterwards.

It works fine if I launch my script as an admin but then the application it launches also runs as admin.

Is there a way to prevent that?

Thank you for reading :]

Are you compiling the script to run as an administrator?  If not, then you aren't running the script as an administrator...  Or are you asking how to run the script as an administrator when the account running the script does not have admin permissions?

Posted

I assume the user account does not have permission to run the app since you are running the script as an administrator. If that is the case, you need to research if you can give the user permission to run the app through group policy or contact the software creators to see if they have a solution. If you can achieve that, then the user can run the script without admin privileges.

Posted (edited)

Ok, so it seeed like I found the issue, I use #RequireAdmin but have UAC disabled. In the Help file it says:

Quote

In case system doesn't have elevation mechanism (e.g. disabled UAC) new process will run under the same user as the original.

But that was always the case, even with UAC enabled.

 

I found this thread

and it works for me.

 

Thanks for the replies!

Edited by paw

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...