Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restarting print spooler
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01154502
Message ID:
01154828
Views:
8
Sergey,

I used your code and it works like a charm. It even works nicely when Citrix is running.
Thanks!

Regards,

Ron Brahma

>
>oShell = CREATEOBJECT("Shell.Application")
>lcService = "Spooler"
>* Stop service
>IF oShell.IsServiceRunning(lcService)
>	oShell.ServiceStop(lcService,.F.)
>ENDIF
>* Start service
>IF NOT oShell.IsServiceRunning(lcService)
>	oShell.ServiceStart(lcService,.T.)
>ENDIF	
>
>
>>We are running a vfp com object to generate labels on a W2003 server. The server also has Citrix running. On this server we have Seagull printer drivers that are printing towards Zebra printers.
>>
>>Almost daily the prints come out up side down. The only way to fix this is to restart the print spooler on the server.
>>To get this problem under control I want to do the following on an hourly basis:
>>- check if any print queue has any print jobs (not only label printer queue's are present on the server, also to normal printers)
>>- if not, restart the print spooler
>>
>>The first I know how to do. The second, however, is something I need help on. What is the easiest way to do this (vbs, dotnet, vfp)?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform