VS2010 Setup Project - Adding Text to Progress bar dynamically - visual-studio-2010

I'm creating an msi package with few exe files using visual studio 2010. The progress bar shows a message "Please Wait.." when the installation is going on. I need to show separate texts "Copying files" "Installing xyz" etc for every custom action on the progress bar.
Could you please provide your inputs.

There's no support for doing this in VS setups. The messages originate from the ActionText table in the MSI file, and VS adds nothing to it. This SO post describes the WiX implementation and samples:
What does ActionText Table correspond to in WiX 3.8
but basically you'd need to populate that ActionText table in the MSI file with the right templates to get those things shown. If you have any MSI files built by other tools you might see some examples. You could try (with Orca) adding this your ActionTest table in one row:
Action is InstallFiles
Description is Copying new files
Template is [1] ([6] B) to [9]
and see if you get some file copying messages.

Related

Visual Studio 2015 - New Project Windows Obscuring Details

Hi I have Visual Studio 2015 - And when I try to create a new Windows Form Application - both the Location, SolutionName, CreateDirectoryforSolution box and Add to Source Control are missing - Yet if I select a "Telerik" type or other types it shows - I've checked on my colleagues machine and his works as predicted. ie Shows the other project elements.
Two images below - Any clues? Resizing the frame does not help.
Thanks
and with the correct details:-
Visual Studio allows you to create new projects without having to save them (temporary projects).
If you create a new Forms application, it will generate all the files etc. If you wish to save, click the Save menu option and the following window is shown:
You can control this behaviour via the options:
On the Tools menu, click Options.
Expand the Projects and Solutions node, and select the General node.
Make sure Save new projects when created is cleared, if you want to allow temporary projects; otherwise, make sure it's checked to be prompted for location and solution name when creating a new project.
Click OK.
With the Save new projects option is checked, you'll be prompted for a Name, Location and Solution Name when selecting the project type, as per the screenshot below.
This MSDN article: Temporary Projects provides a fuller explanation on the subject.

How to setup Installer project with conditional file copying

I am building a VS 2010 installer, and I want to copy files to app folder depending on what options I select in UI (UI is not simple, so the only option is to show custom dialogs in Install custom action).
The problem is that custom action is actually executed after files are copied already.
One possible solution I can think of is to install all these files into the app dir, and then delete some unnesessary files in custom action. But these files are "secure" in some way, so I don't want to copy them to filesystem, even for a short period of time.
Any thoughts?
If your files shouldn't ever be on the filesystem, you have a problem in the requirements. The .msi storage itself is an open format and can be read by many tools, so if someone knows the file it's possible for them to find and extract it manually.
I agree that it's better to avoid deleting the files after they've been installed for two reasons. One: it avoids wasted work, and two: it won't cause repair scenarios due to missing files that Windows Installer thinks should be present. You should probably figure out how to determine whether these files should be present at an earlier stage of the installation, and set properties that cause this to happen (disable components by condition, or change feature states).
Most controls in MSI dialogs use installer properties. For example, a checkbox may use a property named MY_CHECKBOX which is set to a value or it's empty, based on whether the checkbox is checked or not.
These properties can be used to condition files:
select your setup project in Solution Explorer
click File System Editor button from Solution Explorer top pane
select the file you want to condition
in its Properties pane set Condition field to the condition you want, for example
MY_CHECKBOX = "value"

Run two executable after Installation is complete

I am making an Installer using VS Setup project(using VS 2010). Everything is fine except that when I am trying to run two executable file in "Committed" event of the installer they are running before Finish/Close button of Installer is clicked.
I want these executable files to run after I have clicked Close/Finish button of the installer. i.e. whole installation is completed.
Is there any way to accomplish this??
Thanks in advance
This is the normal behavior. Commit actions run as part of InstallExecuteSequence, so before the finish dialog is displayed.
If you want to execute an action when pressing Finish, you need to use control events:
modify your MSI so the custom actions are not used by InstallUISequence or InstallExecuteSequence tables
for the Finish button create a published DoAction control event for each custom action
This is not supported by Visual Studio. So you can either try modifying your generated MSI with Orca or use another setup authoring tool which supports it.

