Page 1 of 1 1
Topic Options
#214008 - 2021-08-18 02:59 PM AddPrinterConnection and DelPrinterConnection Syntax
Robdutoit Offline
Hey THIS is FUN
***

Registered: 2012-03-27
Posts: 363
Loc: London, England
 Code:
If AddPrinterConnection("\\vleerbeer\hp laserjet 4") = 0
   ? "Added printer connection...."
Endif

If DelPrinterConnection ("hplaser4") = 0

   ? "Deleted printer connection...."

Endif


I propose that DelPrinterConnection should have the same syntax as AddPrinterConnection, namely DelPrinterConnection ("\\vleerbeer\hp laserjet 4") = 0

Two Reasons:

Consistency between commands. I myself have made the mistake of forgetting that DelPrinterConnection must only be Printer Share Name and not \\ServerName\ShareName as seen in Adding a printer command. I think the two commands should be consistent as consistency makes it easy to use a system.

Same Printer Share Name Deletion. If you move an existing printer to a new Print Server and want to retain the same Printer Share Name, Kixtart provides no mechanism to remove hplaser4 just from old print server and not new print server as well.

I can't speak for other people, but I have many years ago moved to simple printer names such as Accounts Black Photocopier and Accounts Colour Photocopier. Therefore I want to retain these simple names when moving a printer from an obsolete print server to a new Server being rolled out.

So I would like to propose that the DelPrinterConnection Kixtart function be updated to achieve these two goals. Thank you.

Top
#214009 - 2021-08-19 05:17 PM Re: AddPrinterConnection and DelPrinterConnection Syntax [Re: Robdutoit]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
I never understood why it was different either. Regardless, I haven't given it a thought in few years once I wrote a wrapper UDF to make it all work seamlessly.

PrinterConnection -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=203840#Post203840

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1


Of note, I do have a newer version of PrinterConnection() and a ReplacePrinter() UDF that I never posted. Those are available if you PM me.

Top
#214010 - 2021-08-19 07:04 PM Re: AddPrinterConnection and DelPrinterConnection Syntax [Re: Allen]
Robdutoit Offline
Hey THIS is FUN
***

Registered: 2012-03-27
Posts: 363
Loc: London, England
What I have done with this particular issue is that I emailed all staff and asked them to simply delete the old printer from their login.

So I am actually sorted in that respect. But I am hoping that the developer will review the delprinterconnection syntax as I would imagine it is a very frequent request to "move" printer connections from one server to another whilst retaining same name.

Top
#214106 - 2022-04-28 06:40 PM Re: AddPrinterConnection and DelPrinterConnection Syntax [Re: Robdutoit]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
Hi Rob, the doc may not be clear on this, but for me, DelPrinterConnection works with either the printername, or \\server\sharename.
Top
#214110 - 2022-04-28 11:28 PM Re: AddPrinterConnection and DelPrinterConnection Syntax [Re: Ruud van Velsen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
If I recall from way back then, there were issues if you had spaces in the share name, or share and printer names were different. It's been several years since I've played with this command directly, but there's that "thing" in the back of my mind that there was an inconsistency.

I never used spaces in file or print shares - ever - so this was never really an issue for me or my clients.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#214113 - 2022-04-29 10:51 AM Re: AddPrinterConnection and DelPrinterConnection Syntax [Re: Glenn Barnas]
Robdutoit Offline
Hey THIS is FUN
***

Registered: 2012-03-27
Posts: 363
Loc: London, England
Oh, I will have to test that. I believe that the \\server\sharename has never worked for me when deleting a printer. It may be as Glenn says that the problem is actually an issue with spaces in printer names which would be the case for me as my names are Photocopier Black etc. I will test this out and confirm.
Top
#214115 - 2022-04-29 05:40 PM Re: AddPrinterConnection and DelPrinterConnection Syntax [Re: Robdutoit]
Robdutoit Offline
Hey THIS is FUN
***

Registered: 2012-03-27
Posts: 363
Loc: London, England
I have done a test of delprinterconnection using servername\sharename and it does actually work. As it was years ago, when I originally tried this, I am unable to say why it did not work in the past. It could have been a typo, issue with OS, the way I set the printer up etc.

So firstly, I will confirm that the delprinterconnection does work with \\server\sharename.

Secondly, what I would request is that the documentation be changed so that delprinterconnection is identical to addprinterconnection. I would propose that both show the example as \\server\sharename precisely because very often people want to move a printer from one server to another without renaming the printer sharename. So it makes sense for the documentation to show the example as \\server\sharename.

Also the current documentation confuses as the addprinterconnection is talking about sharename and the delprinterconnection is talking about printer name - the sharename and the printer name are not always the same.

This may have been the cause of the problem years ago if people were trying to use \\servername\printername instead of \\servername\sharename when deleting a printer. I have a feeling that this may have been the reason why I never got it to work in the past as originally my printer share name and printer names were different.

Currently my printer/share names are 2 or three words such as client photocopier black or client photocopier colour so the spaces is definitely not the issue.

Top
#214119 - 2022-04-29 08:32 PM Re: AddPrinterConnection and DelPrinterConnection Syntax [Re: Robdutoit]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
Meanwhile, I'll continue to use the PrinterConnection UDF.

In all seriousness, I seem to remember Les... who hasn't been on here in ages, preaching that the share name and the printer name should always be the same.

Top
#214121 - 2022-04-30 05:00 PM Re: AddPrinterConnection and DelPrinterConnection Syntax [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Share Name = Printer Name is a good practice. It's not a Kix issue - using other methods will often fail if they are different.
_________________________
Actually I am a Rocket Scientist! \:D

Top
#214159 - 2022-09-02 10:24 AM Re: AddPrinterConnection and DelPrinterConnection Syntax [Re: Glenn Barnas]
Varro18 Offline
Just in Town

Registered: 2022-07-20
Posts: 3
Loc: 美国
DELETED-SPAM
User has been banned.


Edited by Glenn Barnas (2022-09-02 02:55 PM)

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 405 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.137 seconds in which 0.104 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org