I've run into a strange problem.
My program is developped using Delphi7. On a client's computer, who is running Windows 7 64-bit, Printer.Printers.Count returns 0 even though there are multiple printers installed.
MS Word prints without problems and returns the correct list of printers.
Apparently, it used to work before on the same computer then stopped working at one point in the past.
There have been problems with the Spooler and network printers have been installed recently.
Of course it could cause the problem but it still doens't explain why Word sees the printers and Delphi doesn't.
Any ideas?
Thanks!
Edit: Running the program with elevated privileges solved the issue. The point goes to Martijn. Thanks!
This sounds a bit like you’re running the program under elevated privileges (i.e. as administrator), where no printers have been installed, because they’re all under the user’s regular account.
Or vice-versa (printers installed as admin not accessible for program running with limited account privileges).
So I think this belongs on http://superuser.com.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With