This website uses cookies. By clicking OK, 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: Text file changes for registry files that incl...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
rrinblue22
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
May 19, 2015
01:29 AM
Re: Text file changes for registry files that include path statements
This code here should get you through.... and I assume you have a Basic MSI project type.
[CODE]export prototype set_prop(HWND);
function set_prop(hMSI)
STRING tmpINSTALLDIR;
STRING svInstalldir[256];
NUMBER nBuffer;
begin
tmpINSTALLDIR = INSTALLDIR;
nBuffer = 256;
StrRemoveLastSlash(tmpINSTALLDIR);
MsiSetProperty(hMSI,"DOUBLE_INSTALLDIR",tmpINSTALLDIR);
end;[/CODE]
[CODE]export prototype set_prop(HWND);
function set_prop(hMSI)
STRING tmpINSTALLDIR;
STRING svInstalldir[256];
NUMBER nBuffer;
begin
tmpINSTALLDIR = INSTALLDIR;
nBuffer = 256;
StrRemoveLastSlash(tmpINSTALLDIR);
MsiSetProperty(hMSI,"DOUBLE_INSTALLDIR",tmpINSTALLDIR);
end;[/CODE]
RatBoyGL
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
May 19, 2015
07:13 AM
Re: Text file changes for registry files that include path statements
Thanks.
I will try it.
Do I need another new property though to store the final value in?
Or do I change this: Session.Property("DOUBLE_INSTALLDIR") = Replace( Session.Property("INSTALLDIRNOTRAIL"), "\", "\\" )
To this: Session.Property("DOUBLE_INSTALLDIR") = Replace( Session.Property("DOUBLE_INSTALLDIR"), "\", "\\" )
I will try it.
Do I need another new property though to store the final value in?
Or do I change this: Session.Property("DOUBLE_INSTALLDIR") = Replace( Session.Property("INSTALLDIRNOTRAIL"), "\", "\\" )
To this: Session.Property("DOUBLE_INSTALLDIR") = Replace( Session.Property("DOUBLE_INSTALLDIR"), "\", "\\" )
rrinblue22
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
May 19, 2015
07:26 AM
Re: Text file changes for registry files that include path statements
Nope not necessary ... you can still have one property DOUBLE_INSTALLDIR and perform all the actions (remove the trailing slash, remove double slash) on it.
RatBoyGL
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
May 19, 2015
07:34 AM
Re: Text file changes for registry files that include path statements
Well, that didnt work either.
I keep getting the attached error when running the .MSI.

It is referencing my custom action which has this code: Session.Property("DOUBLE_INSTALLDIR") = Replace( Session.Property("DOUBLE_INSTALLDIR"), "\", "\\" )
But that did work when the replace statement was replacing just INSTALLDIR.
LOL...
I keep getting the attached error when running the .MSI.

It is referencing my custom action which has this code: Session.Property("DOUBLE_INSTALLDIR") = Replace( Session.Property("DOUBLE_INSTALLDIR"), "\", "\\" )
But that did work when the replace statement was replacing just INSTALLDIR.
LOL...
rrinblue22
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
May 19, 2015
07:48 AM
Re: Text file changes for registry files that include path statements
Appears to be a problem with the custom action sequence.
1: Run the InstallScript Custom action and result is DOUBLE_INSTALLDIR property is loaded with INSTALLDIR value without trailing slash.
2: Run your custom action which does "\\" to "\" on DOUBLE_INSTALLDIR property
1: Run the InstallScript Custom action and result is DOUBLE_INSTALLDIR property is loaded with INSTALLDIR value without trailing slash.
2: Run your custom action which does "\\" to "\" on DOUBLE_INSTALLDIR property
RatBoyGL
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
May 19, 2015
07:50 AM
Re: Text file changes for registry files that include path statements
rrinblue22 wrote:
Appears to be a problem with the custom action sequence.
1: Run the InstallScript Custom action and result is DOUBLE_INSTALLDIR property is loaded with INSTALLDIR value without trailing slash.
2: Run your custom action which does "\\" to "\" on DOUBLE_INSTALLDIR property
Yea, that is what I am doing:

rrinblue22
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
May 19, 2015
07:53 AM
Re: Text file changes for registry files that include path statements
you can also just write one single VBScript which performs both task of removing the trailing slash and "\\" to "\".
just a suggestion to un-complicate things 🙂
just a suggestion to un-complicate things 🙂
RatBoyGL
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
May 19, 2015
07:59 AM
Re: Text file changes for registry files that include path statements
Well..
Now I am closer than ever before.
Now it is kind of working, however, my config file ends up with two rows:
Thank you for all the help though. I am now almost there.
I guess in the XML Editor I can add a remove line to remove the bad one? Not sure why I should have to do that though.
Now I am closer than ever before.
Now it is kind of working, however, my config file ends up with two rows:
Thank you for all the help though. I am now almost there.
I guess in the XML Editor I can add a remove line to remove the bad one? Not sure why I should have to do that though.
rrinblue22
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
May 19, 2015
08:12 AM
Re: Text file changes for registry files that include path statements
I have just sent an email to your RatBoyGL account here.