Tuesday, August 30, 2011

logon script

@echo off
cls
REM #############################################################
NET TIME /DOMAIN /SET /Y
echo User: %username%=20
echo Computer: %computername%=20
date /T
time /T

REM Creates a Folder on the server based on the *username*
if not exist \\*server*\Users\%username% mkdir \\*server*\Users\%username%
REM copies a BAT file to the local PC which allows users to simple do
"start -> run -> ip" and displays there ip address in a dos window.

XCOPY \\*server*\NETLOGON\Logon_Software\ip.bat %systemroot%\system32 /y /i
BAT CMD for creating a share on the system:
net share Data="S:\Data" /remark:"Share on Server"

No comments:

Post a Comment