cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lysemose
Level 4

Installing SQL 2008 Express sometimes fails because of pending reboot

SQL 2008 Express is installed silently as a prerequisite, but sometimes fails because of a pending reboot. The problem is that the error message is not very informative for the user.

Does anyone have an idea how to detect a pending reboot before installing the SQL 2008 Express prerequisite and inform the user to reboot before continuing?
Labels (1)
0 Kudos
(2) Replies
Mrunmayee
Level 5

You can check for the "PendingFileRenameOperations" under registry key"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager"

//Sample code
------------------------------------------------------------------------
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey="SYSTEM\\CurrentControlSet\\Control\\Session Manager";
nType=REGDB_STRING_MULTI;
szName="PendingFileRenameOperations";
if(RegDBGetKeyValueEx(szKey,szName,nType,szValue,nSize)!=0) then //registry not found
return FALSE; //no pending reboot
else
return true; //reboot required
endif;
------------------------------------------------------------------------
0 Kudos
shraga007
Level 2

How can i detect this? is there another way?
i am running few changed prerequisites and this is messing my installer.

please help! :confused:
0 Kudos