Help with Write Registry

Got a problem you cannot solve? Try here.
mdavtec
Posts: 22
Joined: Wed Jan 20, 2016 2:59 pm

Help with Write Registry

Postby mdavtec » Thu Feb 13, 2020 5:57 pm

Not sure what I'm missing, but following code doesn't work.

Code: Select all

Write Registry Key HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.TEST\MSSQLServer\SuperSocketNetLib\Tcp\IPAll\TcpDynamicPorts, 11422 (permanent)
Apply Install

Set Variable SQLTCPDynamicPN to
Read Registry Key HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.TEST\MSSQLServer\SuperSocketNetLib\Tcp\IPAll\TcpDynamicPorts into SQLTCPDynamicPN
MessageBox: SQL Port, TcpDynamicPorts:$SQLTCPDynamicPN$;
Comment: This would still show the old value not 11422.


If I run the installation again, then it would change the value in the registry. Looks like 'Apply Install', when called 2nd time, it works.
I plan to do this for with 'Set x64 bit mode'. And I've tried that but same result.
Any suggestion? Thanks.

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

Re: Help with Write Registry

Postby FrancescoT » Fri Feb 14, 2020 11:50 am

The code looks to be correct. Are you sure Apply Install successfully completes on first time you run the package?
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

mdavtec
Posts: 22
Joined: Wed Jan 20, 2016 2:59 pm

Re: Help with Write Registry

Postby mdavtec » Tue Mar 10, 2020 4:52 pm

Sorry for the late reply but it does shows 'COMPLETE'
ExchA

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

Re: Help with Write Registry

Postby FrancescoT » Wed Mar 11, 2020 12:29 pm

I just tried with invoking "Write Registry" exactly as you did from a test project, and it works fine.
You can try by yourself, test project is attached.

So, if there is a problem ...this has nothing to do with Write Registry.
Attachments
WriteRegTest.7z
(2.44 MiB) Downloaded 49 times
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: Google [Bot] and 14 guests