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
- :
- Getting the URL Correct.
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
‎Oct 22, 2008
09:43 AM
Getting the URL Correct.
Hi Folks,
I have given a end user an option to change the location of the application.
I use the file(Balaji,txt) that is present under the Application Files during the installation process. But I have Hardcoded the value (link or url) in my installscript as below
For eg:
strFileName = "C:\\InstallShield 2009 Projects\\CBW\\PROJECT_ASSISTANT\\SINGLE_EXE_IMAGE\\DiskImages\\DISK1\\program files\\Infy\\Test\\Deploy\\Balaji.txt";
But when user selects different location , the code fails saying not able to locate the file. How can this be corrected.
How can i dynamically change the URL in the installscript according to users choice.
I have given a end user an option to change the location of the application.
I use the file(Balaji,txt) that is present under the Application Files during the installation process. But I have Hardcoded the value (link or url) in my installscript as below
For eg:
strFileName = "C:\\InstallShield 2009 Projects\\CBW\\PROJECT_ASSISTANT\\SINGLE_EXE_IMAGE\\DiskImages\\DISK1\\program files\\Infy\\Test\\Deploy\\Balaji.txt";
But when user selects different location , the code fails saying not able to locate the file. How can this be corrected.
How can i dynamically change the URL in the installscript according to users choice.
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 22, 2008
02:40 PM
If it's a file that you're installing, perhaps something like INSTALLDIR^"filename.txt" would do it?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 23, 2008
07:26 AM
Hi Robert,
I tried out this option but not worked out well in my case.
I have added the required file that needs to be called in the installscript, under Application Files in Project Assitant TAB.
But when end user goes for installation the script is called before the application is installed in the end user meachine (i.e During Installation process). The text file should be present in the database in my local where i have got installshield installed. But in the end user perspective how can i dynamically call the file that is present under the Application Files during installation in end user meachine. (While running the exe).
So how can i dynamically use the path (URL) in my InstallScript.
I am having a compressed form of setup.exe file which will be used by the end user for installing the application in his local meachine.
I tried out this option but not worked out well in my case.
I have added the required file that needs to be called in the installscript, under Application Files in Project Assitant TAB.
But when end user goes for installation the script is called before the application is installed in the end user meachine (i.e During Installation process). The text file should be present in the database in my local where i have got installshield installed. But in the end user perspective how can i dynamically call the file that is present under the Application Files during installation in end user meachine. (While running the exe).
So how can i dynamically use the path (URL) in my InstallScript.
I am having a compressed form of setup.exe file which will be used by the end user for installing the application in his local meachine.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 23, 2008
04:06 PM
For files you want to use during installation but not necessarily install, perhaps look into the Support Files view and the SUPPORTDIR property or variable (depending on project type)?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 24, 2008
05:25 AM
Hi Robert,
I have tried according to the topic in the help document.
Placing Files in the .msi Database and Extracting Them During Run Time
First i have added the text file (Balji.txt) under the Support Files option. Then i added in the script to call the txt file during installation as strFileName = SUPPORTDIR^"Balaji.txt";
And for setting the propert i used the code
if(MsiGetProperty(hMSI, "DisplaySupportDir", supportDirPath, supportDirPathBuffer) == ERROR_SUCCESS) then
SprintfBox(INFORMATION,"Deferred Execution","The value of SUPPORTDIR is %s",supportDirPath);
SprintfBox(INFORMATION,"Deferred Execution","The value of InstallScript's SUPPORTDIR is %s",SUPPORTDIR);
endif;
I am not able to see any Balaji.txt file when installation process started. Still getting the error message file missing.
I have tried according to the topic in the help document.
Placing Files in the .msi Database and Extracting Them During Run Time
First i have added the text file (Balji.txt) under the Support Files option. Then i added in the script to call the txt file during installation as strFileName = SUPPORTDIR^"Balaji.txt";
And for setting the propert i used the code
if(MsiGetProperty(hMSI, "DisplaySupportDir", supportDirPath, supportDirPathBuffer) == ERROR_SUCCESS) then
SprintfBox(INFORMATION,"Deferred Execution","The value of SUPPORTDIR is %s",supportDirPath);
SprintfBox(INFORMATION,"Deferred Execution","The value of InstallScript's SUPPORTDIR is %s",SUPPORTDIR);
endif;
I am not able to see any Balaji.txt file when installation process started. Still getting the error message file missing.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 24, 2008
08:40 AM
Sorry, what is DisplaySupportDir? (A first thing to check is, have you set a large enough value in your supportDirPathBuffer variable before calling MsiGetProperty?)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 28, 2008
05:53 AM
Robert,
I have added the following code in the installscript function DisplaySupportDir
supportDirPathBuffer = MAX_PATH;
if(MsiGetProperty(hMSI, "CustomActionData", supportDirPath, supportDirPathBuffer) == ERROR_SUCCESS) then
SprintfBox(INFORMATION,"Deferred Execution","The value of SUPPORTDIR is %s",supportDirPath);
SprintfBox(INFORMATION,"Deferred Execution","The value of InstallScript's SUPPORTDIR is %s",SUPPORTDIR);
endif;
During installation, I noticed two folder were created in user TempFolder. The first folder always consistent and named with {ProductCode}, and also all the files i put in support files is here. The second folder name always dynamic, and it contains files like "_isres.dll, IsConfig.ini, ISRT.dll, setup.inx ..."
Usually the SUPPORTDIR should be the temp folder named with the {ProductCode}? If yes, i would rather point to "TempFolder\{ProductCode} to access my files for installation.
But the SUPPORTDIR is pointing to the folder which has files like "_isres.dll, IsConfig.ini, ISRT.dll, setup.inx ..." .. But the file i put in support files is present in folder {ProductCode}.
What should be done in this case?
I have added the following code in the installscript function DisplaySupportDir
supportDirPathBuffer = MAX_PATH;
if(MsiGetProperty(hMSI, "CustomActionData", supportDirPath, supportDirPathBuffer) == ERROR_SUCCESS) then
SprintfBox(INFORMATION,"Deferred Execution","The value of SUPPORTDIR is %s",supportDirPath);
SprintfBox(INFORMATION,"Deferred Execution","The value of InstallScript's SUPPORTDIR is %s",SUPPORTDIR);
endif;
During installation, I noticed two folder were created in user TempFolder. The first folder always consistent and named with {ProductCode}, and also all the files i put in support files is here. The second folder name always dynamic, and it contains files like "_isres.dll, IsConfig.ini, ISRT.dll, setup.inx ..."
Usually the SUPPORTDIR should be the temp folder named with the {ProductCode}? If yes, i would rather point to "TempFolder\{ProductCode} to access my files for installation.
But the SUPPORTDIR is pointing to the folder which has files like "_isres.dll, IsConfig.ini, ISRT.dll, setup.inx ..." .. But the file i put in support files is present in folder {ProductCode}.
What should be done in this case?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 29, 2008
06:03 PM
I believe you'll want the SUPPORTDIR property, and not the SUPPORTDIR variable; the "SUPPORTDIR" help topic has some more information.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 30, 2008
12:00 AM
Robert,
Its perfect it worked out really well, Thanks for your help.
using "SUPPORTDIR" Variable
if(MsiGetProperty(hMSI, "SUPPORTDIR", supportDirPath, supportDirPathBuffer) == ERROR_SUCCESS) then
MessageBox(supportDirPath,0);
endif;
strFileName = supportDirPath^"Balaji.txt";
Its perfect it worked out really well, Thanks for your help.
using "SUPPORTDIR" Variable
if(MsiGetProperty(hMSI, "SUPPORTDIR", supportDirPath, supportDirPathBuffer) == ERROR_SUCCESS) then
MessageBox(supportDirPath,0);
endif;
strFileName = supportDirPath^"Balaji.txt";
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)