I have a Wix Toolset project with a component such as the one below, where MYLANGUAGE is a public property that can be set when installing the product:
<Component Id='language_reg' Guid='*' Permanent='yes'>
<Condition>MYLANGUAGE</Condition>
<RegistryValue Type='string' Root='HKLM' Key='Software\MyCompany\MyProduct' Name='language'
Value='[MYLANGUAGE]' KeyPath='yes' />
</Component>
Now I am upgrading this software package from 32-bit 64-bit. The key above from the existing 32-bit versions of my software is stored under HKLM\Software\WOW6432Node\MyCompany\MyProduct because of WOW64.
After an upgrade to a new 64-bit version of the package the upgrade I would like to have the value set in the HKLM\Software\MyCompany\MyProduct key too. The value shall be set like this:
If the public property MYLANGUAGE is set when installing then the value of that property shall be stored in HKLM\Software\MyCompany\MyProduct language
If the public property MYLANGUAGE is not set and HKLM\Software\MyCompany\MyProduct key doesn't exist and HKLM\Software\WOW6432Node\MyCompany\MyProduct language value is set then I want the value copied from HKLM\Software\WOW6432Node\MyCompany\MyProduct language to HKLM\Software\MyCompany\MyProduct language
How can I do this with WIX Toolset?
This is the WiX remember property pattern but a little more complicated.
Define property MyLanguageDefault with a default value for MYLANGAUGE
Use AppSearch/Reglocator (Property/RegistrySearch) to read 64bit value into 64bit temp property.
Use AppSearch/Reglocator (Property/RegistrySearch) to read 32bit value into 32bit temp property.
Use SetProperty custom action to assign 64bit temp property to MYLANGUAGE if MYLANGUAGE is null (maybe they passed it at the command line ) and 64bit temp property is not null
Use SetProperty custom action to assign 32bit temp property to MYLANGUAGE if MYLANGUAGE is null (maybe they passed it at the command line ) and 32bit temp property is not null
Use SetProperty custom action to assign MyLanguageDefault to MYLANAGUGE if MYLANGUAGE is null (nothing passed at command line and nothing found in 32bit or 64bit then use default value )
Display MYLANGUAGE in a dialog if you want them to be able to be able to edit it.
Use MYLANAGUAGE in a Component/RegistryValue to write the value to the 64bit registry. The component needs to have the Win64 attribute set to yes.
Please note that MYLANGUAGE also needs to be marked as a Secure Custom Public Property by using the Secure="yes" attribute.
Related
In my apex application I want to display custom application version. From the page template I see that it is using substution string APP_VERSION.
I tried changing this in application properties > Difinition > Substitution String. But it is not reflecting the changes.
Can anyone suggest how to solve this problem ?
The APP_VERSION is a substitution string. It cannot be overridden by a user defined substitution string. It takes the value from application properties > Definition > Name: Version.
This substitution string can be used in file url definition and as a template substitution string. It cannot be used in apps using the &P_ITEM. syntax and is not available in pl/sql as a bind variable.
I was able to solve this problem by adding application level item APP_VERSION. Added this as &APP_VERSION at field application properties > Definition > Name: Version.
In an Application Process, application level item APP_VERSION is assigned a value after reading a property in database table.
I would like to use %IF_INSTALLPATH% to set a Registry value with InstallForge, but it doesn't resolve the variable. So the registry value created is "%IF_INSTALLPATH%\bin" instead of "C:\MyApp\bin".
How can I use %IF_INSTALLPATH% in setting a registry value?
I am working on a bot build with Microsoft bot framework composer
I have an HTTP request that works and returns an array of programs
Currently, I have a "0" hard set and that works
${dialog.programlistlite.api_response.content.programs[0].name}
what i am trying to do is take property called dialog.resultnumber which is set to 0 and replace static "0" above with property called dialog.resultsnumber
I tried:
${dialog.programlistlite.api_response.content.programs[${dialog.resultsnumber}].name}
${dialog.programlistlite.api_response.content.programs[(dialog.resultsnumber)].name}
${dialog.programlistlite.api_response.content.programs[dialog.resultsnumber].name}
${dialog.programlistlite.api_response.content.programs[getproperty(dialog.resultsnumber)].name}
${dialog.programlistlite.api_response.content.programs[dialog.resultsnumber()].name}
${dialog.programlistlite.api_response.content.programs[${dialog.resultsnumber()}].name}
I cannot find the syntax to use an already defined property to build a new property
what i am trying to do is take property called dialog.resultnumber which is set to 0 and replace static "0" above with property called dialog.resultsnumber I tried:
Are you sure that dialog.resultsnumber is an int?
If you set it in a single set property action, make sure you set it as an int, the default is a string.
This below should be the one. It worked for me (with the above caveat):
${dialog.programlistlite.api_response.content.programs[dialog.resultsnumber].name}
You can also use the isInteger() type checking function to confirm if something is an int, or try and force/convert/coerce using int() if needed as well.
How do you set the value of this environment variable in Mac OSX? I tried creating an environment.txt file in my Xamarin.Android project with a build action of AndroidEnvironment, but when I check my diagnostic build output, I still see this:
MONO_GC_PARAMS = major=marksweep-conc
I didn't set that value - it must be the default, but I can't find where it's stored or how to change it. Thank you.
These items need to be on a single line with commas seperating the parameters. i.e. MONO_GC_PARAMS=bridge-implementation=tarjan,nursery-size=128m,soft-heap-limit=512m,major=marksweep-conc
This will be picked up via the following code:
if (lineToWrite.StartsWith ("MONO_GC_PARAMS=", StringComparison.Ordinal))
haveMonoGCParams = true;
You should be able to set this item if you have the Use the concurrent garbage collector (Experimental) enabled in your project settings. This definition will be added to your .csproj:
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
This will set the following parameter to Mono:
if (!haveMonoGCParams) {
if (EnableSGenConcurrent)
environment.WriteLine ("MONO_GC_PARAMS=major=marksweep-conc");
else
environment.WriteLine ("MONO_GC_PARAMS=major=marksweep");
}
Source
However I believe only two options are available via this logic. Either marksweep or marksweep-conc.
Ok, this is driving me crazy.
I have a CA that needs to know the path of the INSTALLDIR to edit an XML file.
So, I set up a set property custom action that sets a property named RemoveAuthTypesNode to [INSTALLDIR]. Then I have a RemoveAuthTypesNode CA that is sequenced after SetConfigFolder (a set property that sets installdir to a system searched path) in the Install Execute Sequence, Deferred in System Context (doesn't work when just Deferred Exec either).
In the log I see that RemoveAuthTypesNode is set:
MSI (c) (D4:EC) [16:12:05:314]:
PROPERTY CHANGE: Adding
RemoveAuthTypesNode property. Its
value is 'C:\Program Files\Microsoft
SQL
Server\MSRS10.MSSQLSERVER\Reporting
Services\ReportServer\'.
The custom action errors:
Error 1720.There is a problem with
this Windows Installer package. A
script required for this install to
complete could not be run. Contact
your support personnel or package
vendor. Custom action
RemoveAuthTypesNode script error
-2146827864, Microsoft VBScript runtime error: Object required:
'objXMLDOMNode' Line 9, Column 1, MSI
(s) (78:EC) [16:12:23:916]: Product:
ASMI User Defined Reports -- Error
1720.There is a problem with this Windows Installer package. A script
required for this install to complete
could not be run. Contact your support
personnel or package vendor. Custom
action RemoveAuthTypesNode script
error -2146827864, Microsoft VBScript
runtime error: Object required:
'objXMLDOMNode' Line 9, Column 1,
This is failing because the path isn't correct so the XMLDom object never loads. I know this because if I hardcode the path everything works fine.
Also, when I search the log for CustomActionData I expected that it would be in there as being set.
Here is the code from the custom action. The msgbox is just for debugging. It is always displaying nothing.
strConfigFile = session.Property("CustomActionData") & "rsreportserver.config"
MsgBox session.Property("CustomActionData")
Set xDoc = CreateObject("Microsoft.XMLDOM")
xDoc.async = False
xDoc.Load(strConfigFile)
set objXMLDOMNode = xDoc.selectSingleNode("//Configuration/Authentication/AuthenticationTypes")
set objParentNode = objXMLDOMNode.parentNode
objParentNode.removeChild(objXMLDOMNode)
xDoc.save(strConfigFile)
Set xDoc = Nothing
What am I doing wrong? I'm sure it's something simple stupid. Help greatly appreciated.
The custom action that sets the property named for the vbscript custom action was setting a private property (not all upper case). So, the set property custom action had to be sequenced in the Execute sequence rather than the UI sequence. Once I made this change the correct data was being retrieved in the script.
It is expected if I have made a public property (all UPPER case) it would have work being in the UI sequence, however, I didn't test that theory.