1. Tom McArdle
  2. PowerBuilder
  3. Monday, 1 July 2019 18:32 PM UTC

HI Guys

I am trying to use the printSetPrinter function.

 

I am able to run the code below that I got online. My issue is that the printSetPrinter  does not seem to

update the registry. Is there perhaps some sort of security setting that might be preventing that from Happening?

 

Thank You

Tom

//////////////////////////////////////////////////////////////

String ls_name, ls_driver, ls_port, ls_temp, is_registry_key, ls_default
Long ll_place
messagebox('ls_fullstring',ls_fullstring)


ll_place=pos (ls_fullstring, "~t")
ls_name=left(ls_fullstring, ll_place -1)
ls_temp=mid(ls_fullstring, ll_place +1)
ll_place=pos (ls_temp, "~t")
ls_driver=left(ls_temp, ll_place -1)
ls_port=mid(ls_temp, ll_place +1)
sle_1.text=ls_name
sle_2.text=ls_driver
sle_3.text=ls_port

 

//////////////////////////////////////////////

ls_setprn = '\\svr-dc1\Downstairs Xerox WorkCentre 7556 PCL6,winspool,Ne10:'

PrintSetPrinter (ls_setprn)

////////////////////////////////////

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 2 July 2019 17:25 PM UTC
  2. PowerBuilder
  3. # 1

Hi Tom;

   That command only updates your PB Application's "session" default printer and not the default printer recorded in the O/S. You would have to use your own RegistrySet() commands from your PB App to affect the O/S's printer default settings.

Regards ... Chris

Comment
  1. Tom McArdle
  2. Tuesday, 2 July 2019 17:43 PM UTC
Thanks so much Chris





  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.