Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy to a printer will not work in Win2K
Message
De
26/03/2002 02:17:31
 
 
À
23/03/2002 23:46:10
Bill Dodd
Database Systems
Lancing, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00636559
Message ID:
00637114
Vues:
20
>My old FoxPro application spools to a printfile and then allows the user to send this to a network printer using in effect:-
>
>RUN /20 "COPY PRINT.PRN \\ABC03\REPORTS"
>
>Using a NT v4 sp5 network. The source code is interpretive not compiled
>
>Works beutifully in all flavours of operating system but Win2K. Where it gives a path not found. The command works in raw MSDOS. Any ideas?

COPY is an internal OS command; try changing to using XCOPY which is an actual executable program that can be found searching the DOS/Windows path, or prefix the command to explicitly start a new CLI (Command Line Interpreter, under DOS, a new instance of COMMAND.COM within the conventional memory space; under various Windows flavors, starting a new CLI may actually launch a new process, and under NT family OSes, by default will try to start an instance of CMD.EXE rather than COMMAND.COM, which behaves a bit differently than the DOS/Win9x COMMAND.COM):

RUN /20 "COMMAND /C COPY /B PRINT.PRN \\ABC03\REPORTS"

BTW, adding the /B tells the CLI to perform a binary copy - COPY will stop prematurely if certain non-ASCII characters are encountered in the print stream, and some non-printing ASCII characters are reinterpreted during a text-mode copy.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform