(imported topic written by SystemAdmin)
Hi.
Just a simple question.
Is it possible to “variabilize” a relevance in a task/action ?
This is the case:
I have to install an MSI with a task that asks me (with action parameter query) the full path and name of MSI (c:\temp\msi.msi) and a name of registry key (examplemsi)
That’s the action code:
//Prompts for msi to install action parameter query
"msi" with description
"Please enter the full path of the msi to install" with
default value
"e:\Swdist\Curr\OPEAccensioneBuoniRisparmio.msi"
//Prompts for displayname of msi to install action parameter query
"displayname" with description
"Please enter the displayname of the msi to install" with
default value
"OPEAccensioneBuoniRisparmio"
continue
if
{not exists key whose (value
"displayname" of it as string = parameter
"displayname" of action of it and value
"uninstallstring" of it as string as lowercase contains
"msiexec") of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry
} wait
"{pathname of system folder & "\msiexec.exe
"}" /i
"{parameter "msi
" of action}" /qn /norestart
The install process write the reg key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and I would like to write the relevance in that task in the same way I control the reg key in the action script, such as
not exists key whose (value
"displayname" of it as string = (parameter
"displayname" of action) of it and value
"uninstallstring" of it as string as lowercase contains
"msiexec") of key
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry
Yes I know, the relevance will be evaluated only when action is issued because the action parameters are entered only in that moment … but, do you think is it possible to realize it ?
Thanks