Page 1 of 2 12>
Topic Options
#94997 - 2002-10-30 10:19 PM script.bat Problem
Kathy Offline
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
#94998 - 2002-10-30 10:22 PM Re: script.bat Problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
with win9x try this instead:
copy z:\file.dat c:\windows
_________________________
!

download KiXnet

Top
#94999 - 2002-10-30 10:48 PM Re: script.bat Problem
Kathy Offline
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
#95000 - 2002-10-30 10:55 PM Re: script.bat Problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
don't remember is there in faq about this...

win9x has z: mapped to netlogon share while logging on.

so if you try to delete the map or use it for other means, you are after trouble [Wink]

anyway, this way you can avoid lot of win9x problems with netlogon.

you can check it out by creating yourself a test batch with only:
dir z:
pause

inside it and you see it listing the netlogon drive.

cheers
_________________________
!

download KiXnet

Top
#95001 - 2002-10-30 11:07 PM Re: script.bat Problem
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
That is also documented in the KiXtart Manual.
_________________________
There are two types of vessels, submarines and targets.

Top
#95002 - 2002-10-31 02:30 PM Re: script.bat Problem
Kathy Offline
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 Offline
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 Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#95005 - 2002-10-31 03:26 PM Re: script.bat Problem
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
Definatly get rid of...

net use z: /delete
net use z: //server/netlogon

That may hose things up.

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#95006 - 2002-10-31 03:27 PM Re: script.bat Problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
rocco, may I correct?

it does not may, but surely is the reason for hang.
_________________________
!

download KiXnet

Top
#95007 - 2002-10-31 04:57 PM Re: script.bat Problem
Kathy Offline
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 Offline
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
#95009 - 2002-10-31 04:59 PM Re: script.bat Problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kathy, I like your attitude!

quote:
Oh well they might just have to live with that for a couple of days.
_________________________
!

download KiXnet

Top
#95010 - 2002-10-31 05:01 PM Re: script.bat Problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, what is %0\.. ?

if you are referencing the netlogon drive with win9x during logon, there is two ways:
%0\..\
or:
z:\
_________________________
!

download KiXnet

Top
#95011 - 2002-10-31 05:30 PM Re: script.bat Problem
Kathy Offline
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 Offline
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
#95013 - 2002-10-31 05:53 PM Re: script.bat Problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, do you have other servers handling the logon requests?
basically, all servers having netlogon share could have a copy of your files...

it just looks like there is other server which respons but does not have the files.
_________________________
!

download KiXnet

Top
#95014 - 2002-10-31 05:58 PM Re: script.bat Problem
Kathy Offline
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 Offline
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

_________________________
Home page: http://www.kixhelp.com/hb/

Top
#95016 - 2002-10-31 07:36 PM Re: script.bat Problem
Kathy Offline
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
Page 1 of 2 12>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2419 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.081 seconds in which 0.033 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org