Jump to content
Compatible Support Forums
Sign in to follow this  
Wehndee

logon script

Recommended Posts

I have never written a logon script before but I got to write a logon script for download font from the server to the local(other) computer. so what should I do ?I know how to put it on, but I can't fight it out how to write the script... smile

is this line right ?

REM copy drive:/file/file/file.file(drive in the server) drive:/file/file.file(drive in the local or user's computer)

Share this post


Link to post

Here's a snip from mine:

 

if %COMPUTERNAME%!==SERVER2! GOTO END

net time /DOMAIN:asysttech.com /set /y

if %COMPUTERNAME%!==SERVER3! GOTO END

if %COMPUTERNAME%!==SERVER4! GOTO END

 

copy \\server2\netlogon\producti.* c:\qadcli

copy \\server2\netlogon\progress.* c:\qadcli

 

You would be looking at the portion starting with "copy" for you file deployment. I keep a few files for our ERP system on there in case I have to modify them, that way if I do I can just have the users logoff and then log back on again. There are only 3 or 4 files on there, and I can just REM the statements when everyone is setup to alleviate any extra logon traffic issues. Make sure that the user has the proper permissions to copy the files to the client machine, or you will simple get errors as the script runs.

Share this post


Link to post

Okay! Thanks..I will make sure the user has the proper permissions to copy the files. but what happen if the user already download the file, and when they next login, will they download the file again? if yes, how do you aviod that ? coz I have a very slow network and i don't what to floods the network either. laugh

Share this post


Link to post

Yes, it will copy the file right over it again. You could also try an IF EXIST... statement to see if the file is already there, and if it is then to skip it. I think (trying to remember here) it would be something like this:

 

if %COMPUTERNAME%!==SERVER2! GOTO END

net time /DOMAIN:asysttech.com /set /y

if %COMPUTERNAME%!==SERVER3! GOTO END

if %COMPUTERNAME%!==SERVER4! GOTO END

 

IF EXIST c:\qadcli\producti.pf GOTO PROG

copy \\server2\netlogon\producti.* c:\qadcli

 

:PROG

IF EXIST c:\qadcli\progress.svg GOTO END

copy \\server2\netlogon\progress.* c:\qadcli

 

:END

 

I'm quite rusty at this, so if someone wants to clarify/correct a screw up on it have at it but I think that it's correct.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×