Darrell,

As promised last weekend. I'd be interested in your feedback.

Des

At 13:27 18/3/2001, you wrote:
>I'd be interested in a look at what you've done with your netlogon.bat
>so why don't you post back to the list.


-------------------------------------------------

@echo off
REM
REM Enhanced version by Des Dougan ([EMAIL PROTECTED]), March 2001.
REM
REM This enhanced "netlogon.bat" script uses "winset" (an MS
REM utility which is on the Win95 CD (not sure about 98 or ME). It
REM loads environment variables extracted by "putinenv".
REM "putinenv" is a freeware utility used to read samba system variables.
REM Note: it does not pull all the variables noted in its online help
REM presumably because samba does not support all the MS LAN Manager
REM variables this was written to extract.
REM
REM Note also that this apparently does not work on NT or Win 2000.
REM However, I haven't been able to test either of these.
REM
REM Set the temporarily-mapped directory containing the scripts.
Z:\
REM
REM Define the name of the server this batch file runs from as both a
REM local ("set") and global ("winset") environment variable. Server
REM name is in "\\servername" format.
set SERVER=\\sirocco
winset SERVER=\\sirocco
REM
REM Set the workstation time when clients logon to the domain.
net time %SERVER% /set /yes
REM
REM Map the user's home directory to drive h:
net use h: /home /yes
REM
REM Map the common shared directory tree to drive s:
net use s: %SERVER%\general /yes
REM
REM Run the putinenv utility to extract variables
REM Run "putinenv | more" for help
putinenv.exe L
REM
REM Set the USERNAME environment variable
winset USERNAME=%USERNAME%
REM
REM Set COMPUTERNAME if required
REM winset COMPUTERNAME=%COMPUTERNAME%
REM
REM Set shares based on who's logging in
if "%USERNAME%"=="DDOUGAN" net use p: %SERVER%\pdata /yes
REM
REM Set the directory back to C:\
C:\

-------------------------------------------------





Des

Reply via email to