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

Reboot doesn't work anymore

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
Labels (1)
0 Kudos
(12) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

InstallScript uses the ExitWindowsEx 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)" 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).
0 Kudos
ThomasP
Level 3

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.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

What behavior occurs with a sample test project that includes a default setup.rul and sets BATCH_INSTALL=TRUE?
0 Kudos
ThomasP
Level 3

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?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

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)?
0 Kudos
ThomasP
Level 3

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));
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

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

Please let us know what your results are.
0 Kudos
ThomasP
Level 3

This Hotfix resolved our problem!

Thank you,
Thomas
0 Kudos
ThomasP
Level 3

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

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

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

I've tested the setup 6 times. Only two times the error happens. What could this be? Any ideas?
0 Kudos