This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Deferred action password property?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Dec 16, 2009
03:30 PM
Deferred action password property?
Greetings All,
Is there a recommended way to pass a queried password to a deferred action via the customActionData property? I query a user's password during the UI portion of the install and then set it to a public property. It seems that it gets stripped out of the customActionData when it gets to the deferred action. I can see the customActionData property being set in the install log file but the property does not seem to make it all the way through. Either it is being stripped out because of a maximum length?
I am using the password to change a service to run under another user/password combination that is installed by a third party (non-windows installer).
I am using the standard customActionData parsing code from the installing oracle client whitepaper and can access all of the other properties but not the password ones.
Any ideas/suggestions would be greatly appreciated.
Thanks,
jesse
=============================
MsiGetProperty(hMSI, "CustomActionData", szCustomActionData, nLength);
listPaths = ListCreate(STRINGLIST);
if (StrGetTokens(listPaths, szCustomActionData, ";") == 0) then
nRetVal = ListGetFirstString(listPaths, szSourceDir);
nRetVal = ListGetNextString(listPaths, szProp1);
nRetVal = ListGetNextString(listPaths, szProp2);
nRetVal = ListGetNextString(listPaths, szInstallDir);
nRetVal = ListGetNextString(listPaths, szImportFile);
nRetVal = ListGetNextString(listPaths, szPassword);
nRetVal = ListGetNextString(listPaths, szVerifyPassword);
SprintfMsiLog("deferred action: Obtained customActionData -> srcdir: %s -> szProp1: %s -> importFile: %s :passwd->%s verifyPasswd->%s", szSourceDir, szProp1, szImportFile, szPassword, szVerifyPassword);
else
MessageBox("Failed to obtain properties in installer. Please see your vendor for further assistance.", 0);
return ERROR_INSTALL_FAILURE;
endif;
=============================
Is there a recommended way to pass a queried password to a deferred action via the customActionData property? I query a user's password during the UI portion of the install and then set it to a public property. It seems that it gets stripped out of the customActionData when it gets to the deferred action. I can see the customActionData property being set in the install log file but the property does not seem to make it all the way through. Either it is being stripped out because of a maximum length?
I am using the password to change a service to run under another user/password combination that is installed by a third party (non-windows installer).
I am using the standard customActionData parsing code from the installing oracle client whitepaper and can access all of the other properties but not the password ones.
Any ideas/suggestions would be greatly appreciated.
Thanks,
jesse
=============================
MsiGetProperty(hMSI, "CustomActionData", szCustomActionData, nLength);
listPaths = ListCreate(STRINGLIST);
if (StrGetTokens(listPaths, szCustomActionData, ";") == 0) then
nRetVal = ListGetFirstString(listPaths, szSourceDir);
nRetVal = ListGetNextString(listPaths, szProp1);
nRetVal = ListGetNextString(listPaths, szProp2);
nRetVal = ListGetNextString(listPaths, szInstallDir);
nRetVal = ListGetNextString(listPaths, szImportFile);
nRetVal = ListGetNextString(listPaths, szPassword);
nRetVal = ListGetNextString(listPaths, szVerifyPassword);
SprintfMsiLog("deferred action: Obtained customActionData -> srcdir: %s -> szProp1: %s -> importFile: %s :passwd->%s verifyPasswd->%s", szSourceDir, szProp1, szImportFile, szPassword, szVerifyPassword);
else
MessageBox("Failed to obtain properties in installer. Please see your vendor for further assistance.", 0);
return ERROR_INSTALL_FAILURE;
endif;
=============================
(5) Replies
‎Dec 17, 2009
02:44 AM
Are you running your setup on Vista or Windows 7?
If that's the case, you need to append the name of your property to the property called "SecureCustomProperties", so that it gets transferred properly from the UI sequence to the Execute Sequence, unless your setup is running with elevated privileges.
More info on http://www.installsite.org/pages/en/msi/articles/VistaMSI/index.htm
If that's the case, you need to append the name of your property to the property called "SecureCustomProperties", so that it gets transferred properly from the UI sequence to the Execute Sequence, unless your setup is running with elevated privileges.
More info on http://www.installsite.org/pages/en/msi/articles/VistaMSI/index.htm
‎Dec 17, 2009
08:46 AM
Thank you for your reply. The issue is on Windows Server 2003 and the SecureCustomProperties property does exist and the password property is included within it along with another property which does get properly propagated to the deferred custom action.
Any other ideas?
Thanks again,
Jesse
Any other ideas?
Thanks again,
Jesse
‎Dec 17, 2009
10:00 AM
Vijay__K wrote:
Hi,
I may have missed something here, but have you set the customActionProperty (Password) to the function that requires it?
Regards,
Vijay.
Hello,
Yes i set it as part of the same setproperty action which forwards srcdir, importfilename and a host of other properties. The only difference is that the Password property is being queried in a dialog with Password=true. Should it also be an Indirect Property?
I am at a loss.
Thanks,
Jesse
‎Dec 18, 2009
03:08 AM
You mentioned this code:
Have you tried to see which error code MsiGetProperty returns?
Regards
MsiGetProperty(hMSI, "CustomActionData", szCustomActionData, nLength);
Have you tried to see which error code MsiGetProperty returns?
nErrorCode = MsiGetProperty(hMSI, "CustomActionData", szCustomActionData, nLength);
- What is the value of nLength before and after the call?
- Is nErrorCode equal to ERROR_MORE_DATA by any mean?
- Alternatively, have you checked that your password property is not reset by another function/dialog/action in the logfile?
Regards