Forum Discussion

pcherng's avatar
pcherng
Occasional Contributor
13 years ago

Can't run msiexec if MSI is in certain folders

I am having some issues running msiexec for automating installers. I am using msiexec as my tested app with "/i <MSI file full path>" as the parameters. When the MSI file is in certain folders in the C:\ or on a network drive, attempting to run msiexec causes a window detailing all the different kinds of options allowed for passing parameters to msiexec. From what I understand, this window typically appears when msiexec is run without passing any valid parameters to it. However, if I move the MSI file to, say, the desktop and try to run the script again, the installer launches successfully. Is there a reason why placing the MSI in certain folders will not allow msiexec to run the installer? My guess is that there are some folder permissions issues, but I really have no idea.



Thanks

3 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Paul,



    Could you please post here the script, keyword test or TestedApp configuration you're using to run msiexec?

    Also, what Windows version are you using?



    Off the top of my head, if you're using Windows Vista or 7 with UAC enabled, C:\ and network drives may be inaccessible to msiexec unless it's run as an Administrator. (See, for example, Microsoft knowledge base article KB937624.) In this case, to launch msiexec from your tests as an Administrator, you'll need to run TestComplete as an Administrator.
  • pcherng's avatar
    pcherng
    Occasional Contributor
    I'm running Windows 7 and TestComplete v8.60.665.7



    Here is my script:


    Sub RunMSI()

      TestedApps.msiexec.Run()

    End Sub  



    The TestedApps configuration I'm running for msiexec.exe is Run Mode: Debug and Parameters: "/i <file path>". I've also tried /a instead of /i, but I get the same issue.




    I tried running TestComplete as an administrator, but to no avail.
  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Paul,



    I couldn't reproduce the issue on Windows 7 x86 using TestComplete 8.70 - both C:\<filename>.msi and \\server\share\<filename>.msi are launched successfully for me.



    Here're some more things for you to try:



    1. If you're using quotes around msiexec parameters, that is, if the actual command line is like this:

    msiexec "/i <file path>"


    remove the quotes, so that the command line is like this:

    msiexec /i <file path>


    2. If the file name includes spaces, enclose it in quotes, like this:

    /i "C:\My File.msi"


    3. Open the TestedApps editor, select the msiexec application and note the complete command line for launching the application at the top of the editor. Copy this command line and try to run it from the Windows command prompt. Does it launch the installer?