Default Printers

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Default Printers

#1 Post by omni »

Roger,

Have a user with remote server, and data server. Added a 2nd remote server and all users default printer is win2pdf, but he says all other applications show the users proper default printer.
He says its our system...well, we have no method to assign printers and there is no difference in our application on that server.
Suggestion to him was to be sure the set up for all users is on that server to assign their local default as their default once they connect.

Any thoughts on this?

Fred
Omni

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Default Printers

#2 Post by omni »

Interesting.

The hardware person found a windows link explaining an issue with windows 2016 termnal server (unsure if 2018 is an issue) and he had to create a special batch file in order to have the users assigned the proper default printer. Apparently impacts some but not all applications. They explained it was 'older' applications, so guess alaska 2 is from their standpoint an old application.

Fred

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Default Printers

#3 Post by omni »

Back on same subject. They are now saying is our method for the assignment for default printers. I could not find where it originates, maybe in alaska, just unsure
Here is their comment.

" If the software vendor uses the GetDefaultPrinter Windows API instead of GetProfileString, it should fix the problem."

I have no idea how it is assigned in prchoice, other than the _usedefault.

Thanks for any information..ie it does it that way already then we will tell them so..

More info on this and what he says alaska/express is doing

However our software product had the issue still as described. On further research, the software had a routine that was using the GetProfileString API call. The returned information from API call was being used to determined the default printer. I believe this call is looking for values from HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows:Device: The values keys are different: Server 2012 R2 shows redirection to client printer, Server 2016 shows server printer. I believe this call is not functioning the same between Server 2012 R2 and 2016. I changed the call to now use the API GetDefaultPrinter and the software is functioning correctly on Server 2016. So I am closing this case. However, feel free to add any input. Thanks for great input - Cyorlano."

I did a search in alaska (all files) for the GetProfileString and it was found in multiple dll files. The GetDefaultPrinter was not.
So they may be right, so we would need to create a replacement for the _usedefault to work in any current windows server, or have each user assigned their default printer by user id. (thats scarry)

The users right now are just selecting their own printers, so not a huge issue. However we have some automated routines that run to the default printers.

thanks

fred

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Default Printers

#4 Post by omni »

This is apparently going to be an ongoing issue for all new servers.

If we connect to the server and do the standard query,
Wmic printer get name,default

The proper default printer is shown.

When you use alaska app, the default printer is not correct. Apparently just selects the last one on the printer list. Only on 2016 and above servers.

Only way I can come up with is a write around to do the command above (or similar), then save the real default printer and create a replacement for default with a default printer name for the user. Unless Alaska has a fix for it, or comes up with one.

See this as impacting all Alaska users with all the remote server now being used.

Fred
Omni

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Default Printers

#5 Post by omni »

Alaska is aware of this and is recommending the method to fix on the 2016 server. do not know if it impacts ones after 2016, but probably does. The fix though is temporary, and eventually the user loses their default printer.

We worked around it by using "wmic Printer Get Name,Default" to find the real default and assign to the user and replaced the default printer in Alaska with the named printer. Appears to work constantly.

Fred

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Default Printers

#6 Post by omni »

Alaska is aware of this and is recommending the method to fix on the 2016 server. do not know if it impacts ones after 2016, but probably does. The fix though is temporary, and eventually the user loses their default printer.

We worked around it by using "wmic Printer Get Name,Default" to find the real default and assign to the user and replaced the default printer in Alaska with the named printer. Appears to work constantly.

Fred

Post Reply