Solved

How to copy file in Novell login script?

Posted on 2004-10-28
1,635 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
Question by:marciotf
    11 Comments
     
    LVL 35

    Expert Comment

    by:ShineOn
    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
    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
    If you have ZENworks, you can use a ZEN object to do this. Easier to control/administrate,
    0
     
    LVL 8

    Assisted Solution

    by:waybadmojo
    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
    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
    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
    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
    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
    marciotf - do you have ZENworks?
    0
     
    LVL 10

    Accepted Solution

    by:
    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
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    The Complete Ruby on Rails Developer Course

    Ruby on Rails is one of the most popular web development frameworks, and a useful tool used by both startups and more established companies to build strong graphic user interfaces, and responsive websites and apps.

    Read about why website design really matters in today's demanding market.
    Know what services you can and cannot, should and should not combine on your server.
    Want to pick and choose which updates you receive? Feel free to check out this quick video on how to manage your email notifications.
    This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.

    875 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now