[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

How to copy file in Novell login script?

Posted on 2004-10-28
11
Medium Priority
?
1,678 Views
Last Modified: 2012-06-27
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.
0
Comment
Question by:marciotf
  • 3
  • 2
  • 2
  • +3
11 Comments
 
LVL 35

Expert Comment

by:ShineOn
ID: 12438676
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
 
LVL 17

Assisted Solution

by:BudDurland
BudDurland earned 400 total points
ID: 12439537
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
 
LVL 34

Expert Comment

by:PsiCop
ID: 12439966
If you have ZENworks, you can use a ZEN object to do this. Easier to control/administrate,
0
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
LVL 8

Assisted Solution

by:waybadmojo
waybadmojo earned 400 total points
ID: 12441550
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
 
LVL 10

Expert Comment

by:DSPoole
ID: 12445283
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
 
LVL 35

Assisted Solution

by:ShineOn
ShineOn earned 800 total points
ID: 12445693
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
 
LVL 10

Expert Comment

by:DSPoole
ID: 12447545
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
 
LVL 1

Author Comment

by:marciotf
ID: 12447600
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
 
LVL 34

Expert Comment

by:PsiCop
ID: 12447665
marciotf - do you have ZENworks?
0
 
LVL 10

Accepted Solution

by:
DSPoole earned 400 total points
ID: 12447742
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
 
LVL 1

Author Comment

by:marciotf
ID: 12544165
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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In current releases of Windows 10, MS removed the ability to format a volume with ReFS. That feature is moved to Windows 10 Pro for Workstations. The requisite files exist in Pro, but functionality is locked and/or otherwise unavailable. A $125 upgr…
Organisation is organized in a pattern to flow the day to day business, every application and system is interdepended on each other and when very important “Exchange Server downtime” happened.
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses

608 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question