logon script

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.

Customization Tweaking 1789 This topic was started by ,


data/avatar/default/avatar21.webp

11 Posts
Location -
Joined 2002-07-13
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...
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)

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar19.webp

3857 Posts
Location -
Joined 2000-03-29
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.

data/avatar/default/avatar21.webp

11 Posts
Location -
Joined 2002-07-13
OP
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.

data/avatar/default/avatar19.webp

3857 Posts
Location -
Joined 2000-03-29
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.