You want:

Session.Property("PREVIOUS_PATH") = pathToProcess

But honestly, Script Custom Actions are very fragile. Consider C++ or C# 
instead.

----------------------------------------
 From: "Vladimir Yelnikov" <vladimir.yelni...@gmail.com>
Sent: Tuesday, March 19, 2013 10:05 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Modify Public property from VBScript CustomAction

Hi everyone.
I try to modify public property from VBScript CustomAction but without any
success:

<CustomAction Id="ProcessPath" Script="vbscript">
<![CDATA[
pathToProcess = Session.Property("PREVIOUS_PATH")
pathToProcess = Replace(pathToProcess, "/", "\")
Session.SetProperty "PREVIOUS_PATH", pathToProcess
]]>
</CustomAction>

I tried Session["PREVIOUS_PATH"] = pathToProcess but it didn't work.

Is it possible to modify property values from script custom action?

The real problem is legacy application saves pathes with "/" slashes and
when installing new version Installer should copy files to directory with
those slahes (from registry) or default folder. But the path "C:/dir1/ is
interpreted as network location and with C:\dir1\ works perfectly.

<SetProperty Id="FilesPath" Value="[PREVIOUS_PATH]" After="CostInitialize"
>PREVIOUS_PATH</SetProperty>

FilePath is a Directory element. PREVIOUS_PATH is initialized with
RegistrySearch element.

Thank you!

-- 
Best Wishes,
Vladimir
----------------------------------------------------------------------------
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to