Jump to content

Adding TCP printer ports w/ admin rights


Recommended Posts

I am trying to add some tcp printer ports for non admin users via login script. I am trying to use RunAsSet to handle the admin rights. I have compiled a total of two scripts in order to try and accompplish this task. The first executable simply calls the second executable with admin rights. I am trying to execute these scripts off a network share so I don't know if thats causing a problem.

Code inside first executable

RunAsSet("administrator","mydomain","password")
Run("addport.exe")
RunAsSet()
Exit
oÝ÷ Ø*z)ì×­í§uì^rëZnWuÚh®×±y«­¢+Ø(ÀÌØíÈôÅÕ½ÐìÄäȸÄØà¸Ä¸ÌÐÅÕ½Ðì(ÀÌØíA9ÕµÈôÅÕ½ÐìäÄÀÀÅÕ½Ðì)5­9ÝA½ÉÐ ÀÌØíÈ°ÀÌØíA9յȤ(((ÀÌØíÈÈôÅÕ½ÐìÄäȸÄØà¸Ä¸ÌÔÅÕ½Ðì(ÀÌØíA9ÕµÈÈôÅÕ½ÐìäÄÀÀÅÕ½Ðì)5­9ÝA½ÉÐ ÀÌØíÈÈ°ÀÌØíA9ÕµÈȤ((ÀÌØíÈÌôÅÕ½ÐìÄäȸÄØà¸Ä¸ÌØÅÕ½Ðì(ÀÌØíA9ÕµÈÌôÅÕ½ÐìäÄÀÀÅÕ½Ðì)5­9ÝA½ÉÐ ÀÌØíÈÌ°ÀÌØíA9ÕµÈ̤((ÀÌØíÈÐôÅÕ½ÐìÄäȸÄØà¸Ä¸ÌÜÅÕ½Ðì(ÀÌØíA9ÕµÈÐôÅÕ½ÐìäÄÀÀÅÕ½Ðì)5­9ÝA½ÉÐ ÀÌØíÈаÀÌØíA9ÕµÈФ()Õ¹5­9ÝA½ÉÐ ÀÌØíÉÍÌ°ÀÌØíA½ÉÑ9յȤ($ÀÌØí½©]5%MÉÙ¥ô=©Ð ÅÕ½ÐíÝ¥¹µµÑÌèÀäÈìÀäÈìÅÕ½ÐìµÀì
½µÁÕÑÉ9µµÀìÅÕ½ÐìÀäÈíɽ½ÐÀäÈí¥µØÈÅÕ½Ðì¤($ÀÌØí½©9ÝA½ÉÐôÀÌØí½©]5%MÉÙ¥¹Ð ÅÕ½Ðí]¥¸ÌÉ}Q
A%AAÉ¥¹ÑÉA½ÉÐÅÕ½Ð줹MÁݹ%¹Íѹ|(($ÀÌØí½©9ÝA½Éй9µôÅÕ½Ðí%A|ÅÕ½ÐìµÀìÀÌØíÉÍÌ($ÀÌØí½©9ÝA½ÉйAɽѽ½°ôÄ($ÀÌØí½©9ÝA½Éй!½ÍÑÉÍÌôÀÌØíÉÍÌ($ÀÌØí½©9ÝA½ÉйA½ÉÑ9ÕµÈôÀÌØíA½ÉÑ9ÕµÈ($ÀÌØí½©9ÝA½ÉйM95A¹±ô±Í($ÀÌØí½©9ÝA½ÉйAÕÑ|)¹Õ¹(

I have tested the second executable by running it by itself under an administrator account without any errors whatsoever so I know the code works. When I try and execute the code as an admin or non admin off the network share with the first executable I get the following error:

http://www.autoitscript.com/forum/index.ph...st&id=10554

Thanks in advance

Edited by giggity
Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...