Checking Operating System Version and Copying Customized MSGINA.dll file.

Article translations Article translations
Article ID: 555988 - View products that this article applies to.
Author: Nirmal Sharma MVP
Expand all | Collapse all

SUMMARY

This article explains how you can use a small script in login script of GPO.

MORE INFORMATION

This script explains how you can use a small script in GPO Login Script to copy a customized MSGINA.dll for logon purpose to operating systems. Windows XP and Windows 2000 MSGINA.dll are different. Windows 2000 MSGINA.dll will not work on Windows XP and vice-versa.
 
  1. This script stores the reports in a central place (\\domain_name.com\netlogon\logon\MSGINAReport.csv. and report is saved as CSV so you can open it in Excel.
  2. MSGINA.dll file is copied as per the Operating System version. If its XP then MSGINA.dll for XP will be copied to client computer. If its Windows 2000 then MSGINA.dll for Windows 2000 will be copied to client computer.
  3. Ver.exe and hostname.exe are used to determine the Operating System version and Computer Name respectively.
 

***Start***

@Echo off
REM Reports will be saved in \\domain.com\netlogon\logon\MSGINAReport.csv

Echo Computer Name, Windows Version, Copied or Not ? >> \\domain.com\netlogon\logon\MSGINAReport.csv

SET Comp_name=
SET Win_Ver=
SET GinaCopied=

Hostname > host.txt
FOR /F "Tokens=1" %%a in (host.txt) DO Set Comp_name=%%a

VER > ver.txt
FOR /F "Tokens=*" %%a in (ver.txt) DO SET Win_Ver=%%a

Find /i "XP" < Ver.txt
if %ERRORLEVEL% == 0 (
     COPY "\\domain.com\netlogon\logon\msgina-xp.dll" "%WINDIR%\System32"
     IF %errorlevel% == 0 (
            SET GinaCopied=Yes
      ) ELSE (
            SET GinaCopied=No
      )
     CALL REGEDIT /S \\domain.com\netlogon\logon\logon-xp.REG
) ELSE (
     COPY "\\domain.com\netlogon\logon\msgina-2k.dll" "%WINDIR%\System32"
     IF %errorlevel% == 0 (
            SET GinaCopied=Yes
      ) ELSE (
            SET GinaCopied=No
      )
     CALL REGEDIT /S \\domain.com\netlogon\logon\logon-2k.REG
)

Echo %Comp_name%, %Win_Ver%, %GinaCopied% >> \\domain.com\netlogon\logon\MSGINAReport.csv

***End***
 

Properties

Article ID: 555988 - Last Review: September 20, 2007 - Revision: 1.0
APPLIES TO
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
Keywords: 
kbpubmvp kbpubtypecca kbhowto KB555988
COMMUNITY SOLUTIONS CONTENT DISCLAIMER
MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com