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
- :
- need helpppppppppp
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
‎May 29, 2008
03:15 PM
asking for source folder(urgent)
hi Sir,,,
I want to create a setup which asks(browse) for a sorce folder named "abc"
and copies that folder to some hard coded path....Is it possible in Installshield
if yes can anyone help me how can i achieve this.....
thanks
jagjit
I want to create a setup which asks(browse) for a sorce folder named "abc"
and copies that folder to some hard coded path....Is it possible in Installshield
if yes can anyone help me how can i achieve this.....
thanks
jagjit
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 29, 2008
05:22 PM
i need help..it is very urgent..can someone explain it to me
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 30, 2008
09:32 AM
I don't know if you have gotten this done yet, but I will be glad to help if you still need help. Based on what you are asking, I would follow the following map:
1. Add a couple of properties to track your user input, one as a flag for "UserPickedAValidLocation", with a default value of "False", and another property which will hold the location, "MyUsersBrowseLocation". Also be sure to define a directory of the name "MyUsersBrowseLocation" in the direct editor. Set a default value in the directory table for this location. It may also be a good idea to do a system search to try to preset this value and avoid even having the user have to select if it is already found.
2. Create a custom dialog in which you assign the user browse value to your directory "MyUserBrowseLocation".
3. Create a custom action which will check the selected value "MyUsersBrowseLocation". If it is correct, it sets the flag "UserPickedAValidLocation" to "True" and if incorrect, sets the flag to "False" and pops up a SprintfBox which tells the user that the selected location %s is not valid.
4. On the Next button event of your custom dialog, make the first action to call your custom action which checks the location. Condition the New Dialog following to only draw if your flag, UserPickedAValidLocation = "True".
The basic idea is that you try to find the most likely location fo the file. Use this as the default value. It may be correct and the user will not even have to find it. In either case, whether the default value is okay or if the user browses, the property is set to that value. Your custom action checks the value and sets the condition flag. The user cannot move forward in the dialogs until the value is correct. They must either browse to a correct location or else cancel the install.
If you would like more specifics or code for the custom action, please let me know. I will be glad to offer a sample InstallScript that you can use as a template for this.
Hope this is of some help.
1. Add a couple of properties to track your user input, one as a flag for "UserPickedAValidLocation", with a default value of "False", and another property which will hold the location, "MyUsersBrowseLocation". Also be sure to define a directory of the name "MyUsersBrowseLocation" in the direct editor. Set a default value in the directory table for this location. It may also be a good idea to do a system search to try to preset this value and avoid even having the user have to select if it is already found.
2. Create a custom dialog in which you assign the user browse value to your directory "MyUserBrowseLocation".
3. Create a custom action which will check the selected value "MyUsersBrowseLocation". If it is correct, it sets the flag "UserPickedAValidLocation" to "True" and if incorrect, sets the flag to "False" and pops up a SprintfBox which tells the user that the selected location %s is not valid.
4. On the Next button event of your custom dialog, make the first action to call your custom action which checks the location. Condition the New Dialog following to only draw if your flag, UserPickedAValidLocation = "True".
The basic idea is that you try to find the most likely location fo the file. Use this as the default value. It may be correct and the user will not even have to find it. In either case, whether the default value is okay or if the user browses, the property is set to that value. Your custom action checks the value and sets the condition flag. The user cannot move forward in the dialogs until the value is correct. They must either browse to a correct location or else cancel the install.
If you would like more specifics or code for the custom action, please let me know. I will be glad to offer a sample InstallScript that you can use as a template for this.
Hope this is of some help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 30, 2008
10:11 AM
If your project uses Install Shield Script, this was taken out of the install shield help.
PathFind Example
InstallShield 12 » InstallScript Language Reference
To call this function in a Basic MSI setup, you must first create a custom action for the entry-point function, execute the custom action in a sequence or as the result of a dialog's control event, and then build the release.
You could also use the "AskPath" Dialog for the user to enter in the path.
Then you can use the windows "XCopy" and LaunchAppAndWait install shield function. These are only some of the ideas off the top of my head that you could try. Hope this helps...
PathFind Example
InstallShield 12 » InstallScript Language Reference
To call this function in a Basic MSI setup, you must first create a custom action for the entry-point function, execute the custom action in a sequence or as the result of a dialog's control event, and then build the release.
/*--------------------------------------------------------------*\
*
* InstallShield Example Script
*
* Demonstrates the PathSet, PathFind, and PathGet functions.
*
* First, PathSet is called to place a search path into the path
* buffer. Then PathFind is then called to search the path
* buffer for instances of a specific path. Finally, PathGet
* is called to return the contents of the path buffer.
*
\*--------------------------------------------------------------*/
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
export prototype ExFn_PathFind(HWND);
function ExFn_PathFind(hMSI)
STRING szString, szMsg, svResult, svString, szDir;
NUMBER nResult;
BOOL bDir, bSearch;
begin
// Set up the search path to pass as a parameter to PathSet.
szString = "C:\\DOS;C:\\USERS\\BIN;C:\\MSC\\BIN;";
// Place the search path into the path buffer
if (PathSet (szString) < 0) then
// Report an error; then terminate.
MessageBox ("PathSet failed.", SEVERE);
abort;
else
szMsg = "PathSet set the path buffer to: %s";
SprintfBox (INFORMATION, "PathSet Example", szMsg, szString);
endif;
// Set PathFind variables.
szDir = "BIN";
// Search the path buffer for paths that include a folder named "BIN".
nResult = PathFind(szDir, svResult, PARTIAL, RESTART);
// Error check PathFind.
if (nResult < 0) then
MessageBox("PathFind failed.", SEVERE);
abort;
endif;
// Loop through the string to find all occurrences of the szDir string.
while (nResult = 0)
SprintfBox(INFORMATION, "PathFind example",
"Search for %s.\n\nFound: %s", szDir, svResult);
nResult = PathFind(szDir, svResult, PARTIAL, CONTINUE);
endwhile;
// Get the contents of the path buffer.
if (PathGet (svString) < 0) then
MessageBox ("PathGet failed.", SEVERE);
else
// Display the path string.
SprintfBox (INFORMATION, "Path Get Example", "Path is: %s", svString);
endif;
end;
You could also use the "AskPath" Dialog for the user to enter in the path.
Then you can use the windows "XCopy" and LaunchAppAndWait install shield function. These are only some of the ideas off the top of my head that you could try. Hope this helps...
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)