Prince Vince

Hello,

Is there a Custom Directory Dialog in the User Interface of a Setup and Deployment project I know it is not available in the Add Dialog form of the User Interface. I just can't believe that there is no way of asking the user for a custom directory for saving some data files that I have included in my msi package. I'm looking for a dialog just like the one for selecting the target dir.

I know I can create a custom action installer class and put my extra functionality in there but in that case, how do I extract the right files from the msi package for placing them into the custom directory I just can't believe that there isn't an easier way of doing this. The User Application Data directory is not an option because this directory is located at the C-drive. Actually I want it to be a (shared) directory on a datadisk because three applications must have access to the same data.

The chosen path must also be stored in the registry so the applications know where to look for the common data files and where to place their log files. I don't want to use the C-drive (system disk) for these log files because there are 5 different log files created per day. Some of them can reach a size of 30Mb.

Kind regards, Vincent




Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Zabardast

Hello Prince Vince

have u find the solution of your problem. I ve also same kind of problem, i need to make my own form and get some info from user while installation.





Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Dmitry Pavlov

Hi guys,

Setup and Deployment project type is quite straight forward tool for creating simple installers. It is not enough agile to handle all needed operations you want to perform during the installation.

What I can advice you - have a look at WiX toolset. It is free and powerful toolset from Microsoft which allow you to describe in XML format all aspects of your installation process. WiX toolset includes integration for Visual Studio 2005 named Votive which allow you to keep WiX based setup project sources inside IDE like Setup and Deployment projects

That is a good overview "Using the WiX Toolset to Integrate Setup into Your Development Process" on MSDN written by Rob Mensching.






Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Carlos Quintero - MVP

Another alternative with lots of users is InnoSetup, also free and powerful, and best of all, not MSI-based :-)

http://www.jrsoftware.org/isinfo.php






Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Dmitry Pavlov

Hi Carlos,

The only one thing in MSI I dislike: the problems with calling executable files (external EXEs like devenv.exe) from MSI custom actions under Windows Vista.

It seems you have big experience with InnoSetup. Did you have such problems using that installer tool As I understood from brief overview there are used something similar to MSI custom actions -- items in the section [Run] and maybe it's also possible by using custom Pascal scripts...

Thanks in advance!

P.S. Carlos, if it is not a secret - why you don't like MSI based installers Smile






Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Carlos Quintero - MVP

Hi Dmitry,

First of all, I don't like progress bars that when they reach 100% they start again ;-) I don't care if the setup is doing a different phase of something. This happens with even the more simple setup from MS. They lost the concept of a progress bar long time ago... Such progress bars are as useless as the hourglass of Windows 3.x where there were no progress bars... ;-) Also, MSI setups are slow, I had to customize some things with the Orca.exe tool, I messed the msi database, etc. but what really pushed me towards alternatives was a bug that I documented in a Knowledge Base Community Article regarding the setup running the custom action of the previous setup already installed rather than the one of the new setup being installed. They said that "won't fix" by blah blah... It is incredible, but for each MS product (and I use lots of them) I always find a bug in the first days of use that ruin completely the experience with the product.

I didn't find problems with InnoSetup, they have also a preprocessor that was very useful for the several setups of my MZ-Tools editions and you can use the Pascal script to run external exes (MZ-Tools uses a separate own regassembly.exe tool).






Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Dmitry Pavlov

Hi Carlos,

I see. I agree with all you said about MSI. But it becomes a most used installer in Windows environment a few last years... somewhat like standard...

Thanks you for the pointer to InnoSetup. Can you also recommend any useful resources about INI files writing exept InnoSetup help

One more question do you call devenv.exe or other already existing on target machine EXE files during your installation

Thanks!






Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Carlos Quintero - MVP

Well, once of my favorite quotes (I think from Niklaus Wirth, the father of Pascal) is "The nice thing about standards is that there are so many different ones to choose from." ;-)

Regarding progress bars, I was laughing this morning because the ones of Windows Vista go back and forth while you delete files before reaching 100% :-)))

Regarding .ini files, I don't know except about InnoSetup.

Finally, I don't call devenv.exe from my setup because it's an add-in, there is no need, but I do call an external exe to COM-register the add-in and create the registry entries to be recognized by VS. I do plan to write an article about this some day...






Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Dmitry Pavlov

Just to be ensure - did you try calling an external exe to COM-register the add-in from your installer under Vista




Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Carlos Quintero - MVP

Yes, the setup does call an external .exe to COM-register the add-in managed DLL for COM Interop. The utility does it calling the Registration services of the .NET Framework (rather than calling regasm.exe to perform some dependencies validation). I am developing in Windows Vista with UAC activated. The only requirement for the setup is that must be run as administrator.




Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Dmitry Pavlov

Hmm.. Sounds good. I should investigate the level of efforts for migration to InnoSetup.

Carlos, thanks a lot you kind assistanse! I really appreciate your help!






Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Carlos Quintero - MVP

InnoSetup is script-based, which is tedious, so don't forget to download the ISTool (it is on the same page of downloads) which is a graphical UI to generate the script just filling property pages.




Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Dmitry Pavlov

Carlos, thank you for that tip!




Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Ed Dore

One final observation. It is highly recommended that addin and package deployment use the Windows Installer technology, and that you avoid using self-registration scenarios, as you loose the ability to rollback registry modifications when something goes wrong with the component that is responsible for self-registration. There's a pretty good list of reasons not to self-register at install time at : http://msdn2.microsoft.com/en-us/library/bb166562(VS.80).aspx.

One of the most common setup/uninstall problems in Windows is registry keys/values being improperly set/removed/decremented because of installation scenarios that rely upon components that fail to execute properly. I can't stress enough, that self-registration for retail deployment, is a bad thing.

Sincerely,






Re: Visual Studio Extensibility Is there a Custom Directory Dialog in the User Interface of a Setup project?

Dmitry Pavlov

Hi Ed,

Glad to see you in the thread Smile

Currently I use WiX toolset for creating MSI based installer for our product which is as you know MPF based custom package + language service. And for the time being I have following troubles with that installation scheme:

1. For managed package I must pre-install ProgectAggregator2.msi to make our package working on target machine. It is ok to download and install ProgectAggregator2.msi before installing main software for free utility like it's done for Votive. But it is no good for commercial product because that is additional step between customer and product which reduce the chances to sale it (I think it's clear reason). So what can be recommended to avoid this Will it be ok if I compile sources from here C:\Program Files\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Common\Source\CSharp\ProjectAggregator2 and include them into my .msi file directly

2. To finish setup the custom package on target machine I have to execute 'devenv /setup' command. I use MSI custom action that does it. It works on Windows XP but it does not do that on Windows Vista. That is a bug due to which I can't call external executable file from custom action. There are a lot of posting on this on the Internet. As a result, after installing on Vista package doesn't work properly on target machine. For now we have to ask user to follow instructions for installing our product on Vista. Could you recommend something

3. Even on Windows XP where custom actions performed ok, 'devenv /setup' command is being executed extremely long time. This delay often looks like a starvation. That would be really great to get some more intelligent way to inform IDE about new integrations then running 'devenv /setup'. Are there alternatives

That would be great to hear your comments on these items.

Thanks in advance!