Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Win2003 server + DC is detected as WINXP


1 reply to this topic

mosher

mosher
  • Full Members
  • 1 posts

Posted 20 March 2008 - 10:01

Hi,

I'm working with IS 2008.

I have a component data that I want to install only on WIN2003 OS.

I failed to install it on WIN2003 server with domain controller. SYSINFO.nISOSL is set to ISOSL_WINXP.

I didn't run into this problem when working with my previous IS version (10.5).

Any ideas why it was set to WINXP and how to resolve it properly?

Thanks

Edited by mosher, 20 March 2008 - 10:03.


MFCDeveloper

MFCDeveloper
  • Full Members
  • 2 posts

Posted 28 March 2008 - 18:18

Hello Mosher,

Here's what we wrote in a _GetSystemInfo() function that we call in the OnBegin() function of SetupRul.h

You will want to focus your attention on the code after the "else" statement.
I have put comments in to show how we overcame the mentioned InstallShield issue.

I hope it applies to your situation and is helpful to you.

CODE

// Since we write to the HKLM, make sure the user has either
// USER_ADMINISTRATOR or USER_POWERUSER privileges.  Otherwise abort.
if ((Is (USER_ADMINISTRATOR, szIsData) = FALSE) && (Is (USER_POWERUSER, szIsData) = FALSE)) then
         MessageBox("Installation requires ADMINSTRATIVE or POWER USER privileges.\nPlease login as ADMINISTRATOR or a user with POWER USER privileges.\n
                     This installation will terminate.", SEVERE);
         abort;

else

 // Get SysInfo: OS Info
 if (GetSystemInfo (OS, nvResult, svResult) < 0) then
  SprintfBox(SEVERE, "InstallShield Internal ERROR", "GetSystemInfo error %ld\n%s", nvResult, svResult);
  //abort;      
 else                      
  switch (nvResult)
         case IS_WINDOWSNT:
             if(SYSINFO.WINNT.bWinXP) then
              if(SYSINFO.bIsWow64 = TRUE) then
              SysInfo.szOSName = WINXP_x64_OSNAME;
              SysInfo.bOSIsx64 = TRUE;
             else                                
              SysInfo.szOSName = WINXP_OSNAME;
             endif;
             SysInfo.bOSIsSupported = TRUE;
        elseif(SYSINFO.WINNT.bWin2000) then
    SysInfo.szOSName = WIN2000_OSNAME;
   /*
      TO DO:   Fix InstallShield issue IOC-000046709
         Refer to http://support.installshield.com/kb/view.asp?articleid=Q112039
     
      Problem: The SYSINFO structure is not set properly on 64-bit Windows XP. It is set as follows:
   
      SYSINFO.WINNT.bWinXP is FALSE
      SYSINFO.WINNT.bWinServer2003 is TRUE
   
      This problem occurs because 64-bit Windows XP returns 5.2 as the Windows version number,
      which the InstallShield interprets as Windows 2003 Server.
       
     Solution: Rewrite the code segment with the // Fix... below to overcome this IS issue.
     
        if (SYSINFO.WINNT.bWinServer2003) then
         if ( SYSINFO.nOSProductType = VER_NT_WORKSTATION ) then
           SYSINFO.WINNT.bWinXP = TRUE;
           SYSINFO.nISOSL = ISOSL_WINXP;
        endif;
      endif;    
   */  
    // Fix for InstallShield issue IOC-000046709
            elseif(SYSINFO.WINNT.bWinServer2003) then
             // Temp IS bug fix (see comments above)
             if ( SYSINFO.nOSProductType = VER_NT_WORKSTATION ) then
         //SYSINFO.WINNT.bWinXP = TRUE;
         //SYSINFO.nISOSL = ISOSL_WINXP;
     if(SYSINFO.bIsWow64 = TRUE) then
               SysInfo.szOSName = WINXP_x64_OSNAME;
                SysInfo.bOSIsx64 = TRUE;
              else                                
               SysInfo.szOSName = WINXP_OSNAME;
              endif;
              SysInfo.bOSIsSupported = TRUE;
      else // SYSINFO.WINNT.bWinServer2003 = TRUE (really)
               if(SYSINFO.bIsWow64 = TRUE) then
               SysInfo.szOSName = WIN2K3_x64_OSNAME;
               SysInfo.bOSIsx64 = TRUE;
              else                                
               SysInfo.szOSName = WIN2K3_OSNAME;
              endif;
              SysInfo.bOSIsSupported = TRUE;
             endif; // end Fix for InstallShield issue IOC-000046709
    // Vista support
    elseif(SYSINFO.WINNT.bWinVista) then
             if ( SYSINFO.nOSProductType = VER_NT_WORKSTATION ) then
         //SYSINFO.WINNT.bVista = TRUE;
         //SYSINFO.nISOSL = ISOSL_WINVISTA;
     if(SYSINFO.bIsWow64 = TRUE) then
               SysInfo.szOSName = WINVISTA_x64_OSNAME;
                SysInfo.bOSIsx64 = TRUE;
              else                                
               SysInfo.szOSName = WINVISTA_OSNAME;
              endif;                      
              SysInfo.bOSIsSupported = TRUE;  
      else // Windows Server "Longhorn" = TRUE
               if(SYSINFO.bIsWow64 = TRUE) then
               SysInfo.szOSName = WINLONGHORN_x64_OSNAME;
               SysInfo.bOSIsx64 = TRUE;
              else                                
               SysInfo.szOSName = WINLONGHORN_OSNAME;
              endif;
             endif; // end Vista support                
             else
                SysInfo.szOSName = WINNT_OSNAME;
          endif;
       case IS_WINDOWS9X:
             GetSystemInfo (WINMINOR, nvResult, svResult);
              if (nvResult < 10) then
                 SysInfo.szOSName = WIN95_OSNAME;
             else
                SysInfo.szOSName = WIN98_OSNAME;
               endif;
  endswitch;                              
 endif;      
endif; // GetSysInfo: OS info