How to launch Maintenance mode--"Change, Repair, or Remove installation" dialog in WIX

I have changed the wix tutorial codes from here http://www.tramontana.co.hu/wix/ to make my own installer.
There is no problem when I run the installer to setup my application. But when I run the the installer again, a window jumped out said "Another version of this prodcut is already installed..."
But in the sample, there should be a Maintenance mode, "change, repair or remove installation" dialog when running the installer after the program has already been installed.
I am using the WixUI_Mondo, I think it provides the maintenance mode automatically, any idea how to launch it?
But when I run the the installer
again, a window jumped out and said
"Another version of this product is
already installed..."
This is the error you get when you rebuild your installer with the exact same product ID, but different package ID and then run it again.
If you run the original MSI file it should go to maintenance mode.
If you don't have the original MSI anymore, you can still uninstall your product via add/remove programs. This is possible because Windows Installer caches MSI files with a random name under c:\windows\installer\.
Unless you need to support fine-grained upgrade scenarios (i.e. patching), I recommend you set the product ID to "*" and implement major upgrades as described in the wix help topic How to: Implement a Major Upgrade in your Installer.
I hope this is what you're missing:
Assuming you have an existing installer that's functional but just lacking a user interface, here are the steps you need to follow to use a WixUI stock dialog set:
Add a UIRef element to your installer source code, using an Id attribute of one of the dialog sets. In your case:
<Product ...>
<UIRef Id="WixUI_Mondo" />
</Product>
You can also customize your dialogs, so that you could create a custom 'maintenance' dialog.
-Good luck. Chris

How does one copy a dialog resource from one project to another in Visual Studio 6.0 or Embedded VC++ (eVC)?

I've got two branches of code. 1 has a dialog box that the other doesn't, but because of politics the dialog box wasn't moved into the newest branch. Now they want it in...
So is it possible to copy a dialog box from one project to another.
There apears to be an export and import feature however it's greyed out.
.RC files are simple text files. You can simply copy/paste the DIALOG text from one .RC file to the other. Make sure that you copy the corresponding RESOURCE.H entries as well.
Alternatively, you might be able to open both .RC files and then simply drag-and-drop the dialog from one to the other.
Update for Visual Studio 2010 - 2013:
You can still drag-drop and copy-paste, but only outside of your project / solution.
Close solution, open both RC as files without any open solution, and go. For drag, "Hold down the CTRL key and drag the resource to the second .rc file. For example, drag IDD_DIALOG1 from Source1.rc to Source2.rc."
Microsoft - How to Copy Resources
Drag and drop doesn't work in Visual Studio 2010. Editing the .RC file does work but be careful. For me the ID for the dialog showed up with *ID_etc*. I copied it and removed the *'s and it seemed to fix the problem.
I finally figure it out how to copy a Dialog from one solution to another.
Steps:
Open both solutions in separte windows.
Add a new Blank Dialog -Add Resources-> add->newDialog
Open Both Dialogs Open Binary data.
Copy the Binary data from source solution dialog to Destination Dialog
This is just to add some visual detail to the accepted answer (by Roger Lipscombe) along with its steps.
In order to copy a resource such as a Dialog from one project another project, below steps can be followed.
Start a new instance of Visual Studio.
Open both source and destination .RC file as files, as shown in the picture.
From the source RC file, copy required dialog.
Switch to the destination RC file tab and simply paste it.
Please note that this operation would have updated the resource.h file. That is an excellent help by Visual Studio.
One will have to make sure that no duplicate resource IDs are present in the resource.h file. When working with some legacy projects, it is found that there came some duplicate resource Ids that had to be manually corrected. It looks like such an effort is worth considering the mammoth task required otherwise.

Resources