Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Registry (Printer)
Message
From
15/09/1999 15:51:24
 
 
To
15/09/1999 13:27:53
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00265090
Message ID:
00265166
Views:
18
>Greetings,
>
>I have an application in VFP 6.0 that gets a list of all the printers from the registry. This uses the Registry.Vcx that ships with VFP 6.0. I then present all the printers in a list box for the user to select. After the user selects the desired printer, I then write the selection back to the registry and also write the selection to the device key in the win.ini file (About the 4th line down).
>
>When I do this, MS Mail encounters a problem. It says there is a printer problem. When I check the registry and the win.ini files, everything has been changed as the user selected. If I go into "Start", "Settings", "Printers" and select any printer and set it to default, then the MS Mail works OK.
>
>I was able to trace the MS Mail error back to the changing of the Win.ini file. If I don't do this, MS Mail works fine, but it wants to send the printout to the old default printer, not the printer changed via the application.
>

You might want to investigate the DEFPRINT.ZIP utility I mentioned a few days ago from www.ntfaq.com; it is a utility that will correctly assign the default printer for Windows that works from the command line, and the C code for it would provide a correct template for performing the necessary manipulations for you.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform