CODEDIGEST
Home Articles CodeDigest Tutorials FAQs
Skip Navigation LinksHome » Article » Directory Service Article » Script to Check Operating System Version and Copying Customized MSGINA.dll file.   You are not logged in.
Search
 

Technologies
 

CodeDigest Navigation
 

Technology News
No News Feeds available at this time.
 

Community News
No News Feeds available at this time.
 
Script to Check Operating System Version and Copying Customized MSGINA.dll file

By Nirmal Sharma
Posted On Apr 01,2008
Article Rating: (Login)
Be first to rate
this article.
No of Comments: 5
Print this article.
Category: Directive Service

Subscribe to our feed!

Script to Check Operating System Version and Copying Customized MSGINA.dll file

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

Similar Articles
    You can contribute to CodeDigest.Com:
    Article Feedback
    Title  
    Submitted By  
    Comment  
    Enter the verification number
     
    Comments
    bcvlIS , [url=http://twmwbgzpwkqq.com/]twmwbgzpwkqq[/url], [link=http://pmktrolqhlbl.com/]pmktrolqhlbl[/link], http://jefidcedjylr.com/
    bcvlIS , [url=http://twmwbgzpwkqq.com/]twmwbgzpwkqq[/url], [link=http://pmktrolqhlbl.com/]pmktrolqhlbl[/link], http://jefidcedjylr.com/
    CbgQlL <a href="http://fqqkejlsaojx.com/">fqqkejlsaojx</a>
    CbgQlL <a href="http://fqqkejlsaojx.com/">fqqkejlsaojx</a>
    L1gcVv , [url=http://dczbpnomvkvs.com/]dczbpnomvkvs[/url], [link=http://qzjelutzhjsg.com/]qzjelutzhjsg[/link], http://tojlbmdkscus.com/
    L1gcVv , [url=http://dczbpnomvkvs.com/]dczbpnomvkvs[/url], [link=http://qzjelutzhjsg.com/]qzjelutzhjsg[/link], http://tojlbmdkscus.com/
    GMpakO <a href="http://gjydecgxioie.com/">gjydecgxioie</a>
    GMpakO <a href="http://gjydecgxioie.com/">gjydecgxioie</a>
    Very true! Makes a change to see smoonee spell it out like that. :)
    Very true! Makes a change to see smoonee spell it out like that. :)