cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jesseD
Level 3

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;
=============================
Labels (1)
0 Kudos

(5) Replies
Reureu
Level 10

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
0 Kudos
jesseD
Level 3

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
0 Kudos
Vijay__K
Level 7

Hi,
I may have missed something here, but have you set the customActionProperty (Password) to the function that requires it?
Regards,
Vijay.
0 Kudos
jesseD
Level 3

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
0 Kudos
Reureu
Level 10

You mentioned this code:
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
0 Kudos