Backslash woes writing to registry

Got a problem you cannot solve? Try here.
MarkThorogood
Posts: 2
Joined: Fri Jan 17, 2014 7:20 am

Backslash woes writing to registry

Postby MarkThorogood » Fri Jan 17, 2014 7:39 am

I have Installaware 2012 Admin edition I'm trying to write the following:

Provider=Microsoft.Jet.OLEDB.4.0;User ID="";Data Source=\\server1\vol3$\databases\mbs\new_mbs\mdb.mdb;Persist Security Info=False;Jet OLEDB:Database Password="xxxxxxx"

as a string registry data value.

The problem is Installaware is converting the double backslash to a single so is writing:

Provider=Microsoft.Jet.OLEDB.4.0;User ID="";Data Source=\server1\vol3$\databases\mbs\new_mbs\mdb.mdb;Persist Security Info=False;Jet OLEDB:Database Password="xxxxxxx"

I've tried all sorts of things, it has something to do with the dollar symbol. The only way I could get it to function was use "\\\\\\" instead of "\\" but that seems a hack. I have successfully written other registry value where a double backslash is present.

Is there anyway to escape the dollar sign (I've even tried using a variable $DOLLAR$ to represent a $ but that still fails)

Any suggestions please.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Backslash woes writing to registry

Postby FrancescoT » Fri Jan 17, 2014 12:51 pm

Dear User,

honestly, I just tried the following code ... and it works fine.

Write Registry Key HKCU\Software\myproduct\Test, \\server\mypath
Set Variable MYVALUE to \\server\mypath
Write Registry Key HKCU\Software\myproductTwo\Test, $MYVALUE$

Code: Select all

~InstallAware Clipboard Data~
~Write Registry~
~{18EE2682-E961-47CB-B7EE-0D14837BFB00}~
~0~
~1|~
~Software\myproductTwo~
~Test~
~$MYVALUE$~
~TRUE~
~FALSE~
~Set Variable~
~{C949172B-CDD2-4496-B127-67A1958B35B1}~
~MYVALUE$MYAH$MYAH$FALSE~
~\\server\mypath~
~Write Registry~
~{DCB62CAE-3B31-4FF6-B63A-3C0270449E65}~
~0~
~1|~
~Software\myproduct~
~Test~
~\\server\mypath~
~TRUE~
~FALSE~


Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

MarkThorogood
Posts: 2
Joined: Fri Jan 17, 2014 7:20 am

Re: Backslash woes writing to registry

Postby MarkThorogood » Sat Jan 18, 2014 3:51 am

Thanks for trying and the reply, but your example doesn't use the data that I mentioned caused a problem, also I have a further issue that I set registry entry as permanent and when I did a installer repair the registry items disappeared. So given up on installaware for this functionality and as I find increasing the case with software I'm doing it myself using a dll.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Backslash woes writing to registry

Postby FrancescoT » Mon Jan 20, 2014 5:13 am

Dear Mark,

I am not able to replicate the same ... if you post a minimal sample project I'll verify it.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 127 guests