PDA

View Full Version : Reboot doesn't work anymore



ThomasP
10-01-2010, 01:34 AM
Hi,

we are working with a InstallScript setup which has the dialog box "SdFinishReboot" on its end. The setup was created with InstallShield 2010 Premier Edition.
For some weeks we have InstallShield 2011 Premier Edition. Now we have opened our setup with this one and built the setup.

If you choose the option "Yes, I want to restart my computer now" on the end of the setup, the restart of the system does not works. First a grey screen displays and after that we get a bluescreen with the message you can see in the attachment. It is not possible to start the operating system anymore.

We have tested this case with various OS like Windows Server 2003, 2008, 2008 R2 and Windows XP SP3. Only with Windows XP SP3 it was possible to do a reboot of the system and no bluescreen or error displays.


Thanks,

Thomas

joshstechnij
10-05-2010, 12:47 PM
InstallScript uses the ExitWindowsEx (http://msdn.microsoft.com/en-us/library/aa376868(VS.85).aspx) API to request a system reboot. The code related to reboots for InstallScript has not changed with IS 2011 compared to previous releases.

Based on the stop information in the screenshot, this would appear to be an issue with the network layer driver (ndis.sys) that is causing the crash, likely as a result of some other issue on the system. An analysis of the crash should be performed using guides such as "How to Debug Kernel Mode Blue Screen Crashes (for beginners) (http://blogs.technet.com/b/askcore/archive/2008/11/01/how-to-debug-kernel-mode-blue-screen-crashes-for-beginners.aspx)" to determine the most likely cause of the crash.

Since it is virtually impossible for a user mode application such as a setup to cause a full system crash (with the exception of security related bugs in the OS), the root cause of this issue is likely some change this setup is making to the system (possibly network related changes), such as a system registry entry. I would expect that a new test project that includes a default script that sets BATCH_INSTALL=TRUE to cause a reboot would not encounter this behavior (and in a quick test, this proved to be the case).

ThomasP
10-07-2010, 03:53 AM
We have tested the situation with various setup projects. The same setups which were built with Install Shield 2010 work fine. Only when I built the setup project with InstallShield 2011 a reboot of the system is impossible and the bluescreen displays.
So I think it should be a problem of InstallShield 2011, because when I built the setup with another InstallShield Version a reboot is possible and everything works fine.

joshstechnij
10-07-2010, 10:54 AM
What behavior occurs with a sample test project that includes a default setup.rul and sets BATCH_INSTALL=TRUE?

ThomasP
10-13-2010, 02:27 AM
I have found out what could be the cause of this problem. I use a function which writes with "RegDBSetKeyValueEx" to the registry. It inserts a list with the typ "REGDB_STRING_MULTI" into the registry. Before the list gets written to the registry, i add one entry to the end of the list (all other entries are there already). After the running of RegDBSetKeyValueEx function some items of the list are missing or incomplete and there are font letters at the end of the list. (chinese or japanese).

Could this be a problem with the new Unicode feature of InstallShield 2011?

joshstechnij
10-14-2010, 11:27 AM
Can you provide some sample code that demonstrates this issue with REGDB_STRING_MULTI value types? Specifically, assuming you are working with a string list, how is this list populated, changed, and then written back to the registry (since RegDBSetKeyValueEx doesn't work with LIST types)?

ThomasP
10-15-2010, 01:08 AM
Here is my sample code where i using the RegDB function:



lServiceGroupList = ListCreate(STRINGLIST);
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szStructure = "SYSTEM"^"CurrentControlSet"^"Control"^"ServiceGroupOrder";
szKey = "List";
szValue = szGroup;
nType = REGDB_STRING_MULTI;
nSize = -1;
nResult = RegDBGetKeyValueEx(szStructure, szKey, nType, szValue, nSize);
nResult = StrGetTokens(lServiceGroupList, szValue, "");

switch(szAction)
case "add":
if(ListFindString(lServiceGroupList, szGroup)!=0) then
nResult = ListAddString(lServiceGroupList, szGroup, AFTER);
szValue = "";
nResult = StrPutTokens(lServiceGroupList, szValue, "", TRUE);
szTemp = szValue;
nResult = CharReplace(szTemp, STRTOCHAR('\0'), STRTOCHAR('|'), 0);
nStringSize = StrLengthChars(szTemp);
szStructure = "SYSTEM"^"CurrentControlSet"^"Control"^"ServiceGroupOrder";
szKey = "List";
nType = REGDB_STRING_MULTI;
nResult = RegDBSetKeyValueEx(szStructure, szKey, nType, szValue, (nStringSize + 2));

joshstechnij
10-18-2010, 11:21 AM
This issue appears similar to another issue that was recently hotfixed that involved string manipulation through script when the string includes embedded null characters. Please try applying the hotfix from the following KB article, then rebuild and test your project again.
Q210954: HOTFIX: String manipulated by InstallScript function is corrupted (http://kb.flexerasoftware.com/selfservice/documentLink.do?externalID=Q210954)

Please let us know what your results are.

ThomasP
10-19-2010, 06:04 AM
This Hotfix resolved our problem!

Thank you,
Thomas

ThomasP
10-22-2010, 01:41 AM
Finally the hotfix has solved our first problem, but now we get another error when we use our function above, which contains "RegDBSetKeyValueEx".

Regards,
Thomas

joshstechnij
10-28-2010, 01:47 PM
Just calling RegDBGetKeyValueEx for the ServiceGroupOrder key and List value does not appear to have any issues in itself (we were not able to reproduce any abnormal behavior querying this key/value).

Do you see this error before modifying the registry value or only after?

ThomasP
11-08-2010, 09:36 AM
In my sample code i posted on site 2 which is called more than one time in my setup, the error happens on the following line:

nResult = RegDBGetKeyValueEx(szStructure, szKey, nType, szValue, nSize);


The function runs without any error the first two times when it was launched, only on the third time the error happened.

I'm sorry for the late answer!

Regards,
Thomas

ThomasP
11-18-2010, 09:41 AM
I've tested the setup 6 times. Only two times the error happens. What could this be? Any ideas?