Compatible Support Forums: logon script

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

logon script

#1 User is offline   Wehndee 

  • stranger
  • Group: Members
  • Posts: 11
  • Joined: 13-July 02

Posted 14 August 2002 - 10:38 PM

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)
0

#2 User is offline   clutch 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 3859
  • Joined: 29-March 00

Posted 14 August 2002 - 10:55 PM

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.
0

#3 User is offline   Wehndee 

  • stranger
  • Group: Members
  • Posts: 11
  • Joined: 13-July 02

Posted 15 August 2002 - 05:00 PM

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
0

#4 User is offline   clutch 

  • Carpal Tunnel
  • Group: Moderators
  • Posts: 3859
  • Joined: 29-March 00

Posted 17 August 2002 - 12:28 AM

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users