Reboot using MsiSetMode not finishing Install
Posted 16 August 2001 - 22:29
Posted 17 August 2001 - 09:46
Posted 17 August 2001 - 18:19
Posted 17 August 2001 - 19:25
Posted 10 October 2001 - 13:03
I have another problem with MsiSetMode function.
May be you know its solution
I wrote custom action
-----------------------------------------------
function RequestReboot(hMSI)
int iRes;
begin
iRes = MsiSetMode(hMSI,MSIRUNMODE_REBOOTATEND,TRUE);
if (iRes = ERROR_ACCESS_DENIED) then
MessageBox ("Access denied", INFORMATION);
endif;
if (iRes = ERROR_INVALID_HANDLE) then
MessageBox ("Invalid handle", INFORMATION);
endif;
if (iRes = ERROR_SUCCESS) then
MessageBox ("Request reboot is succesfull.", INFORMATION);
endif;
return ERROR_SUCCESS;
end;
-----------------------------------------------------------------------
I inserted it just before InstallFinalize action in the execute sequence.
When I set this CA as Immidiatly then it works good.
But, when I set this CA as Deferred then MsiSetMode returns ERROR_INVALID_HANDLE.
It seems like Installer handle is not active allready.
Any ideas ?
Than you in advance,
Regards.
Posted 23 October 2001 - 08:49
I don't know for sure, but I think that MsiSetMode doesn't allow these params in deferred custom actions, too. There is this sentence in MS docu:
"Functions that do not require a session handle can be accessed from a deferred custom action. " Other way round: Functions requiring a session handle cannot be used :-(
Posted 23 October 2001 - 13:40
It's seems that you are absolutely right.
Functions requiring a session handle cannot be used in the deferred custom actions.