Page 1 of 1

Specifying $TARGETDIR$ in registry entry

Posted: Wed Oct 30, 2013 8:27 am
by Cardiocom
I have a need to use the $TARGETDIR$ variable in a registry entry to take into account the 32 bit installation on a 64
bit operating system.

If I try to add an entry that essentiallt would look like this ,

Write Registry Key HKCR\CardiocomSPHandler\shell\open\command, "$TARGETDIR$\CardiocomSPHandler.exe" " %1"

I get an error pop-up that states "0|" is not a valid integer value" (See attached file). The registry editor screen at this
point gets out of sync and I have to delete the entry entirely to fix it. If I go the the MSI editor while in the state, the
project becomes corrupt and I need to start over.

Any ideas ? Is the use of the $TARGETDIR$ allowed , or is there another problem ??

Thanks ..

InstallError.png
InstallError.png (13.5 KiB) Viewed 13590 times

Re: Specifying $TARGETDIR$ in registry entry

Posted: Wed Oct 30, 2013 11:46 am
by FrancescoT
Dear user,

this very probably happens, because there are some garbage characters with the command parameters for the "Write Registry Key" command.

Could you post the script command you used? (please use the IA Clipboard format)

PLEASE NOTE!
This discussion has been moved to Technical Support forum section.


Regards

Re: Specifying $TARGETDIR$ in registry entry

Posted: Wed Oct 30, 2013 2:00 pm
by Cardiocom
Thanks for getting back to me. I'm not sure I can get an accurate code listing as the program itself seems
to get corrupted immediately. I am however now able to recreate the problem at will.

On the Registry screen, add a new value. for the data portion past this exactly:

"$TARGETDIR$/Cardiocom/CardiocomSPHandler.exe" " %1"

When you press OK, the error message pops up and the installation is now corrupt. If you move to the
MSICode screen you cannot get back to the registry screen.

After playing around some I found that the problem seems to be with the quotes and not the use of
the variable. If I just place a variable as a data value everything is fine.

Re: Specifying $TARGETDIR$ in registry entry

Posted: Wed Oct 30, 2013 2:04 pm
by Cardiocom
Attached is the corrupt mia file. You can literally see the "0|" value in the text.

Re: Specifying $TARGETDIR$ in registry entry

Posted: Thu Oct 31, 2013 12:34 pm
by FrancescoT
... I just edited your file. It should work now.

Regards

Re: Specifying $TARGETDIR$ in registry entry

Posted: Thu Oct 31, 2013 12:36 pm
by Cardiocom
Thank you for the file. Are you planning on fixing the issue in a future patch ?? I'm sure we will run into this again ..

Todd

Re: Specifying $TARGETDIR$ in registry entry

Posted: Thu Oct 31, 2013 12:51 pm
by FrancescoT
Dear Todd,

maybe you won't believe me, but I just tried your steps and this doesn't happen.

Anyway, I'm using IA 18 and I don't know if you are using a different version.

Regards

Re: Specifying $TARGETDIR$ in registry entry

Posted: Sun Nov 24, 2013 11:29 am
by 235301
I am running into the exact same problem. What is the solution to fix this issue? I tried enclosing $TARGETDIR$ in quotation marks and this does not help.

It appears it's a bug but what's the workaround for now?

Note the other problem I am running into is that my registry path has the (r) registered trademark in it and each time I reload the project it is being replaced by an erroneous character. I am on version 18 now but this has been allowed in previous versions of InstallAware.

Re: Specifying $TARGETDIR$ in registry entry

Posted: Mon Nov 25, 2013 12:50 pm
by FrancescoT
Dear 235301,

Let me check if exist any limitation with using special characters with registry key name.

By the way, the original post was created to report a totally different "POSSIBLE" issue ... that in reality doesn't exist at all
In your case a new topic should have been started.
Please consider this next time you need to report a possible issue.

Regards

Re: Specifying $TARGETDIR$ in registry entry

Posted: Mon Dec 02, 2013 10:06 pm
by 235301
Actually, it appears to me to be the same issue. And it's a real issue, attached is a screenshot of the error.

I am trying to use TARGETDIR as a parameter in setting a registry value on install. Note that I have just upgraded from a much older version of InstallAware and I haven't touched these registry values since using the older version. So the new version doesn't like the registry values I am using.

Please let me know if you need me to provide you any of the project files.

Thank you!

Re: Specifying $TARGETDIR$ in registry entry

Posted: Tue Dec 03, 2013 10:50 am
by FrancescoT
Dear 235301,

