Using square brackets in Write Registry or Create File type

Got a problem you cannot solve? Try here.
drewau
Posts: 27
Joined: Tue Aug 05, 2008 10:29 pm
Location: Australia

Using square brackets in Write Registry or Create File type

Postby drewau » Sun Aug 30, 2009 7:02 pm

Hi Guys,

I'm a bit stumped on an issue our testers have identified with Write Registry and Create File Type commands.
Our software creates a File Association for a couple of exes in the registry. We use a shell verb with a DDE command:

Code: Select all

[Open("%1")]
.

To create the File Association, I used the import feature in design view. When we install the project, the location in the registry where the DDE command should be contains a blank string. If I remove the square brackets and supply

Code: Select all

Open("%1")
the string gets entered into the registry correctly.

The problem is we need the square brackets and I can't seem to find a way to get them to display. I tried to work around the issue by entering the value directly with Write Registry but the same behavior is displayed.

Maybe I have missed something in the help file or is this a issue with Installaware? I'm using IA 9 Studio. I have supplied a test project that replicates the problem.

Regards,

Drew.

File Attached:

My Project1.zip

neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK
Contact:

Postby neillans » Mon Aug 31, 2009 4:02 pm

Hi Drew,

It looks like the characters are being stripped in the registry routines; can you give me an idea why you are looking to put the square brackets in a string? I'll get this logged for a fix with the dev team as soon as possible.
Andy Neillans

drewau
Posts: 27
Joined: Tue Aug 05, 2008 10:29 pm
Location: Australia

Postby drewau » Mon Aug 31, 2009 4:50 pm

can you give me an idea why you are looking to put the square brackets in a string?


No sorry, I don't really have a reason, other than this is how it was implemented in our previous Wise install script.

I'll get this logged for a fix with the dev team as soon as possible.


Thanks Andy, that would be appreciated :-)

ulrichard
Posts: 150
Joined: Thu Dec 27, 2007 5:45 am
Location: Switzerland
Contact:

Re: Using square brackets in Write Registry or Create File t

Postby ulrichard » Wed Dec 07, 2011 1:47 am

Did you find a solution to this problem?
I'm facing the same thing right now.
The square brackets seem to be required by the default MFC DDE handler.
http://www.pointline.com
http://www.paraeasy.ch
http://ulrichard.ch

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Using square brackets in Write Registry or Create File t

Postby giaviv » Fri Dec 09, 2011 10:04 pm

Hi,

Please try either:
1. Turning on the Native Engine by setting the NATIVE_ENGINE variable to TRUE
2. Storing the string in a variable and writing it directly as part of the variable

I believe the characters [ and ] should be escaped because they ordinarily denote properties (kind of like variables) in the MSI world.

In an case, here is the proper MSI escape sequence:
[\[]Bracket Text[\]] resolves to [Bracket Text].
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

ulrichard
Posts: 150
Joined: Thu Dec 27, 2007 5:45 am
Location: Switzerland
Contact:

Re: Using square brackets in Write Registry or Create File t

Postby ulrichard » Mon Dec 12, 2011 6:23 am

Hi giaviv,

thanks for answering.
In the meantime I solved it by using the "WriteRegistryPersist" plugin.

Rgds
Richard
http://www.pointline.com
http://www.paraeasy.ch
http://ulrichard.ch


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 25 guests