views:

52

answers:

4

I have a link to a "setup.exe" file that's on a website, and I would like for someone to be able to install an application off of the website by clicking on the link. However, when I try testing this, a window comes up with an error message saying: An error occurred while attempting to install [Application Name]. A small log file for the setup.exe is created during this process, and the last line in the file reads: Unable to locate application file [filename].msi. I must have done something wrong...

Some additional information:

  1. The msi file is for a Windows WPF application that I want to allow the user to install on his/her computer.
  2. When writing the Windows application, I noticed that there was a field in the properties for the Setup Project labeled Installation Url. So I entered the url for the directory on the website which contains the .msi file.

At any rate, I'm sure I'm just missing a setting or something. Any ideas are welcome!

Thanks!

Andrew

A: 

I don't know for sure, but you could try removing the setup.exe, and putting the .msi up on the website for users to download and run. .msi's are runnable on their own.

Andy White
@Andy - Thanks that's a good idea. I have tried it, and it does work. I'm just worried that any pre-requisites required by the wpf application (in this case, a particular version of the .Net framework) might not get installed if only the .msi file is on the website.
Andrew
Did you create the MSI from some sort of setup project in Visual Studio? I believe you can configure the setup project to make the install process check for common dependencies like .NET. The setup.exe really doesn't play any role in that.
Andy White
Okay, I think you might be right. But now I'm definitely confused, because everytime I build the setup project, it creates an .msi file and a setup.exe file, so I just assumed the setup.exe was for checking to make sure the pre-requisites were satisfied...
Andrew
Oh, sorry. I am definitely using Visual Studio for this:)
Andrew
You might be right about setup.exe checking for dependencies, and the msi not checking. I was under the impression that setup.exe was just a bootstrapper for the msi, but it might do additional work. In my experience, just using the msi has always been fine, but I'm not positive what the exact differences are.
Andy White
Thanks for the help Andy. This seems to be a strange problem. On the one hand, the msi will work, but I don't think it will check for any pre-requisites. On the other hand, the setup.exe will probably check for the pre-requisites, but it won't work without the .msi. I'll continue looking around....
Andrew
For info about Setup.exe vs MSI see my answer
Adkins
A: 

I would put the MSI file on the web page as a link to a file and then the user can be prompted to download or install it right away.

Mike Cheel
A: 

Okay, this solution works:

  1. In the website, use Response.Redirect ("~/[Virtual File Path for setup.exe]");
  2. When compiling the setup project in Visual Studio, make sure that the Installation Url (right-click on the setup project in the solution explorer and go to properties) is pointing to the Url for the website folder containing the .msi file. Also, I think this field is either case-sensitive, or it doesn't like a trailing forward slashes. Until I changed these two things, it wasn't able to find my .msi file.

At any rate, maybe someone else won't be quite as frustrated by this as me:)

Andrew

Andrew
A: 

Why not simply include everything in a zip or rar? That seems far less complicated and comes out to do the exact same thing. Also as for the comments about what Setup.exe does, it checks for the required version of .NET and (if properly configured) will install it if it is missing. Just having the MSI will not.

Adkins
Can I be sure that the computers onto which the application is downloaded will have the tools necessary for decompression? In this case, these machines would be XP, Vista, and Windows 7, and the users may not know how to easily download tools if they aren't already there...
Andrew
with the free version of WinRAR you can create self extracting archives which will dump all the files needed (in this case the exe and the msi) on the users computer. Then the user just needs to click on setup.exe and finished. If you are really ambitious you can even write a little script so that after extraction setup.exe starts automatically.
Adkins

related questions