How to Elevate a Process Task in SQL Server Data Tools (SSIS)

I'm trying to run an executable from an SSDT package using the Execute Process Task.  Simple test Processes (like a hello_world.bat) run fine, but the executable I need to run requires elevated privileges.  (Trying to run MyEventViewer, a program that transfers event viewer entries to a table).  The executable requires administrative privileges.

The error is "The requested operation requires elevation."  I don't see how to elevate a task in SSDT.

Thanks in advance.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can use the runas command inside your bat file:
runas /user:administrator notepad.exe

Open in new window

There is a /savecred option that allows to use the saved credentials
I also want to add to my previous answer. There is a command line utility called elevate here. I never used the utility and cannot comment if it is free from malware. So, please use it on your own risk, or seek an independent advice about this utility.
BTW, if you have access to a C++ compiler and linker for windows you can easily build one for you. The C++ code will be quite simple, less than a dozen lines. I can provide you with the C++ code if interested.
Sorry for bombarding you with these individual answers. Here is the official elevate utility from Microsoft's own MSDN magazine
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

dakota5Author Commented:
chaau-- Thank you for this, but I don't think it works inside SQL Server Data tools.  Can't get runas or elevate to run when called by SSDT.

In addition,
runas requires the password for the user the command is run as.  /savecred might work, but this is a security risk because anything can then be run from a command prompt.

I was really looking for a way to elevate the command within SSDT-- it would be more secure.
I'm going to have to use task scheduler to run these commands-- it has an option for specifying a user to run as and maintains security.
dakota5Author Commented:
I'm going to assume there is no secure way to run a task with elevated privileges from SSDT.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dakota5Author Commented:
There was no solution provided; I think that there is no way to do what I asked to do.  Graded this B, not a great solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.