Forum Discussion

Oferv's avatar
Oferv
Super Contributor
14 years ago

how to run exe(installation) file?

Hi,

I'm fighting this problem for long time.

I'm trying to run an exe(installation) file that is located on my c:\ drive.

I'm using c#script and I can't find the right command to do that.

please someone help me here?

thanks 
  • Oferv's avatar
    Oferv
    Super Contributor
    Hi,

    Finally solved here is the solution:




    function RunInstallation()

    {

      

      var path

      FSO = new ActiveXObject("WScript.shell");

      path = '"C:\\xxx.exe"'

      //path = "\\Net\\xxx.exe"     

        FSO.run (path)

        FSO.nothing

        log.Message["Execution File Lunched"]

      

      objFSO = nothing

    }



    the solution was to add ' before and after the " where i define the path.



    Thanks for the help
  • Oferv's avatar
    Oferv
    Super Contributor
    Well Tanya,



    that popup an error message says "the requested operation required evaluation"

    that doesn't work

    do you know why?



    Thanks
  • Anonymous's avatar
    Anonymous

    Hi Ofer,





    The code I posted works fine in TestComplete 8.50. Have you modified it? Please post here the code you are running. Also, please specify the problematic line where you get the error. What TestComplete version are you using?


  • jackson_1's avatar
    jackson_1
    Frequent Contributor
    hi Tanya,



        why i get the WshShell.Exec access is denied error message when i run you posted code?



    Help me.



    Thanks Very much!!!
  • Anonymous's avatar
    Anonymous

    Hi Du,





    I suppose, this error is related to some permission set in your account. Let's try running TestComplete as an administrator.
  • Oferv's avatar
    Oferv
    Super Contributor
    Hi Tanya,

    I don't think it has anything to permissions.

    I'm getting an error message with regarding to the wshshell.exec

    see attached file

    thx