Can't compare two strings correctly

For all your non-technical questions.
smoura
Posts: 8
Joined: Mon Feb 27, 2006 7:05 am

Can't compare two strings correctly

Postby smoura » Mon May 15, 2006 6:21 am

I can't seem to compare two strings. One is read from the registry the other is the actual product code.

Code: Select all

~InstallAware Clipboard Data~
~End~
~{B1D297ED-E4B3-4434-84AC-3FB3268FD4CC}~
~End~
~{3425C64F-8ABB-4638-AA17-79F6B0B34186}~
~Set Variable~
~{967B045A-204B-462B-BD78-F268D4200522}~
~NEEDSUPGRADE~
~FALSE~
~Set Variable~
~{C972A75B-3F0C-4547-BB6F-5295DDBAFFAD}~
~MAINTENANCE~
~TRUE~
~If~
~{7DBD8576-B49A-46D0-9A12-A53F1747850F}~
~SAVEDPRODUCTCODE~
~0~
~EPRODUCTCODE~
~FALSE~
~Set Variable~
~{E2809A1D-CBD7-4E49-8343-E5DEF71BC21F}~
~EPRODUCTCODE~
~$PRODUCTCODE$~
~Read Registry~
~{334DDFFC-EB17-4D4B-9EF5-F188F89ABBA2}~
~SAVEDPRODUCTCODE~
~2~
~SOFTWARE\\nmKN~
~nmpcd~
~Set Variable~
~{689ED080-8817-41CC-B0BA-AD1C0F90A8DF}~
~SAVEDPRODUCTCODE~
~~
~Set Variable~
~{CA6704A0-A08F-43CD-BF71-9787E2908BAD}~
~NEEDSUPGRADE~
~TRUE~
~If~
~{7ABCC98C-EC37-41E6-BD94-E10B6EA300E3}~
~ISNMINSTALLED~
~0~
~1~
~FALSE~
~Read Registry~
~{DD3F350E-BCEF-41A6-BEE1-1B78416C433E}~
~ISNMINSTALLED~
~2~
~SOFTWARE\\nmKN~
~nmmist~
~Set Variable~
~{2223026C-41FF-46D3-80F5-B5AD95303304}~
~ISNMINSTALLED~
~0~


I need this type of comparision because I've the need to remove my software from the Add/Remove applications dialog.

Thanks in advance,
smoura

CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Postby CandiceJones » Mon May 15, 2006 3:02 pm

Hi!

The line where you say:

Code: Select all

  if Variable SAVEDPRODUCTCODE Equals EPRODUCTCODE
is wrong, it should be:

Code: Select all

  if Variable SAVEDPRODUCTCODE Equals $EPRODUCTCODE$
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

smoura
Posts: 8
Joined: Mon Feb 27, 2006 7:05 am

Postby smoura » Wed May 17, 2006 3:17 am

Well that was it... could you explain why the need to use the $$ :?

Thanks for the help... Will be buying installaware very soon.

CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Postby CandiceJones » Wed May 17, 2006 1:26 pm

Variables are differentiated from literals using dollar signs.
Candice Jones

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Non-Technical”

Who is online

Users browsing this forum: No registered users and 15 guests