views:

36

answers:

1

I am creating an MSI from inside visual studio 2008.

This is what I am doing:

  • (With the project I am creating this for open in Visual Studio) right click Add new project
  • Setup and Deployment > Setup Project
  • Give it a name
  • Right click Application Folder > Add > Project Output: Primary Output
  • Question: does this contain all I need to run the project?
  • I want to create the .msi to put a shortcut to it on the Users desktop, so
  • Create shortcut to Primary output from Project
  • Move this to the users desktop folder
  • Question: how do I get this to keep the icon from the project!! conveniently doing this seems to have lost the app icon and picked some random generic one instead.

Thanks,

edit 0: Oh and also, can I set so when running the .msi the user cannot change where it is installed to?

Nobody knows how to do this?

+1  A: 
  1. It should unless you are referencing mixed mode assemblies in which case you may have to manually add files to the installer as the dependency resolution is very poor in this case.
  2. You need to set the icon manually in the properties of the setup project.
  3. To Remove the option to select the installation folder try opening the user interface view of the project and deleting the 'Installation Folder' screen.
Gary
what exactly is unmanaged assemblies?
baron
I meant mixed mode assemblies, I've updated the answer. This means assemblies that contain unmanaged code, so for example if you write an assembly in C++/CLI and it relies on regular C/C++ DLLs the setup project may not detect the dependencies on the regular DLLs.
Gary
doing that manually in the properties didn't work because i can only select the icon from the target machine!?!? why doesn't it just take the icon from the thing I am trying to shortcut like normal!!
baron
Browse to the application folder and change the file type to exe and it will let you select the icon from your application.
Gary
Thank you. The only other thing is how to force the install location... not having any luck on the google
baron