Log on script help needed please look at the BAT in side

FiLeZz

Diamond Member
Jun 16, 2000
4,778
47
91
here is the log in script.

cd "C:\Documents and Settings\%username%\Favorites\Printpack Links\IT Tools\your ip info"

IF EXIST ipconfig.bat GOTO BATFOUND

md "C:\Documents and Settings\%username%\Favorites\Printpack Links\IT Tools"
xcopy /y /s \\ppkfile1\ittools "C:\Documents and Settings\%username%\Favorites\Printpack Links\IT Tools"


:BATFOUND
ECHO BAT already detected >> LOG_OPT
GOTO end


:End
EXIT



Here is the problem I am having with the script.
I run it from the local box it works fine.
If I run it from the the loging script it re-copies the files every time.
This should only copy the files if they do not exist.
Can anyone help me.
This is on a 2000 domain, on 2000 workstations.
 

cipher00

Golden Member
Jan 29, 2001
1,295
0
76
Has %username% been resolved in the logging script?

(It's been a looooong time since I wrote major batchfiles :eek: )
 

Jzero

Lifer
Oct 10, 1999
18,834
1
0
You should use %USERPROFILE% as an alternative to C:\Documents and Settings\%username%\

I also recommend using the full path to ipconfig.bat when you search for it.

I'm not sure if these will solve your problems, though.
 

FiLeZz

Diamond Member
Jun 16, 2000
4,778
47
91
I also recommend using the full path to ipconfig.bat when you search for it.
Problem with this is-----> We never know who will be using the PC. Someone may share a PC with another user. the whole Idea was to put these few bat files under there favorites in IE.. These are small bat files to make trouble shooting connectivity problems easier for the helpdesk.

I guess I could copy the files to all users under favorites.. But the %username% works fine..