This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Get user defined Location using dialog
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 18, 2012
06:59 AM
Get user defined Location using dialog
Hi friends,
Am using installshield 2010 for creating the setup files. I need to copy some files in to a user defined location While installing the setup on a destination mechine.
The destination location is user defined. so i need to get the destination location using one dialog box. (few files needs to be copied in to this location and other files in to installdir)
Can any one help me how to get the user defined location using a dialog
Sample code (or steps) will be a great help
Regards,
Nidheesh
Am using installshield 2010 for creating the setup files. I need to copy some files in to a user defined location While installing the setup on a destination mechine.
The destination location is user defined. so i need to get the destination location using one dialog box. (few files needs to be copied in to this location and other files in to installdir)
Can any one help me how to get the user defined location using a dialog
Sample code (or steps) will be a great help
Regards,
Nidheesh
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 18, 2012
09:20 AM
A little more info maybe...
What type of package are you building? Basic MSI or InstallScript?
Where are the files located that you are copying to the special customer-selected location? Are they included in the package or expected to already exist somewhere on the target machine?
What type of package are you building? Basic MSI or InstallScript?
Where are the files located that you are copying to the special customer-selected location? Are they included in the package or expected to already exist somewhere on the target machine?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 18, 2012
11:16 AM
ITI_Randy wrote:
A little more info maybe...
What type of package are you building? Basic MSI or InstallScript?
Where are the files located that you are copying to the special customer-selected location? Are they included in the package or expected to already exist somewhere on the target machine?
Hi,
Using a Basic MSI. But with using few installscript. Am including the files in package.
so whenever a user selects the folder name i can use settarget method(forgot the method name) to set that folder. Am able to wok with hardcoded folder name, but i dont know how to get it using dialog
regards,
nidheesh
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 18, 2012
06:13 PM
Start in the User Interface > Dialogs section of your InstallShield IDE. There you will find existing dialogs which demonstrate what you are describing. For instance, look at the “DatabaseFolder” dialog and how it works. Expand the “DatabaseFolder” node in the Dialogs view. In the “Behavior” you will notice that when clicking the “ChangeFolder” PushButton, a “SpawnDialog” event is defined to spawn the “InstallChangeFolder”. When the “ChangeFolderDialog” is shown, the user can browse to a folder location which gets saved to a property called “_BrowseProperty”. Back in the “DatabaseFolder” dialog events, you will notice that this value is then assigned to a “DATABASEDIR” which is a folder defined in the Directory table of the Direct Editor.
The same scenario described above is done with the “DestinationFolder” dialog, also shown in the dialogs view. In this dialog, the value of the browse after bringing up the “ChangeFolderDialog” is assigned to INSTALLDIR.
A quick and simple solution would be to use one of the dialogs mentioned above in your dialog sequence. Change the wording on the folder as desired and reassign the folder browse value in the dialog from “DATABASEDIR” or “INSTALLDIR” to your own folder definition added to the Directory table in Direct Editor. Once this is done, you only need to set the Destination of your components to your folder property. ([MyFolder]…).
The same scenario described above is done with the “DestinationFolder” dialog, also shown in the dialogs view. In this dialog, the value of the browse after bringing up the “ChangeFolderDialog” is assigned to INSTALLDIR.
A quick and simple solution would be to use one of the dialogs mentioned above in your dialog sequence. Change the wording on the folder as desired and reassign the folder browse value in the dialog from “DATABASEDIR” or “INSTALLDIR” to your own folder definition added to the Directory table in Direct Editor. Once this is done, you only need to set the Destination of your components to your folder property. ([MyFolder]…).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 19, 2012
05:59 AM
ITI_Randy wrote:
Start in the User Interface > Dialogs section of your InstallShield IDE. There you will find existing dialogs which demonstrate what you are describing. For instance, look at the “DatabaseFolder” dialog and how it works. Expand the “DatabaseFolder” node in the Dialogs view. In the “Behavior” you will notice that when clicking the “ChangeFolder” PushButton, a “SpawnDialog” event is defined to spawn the “InstallChangeFolder”. When the “ChangeFolderDialog” is shown, the user can browse to a folder location which gets saved to a property called “_BrowseProperty”. Back in the “DatabaseFolder” dialog events, you will notice that this value is then assigned to a “DATABASEDIR” which is a folder defined in the Directory table of the Direct Editor.
The same scenario described above is done with the “DestinationFolder” dialog, also shown in the dialogs view. In this dialog, the value of the browse after bringing up the “ChangeFolderDialog” is assigned to INSTALLDIR.
A quick and simple solution would be to use one of the dialogs mentioned above in your dialog sequence. Change the wording on the folder as desired and reassign the folder browse value in the dialog from “DATABASEDIR” or “INSTALLDIR” to your own folder definition added to the Directory table in Direct Editor. Once this is done, you only need to set the Destination of your components to your folder property. ([MyFolder]…).
hi,
thank you very much for your valuable reply. i tried the given suggestion, and worked for me once. After that i created a new msi and tried the same scenario and it is not working.
Also i need to default one path in the edit area. can you please suggest me where am doing wrong
Regards,
Nidheesh
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 19, 2012
10:10 AM
There must be something a little off in the newer one you created that isn’t working. Compare with the one that did work and see if you can locate the difference. Check to verify that you have a directory defined in the Directory table of Direct Editor.
For the default value, follow again the example on the existing dialog for “DestinationFolder” in your folder dialogs. In the Dialogs view, expand the “DestinationFolder” dialog and click on the graphical view (the “English-United States” node in mine) . You will see a text label there called “Location”. Notice that this label is set to a property value of “_BrowseProperty” and has a Text value of [INSTALLDIR] (pulling the value of the INSTALLDIR). Again, you will want to do something similar. Here, [INSTALLDIR] will be replaced with your directory you have defined in the Direct Editor Directory table. The value of your directory which is defaulted is whatever your folder resolves to based on its definition in the directory table.
Be careful that your directory parent is a valid location on the target machine. Do not set the text of the dialog to a hard-coded value, such as “C:\MyFolder”, as this will blow up with errors if this location is not available on the target machine. Instead, set the directory definition to have a valid parent which is properly resolved in the Directory table.
For the default value, follow again the example on the existing dialog for “DestinationFolder” in your folder dialogs. In the Dialogs view, expand the “DestinationFolder” dialog and click on the graphical view (the “English-United States” node in mine) . You will see a text label there called “Location”. Notice that this label is set to a property value of “_BrowseProperty” and has a Text value of [INSTALLDIR] (pulling the value of the INSTALLDIR). Again, you will want to do something similar. Here, [INSTALLDIR] will be replaced with your directory you have defined in the Direct Editor Directory table. The value of your directory which is defaulted is whatever your folder resolves to based on its definition in the directory table.
Be careful that your directory parent is a valid location on the target machine. Do not set the text of the dialog to a hard-coded value, such as “C:\MyFolder”, as this will blow up with errors if this location is not available on the target machine. Instead, set the directory definition to have a valid parent which is properly resolved in the Directory table.
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)