The below loing.bat file is given to userlogin script GPMC
Login.bat
If Exist \\server\logons\%username%.txt Goto notlogon
Echo %username% logged in from %computername% > \\server\logons\%username%.txt
Echo %username% logged in from %computername% > \\server\logons\%computername%.txt
Goto end
:notlogon
Logoff
:end
The below logout.bat file is given to user logout script GPMC
Listing 2: Logout.bat
If Not Exist \\rafetpc\logons\%computername%.txt goto notlogon
Del \\server\logons\%username%.txt
Del \\server\logons\%computername%.txt
Goto end
:notlogon
Logoff
:end
No comments:
Post a Comment