0

I have some CS-Script with a complex logic, need to start that script as administrator. I tried to add

//css_npp asadmin

to the beginning of the script file, it doesnt work, so maybe i do something wrong. Main point is that i need to specify administrator privileges in the script file, not outside. Any ideas?

foji
  • 1
  • 2
  • Are you trying to do this so the user doesn't get to approve/deny elevation? – Andrew Barber Aug 05 '14 at 08:57
  • @AndrewBarber Actually, any solution would be nice. But i can't even get this approve/deny elevation. Just dont know how to provide it. – foji Aug 05 '14 at 08:59
  • Ahh, ok. I'm not specifically familiar with the cs-script stuff, but just wanted to get that clarified so people didn't think you were trying to do something malicious here. – Andrew Barber Aug 05 '14 at 09:01

1 Answers1

0

Well, i found a solution.

First, you need to be sure that in "cs-script/Lib" or in "yourScriptFolder" there is a file "Elevate.cs". If its not download it from here CS-Script (cs-script.ExtensionPack.7z, it will be on the Lib folder), and put the file into the "Lib" folder or into "yourScriptFolder".

Second, write in the beginning of your file

//css_inc Elevate.cs;
//css_pre elevate();

And it will work!

foji
  • 1
  • 2