#94997 - 2002-10-30 10:19 PM
script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
I have a Win2K server and Win98 users. I need to copy one file over to their local hard drive.
So I created a little script.bat file
copy "\\server-pdc\netlogon\file.dat" "c:\windows"
Then I put in the user's profile script.bat
"Please wait while NT Script runs" something like that - and it freezes. I had an exit in the bat file and that did nothing either. Any ideas?
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
#94999 - 2002-10-30 10:48 PM
Re: script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
Now I have a stupid question. Does the user see a Z: drive to the pdc netlogon or does one have to be mapped?
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
#95002 - 2002-10-31 02:30 PM
Re: script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
I could learn alot if I had time to read the manual.
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
#95003 - 2002-10-31 02:43 PM
Re: script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
Test and added -
net use z: /delete net use z: //server/netlogon copy "z:\test.dat" "C:\windows" cls exit
this still hangs on Please wait While you NT login Script runs. You can go ahead and hit any key and it will go past that and copy the file. Just afraid I will have 250 users calling me with my screen just sits there ...... Oh well they might just have to live with that for a couple of days.
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
#95004 - 2002-10-31 02:50 PM
Re: script.bat Problem
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I thinkfor Win9x you should be using
copy %0\..\file c:\%windir%
BTW, how's your server migration going? [ 31. October 2002, 14:50: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#95007 - 2002-10-31 04:57 PM
Re: script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
Ok if I do this
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
#95008 - 2002-10-31 04:59 PM
Re: script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
whoops ... hit the wrong key
If I do this line %0\..grc.dat c:\windows\program files\norton antivirus
this will copy the grc file over to the local? Do I need quotes?
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
#95011 - 2002-10-31 05:30 PM
Re: script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
I am stumped now. Now no file is copying at login. Win98 Users NO KIX on profile screen in AD logon script is ologin.bat bat file is in \\pdc\netlogon
code:
@Echo off cls copy %0\..\grc.dat "C:\program files\norton antivirus" pause exit 0
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
#95012 - 2002-10-31 05:45 PM
Re: script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
Another test - User win98 to win2k server User Profile has ologin.bat as login script
File does not copy map a drive to the netlogon and run ologin from cmd line. Runs fine. Win98 users on Win2k servers - suck.
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
#95014 - 2002-10-31 05:58 PM
Re: script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
We have a PDC and a SDC. Am so new to win2k I thought all users would pull from the PDC. I even put the full path \\server\pdc\ologin.bat to test. As long as this is in their AD profile it should work. SHOULD is the magic word.
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
#95015 - 2002-10-31 07:07 PM
Re: script.bat Problem
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Kathy, please add some additional lines to your batch file like those below. We need to see what works and what doesn't. I am not sure if the %errorlevel% variable is available on Win9x.
code:
@Echo off cls echo %0\..\grc.dat "C:\program files\norton antivirus" copy %0\..\grc.dat "C:\program files\norton antivirus" echo error level = %errorlevel% pause exit 0
|
|
Top
|
|
|
|
#95016 - 2002-10-31 07:36 PM
Re: script.bat Problem
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
Put the lines in - logged in - flashes by and gets to the Wait while your logon script runs and just sits there. Counted to about 10 and then cancel. Not file copied.
Get to command line - run the bat file and it works.
_________________________
Stupid is forever - Ignorance can be fixed.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 774 anonymous users online.
|
|
|