I want to add a dialog which will be a Text-box, user will write something
in that (like client Name - Nike) which will mandatory to fill and then i
want to use that value in Application Folder . Ex -
default Application Folder path is -
[ProgramFilesFolder][Manufacturer]\[ProductName]
and i want to add this
textbox or dialog value in that means now folder location will be
[ProgramFilesFolder][Manufacturer]\[TextBoxValue]\[ProductName]
.
Please help me if i can write this code in class or how to add in property?
Can i achieve it? Please reply.
Thanks for helping...
Default Location Image
Added a textbox
in user interface which is -
There is no support for doing this in Visual Studio setup projects. However it can be achieved by altering the MSI file after it's been built.
In the textboxes dialog with a default property name EDITA1, the normal way to add the user entered value to the path would be to define the path in the File System view for the Application Folder as:
[ProgramFiles64Folder][Manufacturer]\NewSetup[EDITA1]
where the brackets around property names cause them to resolve to the actual values. So basically put [EDITA1] in the appropriate place.
Unfortunately Visual Studio's generation of the MSI file breaks this. The issue is that the directory for the application folder is set BEFORE the textboxes dialog is shown. The way to fix this is to edit the MSI file with Orca, and change the InstallUISequence table at the end. The sequence number values don't matter. Just alter the sequence numbers so that end of the InstallUISequence table is in the order:
MaintenanceForm DIRCA_TARGETDIR CostFinalize FolderForm ExecuteAction
and be sure that you have moved DIRCA_TARGETDIR and not left it in its early position.
DIRCA_TARGETDIR is the action that sets the target directory for the application folder. By placing it after the textboxes dialog it will include the value of EDITA1, which is what is shown in FolderForm for the install directory for Application Folder.