cancel
Showing results for 
Search instead for 
Did you mean: 
rrinblue22
Pilgrim

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]
0 Kudos
RatBoyGL
Pilgrim

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"), "\", "\\" )
0 Kudos
rrinblue22
Pilgrim

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.
0 Kudos
RatBoyGL
Pilgrim

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...
0 Kudos
rrinblue22
Pilgrim

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
0 Kudos
Highlighted
RatBoyGL
Pilgrim

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:

0 Kudos
rrinblue22
Pilgrim

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 :)
0 Kudos
RatBoyGL
Pilgrim

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.
0 Kudos
rrinblue22
Pilgrim

Re: Text file changes for registry files that include path statements

I have just sent an email to your RatBoyGL account here.
0 Kudos
RatBoyGL
Pilgrim

Re: Text file changes for registry files that include path statements

Replied.

ROFL...
0 Kudos