runas takes 20-30 seconds to get started


  1. Posts : 57
    windows
       #1

    runas takes 20-30 seconds to get started


    I have a program that I use to script some GUI only programs. I use it to have a one button desktop shortcut with (essentially) the following command:

    C:\Windows\System32\runas.exe /user:mycompname\Administrator /savecred "myprogram.exe myscript.ext"

    I need the runas since I'm trying to script the easeus todo image backup. Normally, this program requires me to click on a user authorization dialog box, the one that dims the rest of the screen. So, I'm using the runas and Administrator to automate that.

    Everything works ok, except when I run this shortcut, there's about a 20-30 second delay as it, apparently, is checking credentials or something. If I run it a second time, just after the first one finishes, then there's no delay. After some minutes, however, there is again a delay on starting it up.

    I'm running win10 1903 build 18362.356

    Anyone know how to eliminate the delay?
      My Computer


  2. Posts : 43,012
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2
      My Computers


  3. Posts : 57
    windows
    Thread Starter
       #3

    dalchina said:
    That was just what I was looking for. I followed all the instructions except I didn't bother to change the icon on the shortcut. I only had one issue, which was easily fixed:

    In order to run a program like so,

    "program.exe some_additional_program_info"

    Instead of having it all in one set of quotes, I had to do it like so,

    "program.exe" "some_additional_program_info"

    I suspect the quotes weren't really needed since my exe and the argument passed didn't have an spaces in them, but it works. Before that, I had one set of quotes around both parts, which was how I had to do it using runas.

    This works much better, and there's no delay, thanks again.
      My Computer


  4. Posts : 43,012
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:29.
Find Us




Windows 10 Forums