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.
�
- 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.
- 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.
- 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***
