2 Replies Latest reply on Apr 28, 2010 10:43 AM by Bankeralle

    RunAS Help needed

    Bankeralle Apprentice
      We are trying to install a package using a different user than the enteo service account.

      ESCRIPT.

      RunAs('%windir%\temp\1.bat','TIMEOUT /T 30','domain\test','12345','',Done


      Somehow is seems like this RunAs command is NOT executed. Hope someone can explain me why
        • 1. Re: RunAS Help needed
          Ratzratz Expert
          Hello,

          you directly try to start the "1.bat". The "1.bat" is only a text file which is normally associated with cmd.exe to be executed as a batch file.
          Neither the RunAs-command nor the Execute-command know anything about this association and try to execute the 1.bat as if it was a self executable file.
          So you have to run 1.bat with "cmd.exe /C 1.bat".
          This starts the cmd.exe with 1.bat as parameter which is interpreted by cmd.exe as batch file and therefore is executed as batch file.

          mfg
          M. Metzger
          • 2. Re: RunAS Help needed
            Bankeralle Apprentice
            Thanks for the help M. Metzger. This solved the problem