hexagon logo

Script Demand - goal is open pdf with different user

Hello all,

I am trying to have a pdf open using a different user. I have managed to do so using a bat file containing a runas command executed with a an external commande but the thing is that I have a cmd popup that I would like to avoid. By creating a .vbs file that runs this bat file, I am able to open the pdf without the cmd popup but pcdmis seems to be unable to run this .vbs file. Is it possible thorugh basic scripting to open that bat file or the pdf directly using another user? Maybe start a task scheduled on demand?

Thanks in advance for your ideas!
Parents
  • just like @ ​ said

    This also works with external command, you only have to specify the path to wscript.exe

    EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT ; path_to_exe\wscript.exe "C:\Users\QS\Desktop\test.vbs"
    


    (path_to_exe was to long, please fill in your own path)


    I failed to understand what he was saying :P I am not sure what this wscript.exe is but I will look into it!!!
Reply
  • just like @ ​ said

    This also works with external command, you only have to specify the path to wscript.exe

    EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT ; path_to_exe\wscript.exe "C:\Users\QS\Desktop\test.vbs"
    


    (path_to_exe was to long, please fill in your own path)


    I failed to understand what he was saying :P I am not sure what this wscript.exe is but I will look into it!!!
Children