How to copy file in Novell login script?

Hi,
I want to know how do I copy a file from the Netware server to the workstation when the user logs in?
The server is Netware5 and the workstations Windows 98.
I know I can do a batch file for this and put something like @\\server\batch.bat in the user login script, but because the workstation is Win98 I cant close the dos prompt generated by the bat with the exit command, and the prompt keeps opened and the user has to close it manually.
Can I use the copy command directly in the Novell login script? I tried but didnt work.
LVL 1
marciotfAsked:
Who is Participating?
 
DSPooleCommented:
You don't have to do it to all machine - you can simply log into one of the machines and have the dialog box open on you.  Then you can edit it's settings on that machine.  Then you can copy that .PIF file to the SAME location on the server as the batch file and it will associate itself to that batch file.
0
 
ShineOnCommented:
If you map the drive, so the DOS copy command can understand where it's copying from, you should be able to do a DOS COPY command in-line in the login script, prefixing it with @ to keep the login script process going separate from the copy execution.

Why would the bat file not close?  Why would you need an exit command?  Do you have the DOS prompt PIF file set up to remain open after command completion or something?
0
 
BudDurlandCommented:
The COPY command is an internal DOS command -- part of the loaded copy of COMMAND.COM.  I suspect there would have to be some trickery to use it successfully from the Login script (something like #COMMAND /c COPY ....).

An easier way is probably to use XCOPY.  Since XCOPY is an external executable file, a simple

#XCOPY F:\FOLDER\FILE.TXT C:\FOLDER\FILE.TXT

in the login script should work, and should also close the DOS window when done.  If the window doesn't close, you may need to make an XCOPY.PIF, but I don't think you'll need it.  Been a long time since I've had to deal with Win98.

you might also be able to use NetWare's NCOPY as well; it has the benefit of understanding network names:

#NCOPY SERVER/VOLUME:\FOLDER\FILE.TXT C:\FOLDER\FILE.TXT

Hope this helps
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
PsiCopCommented:
If you have ZENworks, you can use a ZEN object to do this. Easier to control/administrate,
0
 
waybadmojoCommented:
In Windows 9x there is a file called command.pif in the WINDOWS or WINDOWS\PIF directory. If it is not there, find command.com, right-click and select Properties, then on the Program tab check Close on exit. Now there will be a command.pif file created. Copy/move it to WINDOWS or WINDOWS\PIF and the DOS box will auto-close on older Windows boxes.

Alternately, create a PIF file for the BAT file that you want to call from the script, this will achieve the same effect without setting this globally.

-Mojo
0
 
DSPooleCommented:
you can create a .PIF file for the batch file that closes upon completion and then save the .PIF file to the same location as the batch file on the server - that would easily do the trick.
0
 
ShineOnCommented:
I like Bud's idea of using xcopy or ncopy in-line in the login script.   I forgot about copy being part of command.com...  my bad.

The PIF file thing  (which I mentioned first, BTW) should be way too easy to fix, but is probably why the bat file is not closing on completion.  That was one of the annoyances of working with DOS-based Windows (which includes all of the Win9x family) that many folx don't remember any more because the NT-based Windows flavors don't behave the same way.
0
 
DSPooleCommented:
I think any command-line application called by the login script (such as XCOPY or NCOPY) will open the command processor (CMD.EXE) and leave it open...

one way to find out...
0
 
marciotfAuthor Commented:
Hi,
Yes, I had the same problem with ncopy and xcopy...
The problem here is that for me to do the .pif stuff I would have to do it manually in all the machines, and thats exactly what I cant afford to do, because there are a lot of it.
isnt there any other way?
0
 
PsiCopCommented:
marciotf - do you have ZENworks?
0
 
marciotfAuthor Commented:
Hi,
Although I chose DSPoole's answer as the more complete answer, I gave more points to ShineOn because he was the first one to talk about the PIF file, in the first answer.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.