Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Matt on August 29, 2003, 04:29:15 AM
-
I really need some help I have never written a login script before and, am not really sure where to start. I have altered the default script in sme and got home drives to map but I also want is to map an ibay that I setup for a group of users and I need some help please. Can anyone either give me a sample script and or point me in the direction of a beginners website on writing login scripts.
I have already looked at various previous posts here, but have little knowledge of scripts so just got more confused, any simple advice would be great. Also I am not really sure what else a logon script is capable of doing so any info on that would be really great.
Thanks Matt
-
Matt,
Here is mine. Fairly straigth forward.
net use h: /home /persistent:no
net use p: \server\projects /persistent:no
net use s: \server\company /persistent:no
net use m: \server\management /persistent:no
net use x: \server\executive /persistent:no
net use r: \server\repository /persistent:no
net use u: \server\repository\html\uploads /persistent:no
net time \server /set /yes
net use z: /delete /y
Regards,
Greg
-
netlogon.bat will run on the client, so any win(dos) command will work. Open a dos-box on your Windows client and type 'help' or 'cmd /?' for info on the commands you can use.
The following system variables can also be quite useful in your script:
%username%
%computername%
%os%
%userdomain%
%time%
%date%
%logonserver%
%path%
For example:
if %os%=Windows_NT \myserver\netlogon\nt_logon.bat
will check if the client is an nt/2k/xp box and launch the nt_logon.bat file
Michiel
-
> if %os%=Windows_NT \myserver\netlogon\nt_logon.bat
Sorry, should be:
if %os%==Windows_NT \myserver\netlogon\nt_logon.bat
-
Sorry to barge in I am trying use your script but I only get my l drive mapped which is the users home directory. I only want one more drive mapped to an ibay which I have set to everyone group for access to read and write. I can map it through windows but the script does not map it.
Thanks for your help.
Aaron
-
1/ Which version of Windows are you running? Win9x/ME won't let you map to subdirectories of an ibay.
2/ Are you sure netlogon.bat is running? If not, you could add a test line to netlogon.bat, for example "time /T > c:\test.txt". This will create the file c:\test.txt if netlogon runs.
Normally, the following command should map my-ibay to K:
net use K: \myserver\my-ibay
Note the double backslash before the hostname. You should also be able to ping to the hostname.
Michiel