giggity Posted August 31, 2006 Share Posted August 31, 2006 (edited) 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 executableRunAsSet("administrator","mydomain","password") Run("addport.exe") RunAsSet() Exit oÝ÷ Ø*z)ì×í§uì^rëZnWuÚh®×±y«¢+Ø(ÀÌØíÈôÅÕ½ÐìÄäȸÄØà¸Ä¸ÌÐÅÕ½Ðì(ÀÌØíA9ÕµÈôÅÕ½ÐìäÄÀÀÅÕ½Ðì)59ÝA½ÉÐ ÀÌØíÈ°ÀÌØíA9յȤ(((ÀÌØíÈÈôÅÕ½ÐìÄäȸÄØà¸Ä¸ÌÔÅÕ½Ðì(ÀÌØíA9ÕµÈÈôÅÕ½ÐìäÄÀÀÅÕ½Ðì)59ÝA½ÉÐ ÀÌØíÈÈ°ÀÌØíA9ÕµÈȤ((ÀÌØíÈÌôÅÕ½ÐìÄäȸÄØà¸Ä¸ÌØÅÕ½Ðì(ÀÌØíA9ÕµÈÌôÅÕ½ÐìäÄÀÀÅÕ½Ðì)59ÝA½ÉÐ ÀÌØíÈÌ°ÀÌØíA9ÕµÈ̤((ÀÌØíÈÐôÅÕ½ÐìÄäȸÄØà¸Ä¸ÌÜÅÕ½Ðì(ÀÌØíA9ÕµÈÐôÅÕ½ÐìäÄÀÀÅÕ½Ðì)59ÝA½ÉÐ ÀÌØíÈаÀÌØíA9ÕµÈФ()Õ¹59Ý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 August 31, 2006 by giggity Link to comment Share on other sites More sharing options...
sandyd Posted September 1, 2006 Share Posted September 1, 2006 I've found the same problem with RunAsSet (running it off a network share). Try creating a shortcut to the exe and setting the working directory to be a local drive. (e.g. C:, D: etc) ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
edmundteosg Posted September 11, 2006 Share Posted September 11, 2006 In XP, "runas" command fails when you run programs from mounted network drives. To get around it, you may 1) copy file to local disk for its execution 2) use the UNC path (Eg \\192.168.1.23\myshare\myprog.exe) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now