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
- :
- Re: Path seperators missing from absoluteInstallLocation
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
Jul 25, 2006
09:50 AM
Path seperators missing from absoluteInstallLocation
Hello all,
I am experiencing a problem when I assign $PATH($P(absoluteInstallLocation)) to a string variable in the Swing Events code in a custom dialog box. When I use $PATH($P(absoluteInstallLocation)) as an argument for a path location it works fine, however when I use it in this fashion:
arg0.resolveString(“$PATH($P(absoluteInstallLocation))”) it returns “C:Program FilesMyCompanyMyProject” rather than “C:\Program Files\MyCompany\MyProject”
Can someone help me to resolve this?
Thanks much all.
I am experiencing a problem when I assign $PATH($P(absoluteInstallLocation)) to a string variable in the Swing Events code in a custom dialog box. When I use $PATH($P(absoluteInstallLocation)) as an argument for a path location it works fine, however when I use it in this fashion:
arg0.resolveString(“$PATH($P(absoluteInstallLocation))”) it returns “C:Program FilesMyCompanyMyProject” rather than “C:\Program Files\MyCompany\MyProject”
Can someone help me to resolve this?
Thanks much all.
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 26, 2006
08:15 AM
That's strange; how are you using that string? Using this in the Swing code for the Welcome dialog seems to work:
String msg = arg0.resolveString("$PATH($P(absoluteInstallLocation))");As a test, does it work if you remove the $PATH part of it?
javax.swing.JOptionPane.showMessageDialog(null, msg);
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 26, 2006
09:13 AM
Hi Robert,
Thanks for your help with this. The code you posted does indeed show the path separators.
What I'm attempting to do is to update an ASCII text file with the path of the installation location. I have a custom dialog that has the following code:
String httpConfData = httpConfDataString.toString();
httpConfData = httpConfData.replaceAll("@@ServerRoot@@", "\"" + arg0.resolveString("$PATH($P(absoluteInstallLocation))") + "\"");
FileWriter writer = new FileWriter(httpConf);
writer.write(httpConfData);
writer.close();
I tried this approach after attempting to use an ASCII File Update action placed under the Behavior and Logic -> Sequences -> Product Sequences -> Installation Sequence -> Post Install after the Post-Install Summary Dialog. The problem I have there is that the Replace action I have does not appear to execute. I added an Add Line/Text/Comment update action which truncated the file and then added the text I specified, so I know that I have the file correct, and that the ASCII File Update action is executing.
In the end, I just need to update an ASCII text file with the installation path.
Thanks much for your help.
Thanks for your help with this. The code you posted does indeed show the path separators.
What I'm attempting to do is to update an ASCII text file with the path of the installation location. I have a custom dialog that has the following code:
String httpConfData = httpConfDataString.toString();
httpConfData = httpConfData.replaceAll("@@ServerRoot@@", "\"" + arg0.resolveString("$PATH($P(absoluteInstallLocation))") + "\"");
FileWriter writer = new FileWriter(httpConf);
writer.write(httpConfData);
writer.close();
I tried this approach after attempting to use an ASCII File Update action placed under the Behavior and Logic -> Sequences -> Product Sequences -> Installation Sequence -> Post Install after the Post-Install Summary Dialog. The problem I have there is that the Replace action I have does not appear to execute. I added an Add Line/Text/Comment update action which truncated the file and then added the text I specified, so I know that I have the file correct, and that the ASCII File Update action is executing.
In the end, I just need to update an ASCII text file with the installation path.
Thanks much for your help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 26, 2006
09:18 AM
For your method, does it work if, instead of using $PATH, you use $N with a double backslash as the separator?
Something like this, perhaps:
$N($P(absoluteInstallLocation), \\)
Something like this, perhaps:
$N($P(absoluteInstallLocation), \\)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 26, 2006
09:46 AM
Hi Robert,
No such luck. Any ideas on what else I can try?
Thanks much.
No such luck. Any ideas on what else I can try?
Thanks much.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 26, 2006
10:39 AM
Perhaps we can investigate why the ASCII File Update action isn't working. For example, I'm installing a file called replace.properties, which contains the line:
Where=%HERE%
In the same component as the Files action that installs the file, I add an ASCII File Update action underneath that points to that file name, with these two actions/settings---
1. Search Line/Text; Tokens: %HERE%; Return Position: First Token
2. Replace Line/Text; Old Line: %HERE%; New Lines: $PATH($P(absoluteInstallLocation))
---and it seems to work...
Where=%HERE%
In the same component as the Files action that installs the file, I add an ASCII File Update action underneath that points to that file name, with these two actions/settings---
1. Search Line/Text; Tokens: %HERE%; Return Position: First Token
2. Replace Line/Text; Old Line: %HERE%; New Lines: $PATH($P(absoluteInstallLocation))
---and it seems to work...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 26, 2006
12:19 PM
AH-HA. That's it. I didn't put in a search action before the replace action, (I assumed that the replace action would implicitly do this). Thanks for your help Robert!