Run exeutable as elevatd

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 8 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
bn2hunt
Posts: 101
Last visit: Mon Aug 02, 2021 12:04 pm

Run exeutable as elevatd

Post by bn2hunt »

Powershell Studio , 4.2.99
64 bit
Operating system: windows 8.1
32 or 64 bit OS: 64bit

I am trying to compile a script so that it runs elevated. It works with a service on the computers. If I don't provide alternate credentials and run the executable as an administrator it work. If I provide alternate credentials, provide credentials of an administrator account I get an error - The requested operation require elevation.
elevated.jpg
elevated.jpg (74.69 KiB) Viewed 2936 times
Any Ideas on how I get the script to run elevated with alternate credentials?

Thanks
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Run exeutable as elevatd

Post by davidc »

In order to run the elevated executable with alternate credentials you will need to use a startup executable that requires elevation (use elevation manifest) that simply runs the packager.exe (that contains the alternate credentials). Unfortunately this is restriction imposed by Windows' split token security in Windows 8.1 and up. It prevents an unprivileged user from switching users and providing elevating in one step.

David
David
SAPIEN Technologies, Inc.
This topic is 8 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.