DWORD registry values will always have a prefixed '#' character. It is
possible for it to get a '+' or a '-' character following the '#' and
preceding the actual number (in decimal aka base-10). You'll need a custom
action to parse/strip it. The Windows Installer's formatted syntax doesn't
have many string-manipulation operations built-in.

-----Original Message-----
From: John Trump [mailto:john_tr...@symantec.com] 
Sent: Thursday, August 20, 2009 3:07 PM
To: wix-users@lists.sourceforge.net
Cc: Thomas Svare
Subject: [WiX-users] How to strip the leading '#' from a numerical value
retrieved from a reg key using RegistrySearch

I retrieve the IISPORT from the registry as follows:

 

<Property Id="IISPORT">

      <RegistrySearch Id="IISPortSearch" Type="raw" Root="HKLM" 

Key="SYSTEM\CurrentControlSet\Control\ServiceProvider\ServiceTypes\w3svc
" 

Name="TcpPort" />

    </Property>

 

And build the url to our web page like this:

 

    <Property Id="SHORTCUTPATH">http://localhost:

[IISPORT]/CompanyName/product.Web/ProductHomePage/ProductHomePage.aspx</
Property>

 

 

The problem is that a '#' is prepended to the port number in [IISPORT].
How do I strip it off?

 

 

 

----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus
on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to