as I already said previously;
this very probably happens, because there are some garbage characters with the command parameters for the "Write Registry Key" command.


If you post your script command ( ..use IA clipboard format) or the script file, I'll try to verify it.

Regards

Re: Specifying $TARGETDIR$ in registry entry

Posted: Wed Dec 04, 2013 12:12 pm
by 235301
Let me know if you need any other files.

Re: Specifying $TARGETDIR$ in registry entry

Posted: Wed Dec 04, 2013 1:12 pm
by FrancescoT
Dear 235301,

you have to include all the files used by your project ... otherwise, it will be impossible for me to compile it.

Anyway, I suppose to have found the source of your error, but anyway all your Write Registry statements seem to contain errors.
The passed registry path contains a garbage character and maybe un-wanted "slash" as well.

Supposing that your correct registry path is "SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\", you find below the edited code as IA clipboard format.

Code: Select all

~InstallAware Clipboard Data~
~Write Registry~
~{BB8DD5E6-56E4-49A3-BFC6-DE4389278776}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~Read Serial~
~1000~
~FALSE~
~TRUE~
~Write Registry~
~{57427B56-102E-4CDA-8010-925D8428304B}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~Black Level~
~0~
~FALSE~
~TRUE~
~Write Registry~
~{F96B01C3-D84D-46CA-B028-AA20C5B315A9}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~Saturation~
~100~
~FALSE~
~TRUE~
~Write Registry~
~{32B89112-D728-47BA-A421-BCC81AD0848C}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~HamGain~
~0~
~FALSE~
~TRUE~
~Write Registry~
~{84A466CF-78C3-43D0-A962-DBA5630D0C6C}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~CaptureBinning~
~1~
~FALSE~
~TRUE~
~Write Registry~
~{FFF5B062-3BEB-4BE8-B5D7-0AEFC13C650C}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~ExposureBinning~
~1~
~FALSE~
~TRUE~
~Write Registry~
~{D12ABFD4-2C99-4B87-9C7C-75AE29B52947}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~LivePreviewBinning~
~1~
~FALSE~
~TRUE~
~Write Registry~
~{A6A3BE3B-09AB-4C45-A7B6-16EAB16F3483}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~Square Pixels~
~0~
~FALSE~
~TRUE~
~Write Registry~
~{80174BE4-DCAA-4719-ACF4-DF81649135E1}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtFillDefault~
~1~
~FALSE~
~TRUE~
~Write Registry~
~{E4CE11A2-240F-4D4E-9CAA-B388BE7990B8}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtGammaDefault~
~10~
~FALSE~
~TRUE~
~Write Registry~
~{6538342B-D46B-4590-A90B-8C72F93DB068}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtSharpDefault~
~0~
~FALSE~
~TRUE~
~Write Registry~
~{6BDB3EE1-5DF5-45A8-8811-6B942C93E24B}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtContrastDefault~
~10~
~FALSE~
~TRUE~
~Write Registry~
~{C378D61C-64E8-486A-814C-1933E13C6F09}~
~0~
~2|~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtBrightDefault~
~0~
~FALSE~
~TRUE~
~Write Registry~
~{733917DD-DF7D-4512-A59F-B5BE13EB3917}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~Resolution~
~RS-170~
~TRUE~
~FALSE~
~Write Registry~
~{04DA52E2-8C52-4920-9D48-8BB8A08DC99A}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtSharp~
~0~
~FALSE~
~TRUE~
~Write Registry~
~{E1B43C36-C91A-4B0D-BC6F-D585AD330373}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtGamma~
~10~
~FALSE~
~TRUE~
~Write Registry~
~{BAEF7677-0048-45DB-9197-69A80BA748BA}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtFill~
~1~
~FALSE~
~TRUE~
~Write Registry~
~{7117CF3A-6DD5-4372-97DA-3121E74D6F21}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtContrast~
~10~
~FALSE~
~TRUE~
~Write Registry~
~{CCD85336-F041-4351-A6FC-9427658892F8}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~PrtBright~
~0~
~FALSE~
~TRUE~
~Write Registry~
~{B4C9F5EC-5ECD-4473-A5DD-A95AAF9C898E}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~HomeDirectoryPath~
~"$TARGETDIR$"~
~TRUE~
~FALSE~
~Write Registry~
~{3658D47D-B93C-4E0A-9F94-1BBD39F7B26E}~
~0~
~2~
~SOFTWARE\FOTODYNE\FOTO\Analyst PC Image\~
~Camport~
~1~
~FALSE~
~TRUE~


Hope this helps you.

Regards