Page 1 of 2 12>
Topic Options
#59901 - 2001-10-18 04:56 PM Deleting all printer definitions
Anonymous
Unregistered


Is there a solution to delete all printer definitions on a client. Deleting also automatically created Citrix (local) printers? If a user logs in on different workstations, all local printers will be "attached" to that users profile.
Top
#59902 - 2001-10-19 12:27 AM Re: Deleting all printer definitions
Grant Getz Offline
Fresh Scripter

Registered: 2001-09-07
Posts: 20
Loc: Arizona State University
we use:

; delete all printers
$returncode=delprinterconnection ("")

_________________________
- R. Grant Getz
University Technology Office
Customer Care / Common Computing
Arizona State University
Tempe, AZ 85287-0101

Top
#59903 - 2002-12-10 09:04 PM Re: Deleting all printer definitions
BDM Offline
Fresh Scripter

Registered: 2001-11-05
Posts: 28
Is this suppose to work with XP to? I can't get it to work. [Confused]
Kixtart ver. 4.12
OS XP Pro SP1

Top
#59904 - 2002-12-10 09:08 PM Re: Deleting all printer definitions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
bdm, does not work at all or does not work on local printers?

if not at all, try it with:
http://www.scriptlogic.com/kixtart/FunctionLibrary_ViewFunction.aspx?ID=DelPrinterConnections
_________________________
!

download KiXnet

Top
#59905 - 2002-12-10 09:29 PM Re: Deleting all printer definitions
BDM Offline
Fresh Scripter

Registered: 2001-11-05
Posts: 28
It works if I specify a unc path for the printer, but the ("") to delete all does not work!!
Top
#59906 - 2002-12-10 09:31 PM Re: Deleting all printer definitions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, can you try with that delprinterconnections() I linked????
_________________________
!

download KiXnet

Top
#59907 - 2002-12-10 09:38 PM Re: Deleting all printer definitions
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I've tested delprinterconnection ("") on Win2k and it worked for me.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#59908 - 2002-12-10 09:58 PM Re: Deleting all printer definitions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
for me too, but haven't had any XP to test on.
_________________________
!

download KiXnet

Top
#59909 - 2002-12-10 10:52 PM Re: Deleting all printer definitions
BDM Offline
Fresh Scripter

Registered: 2001-11-05
Posts: 28
Get a script error with delprinterconnection()
Yeah I have tried it with 2K Pro and it works.

Any one else deleting all printer connections on XP Pro

Top
#59910 - 2002-12-10 11:05 PM Re: Deleting all printer definitions
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
What is the script error? Can you please post your script?
_________________________
There are two types of vessels, submarines and targets.

Top
#59911 - 2002-12-10 11:13 PM Re: Deleting all printer definitions
BDM Offline
Fresh Scripter

Registered: 2001-11-05
Posts: 28
using perlscript to test script

script just contains

delprinterconnection()
return

error is invalid parameter1!

delprinterconnection ("")
return

Does not work!!

delprinterconnection ("\\servername\sharename")
return

Works great!!

Top
#59912 - 2002-12-10 11:15 PM Re: Deleting all printer definitions
BDM Offline
Fresh Scripter

Registered: 2001-11-05
Posts: 28
Sorry made typo. Using Primalscript to test
Top
#59913 - 2002-12-10 11:18 PM Re: Deleting all printer definitions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
BDM, Did you try with the delprinterconnectionS I gave you link to previously?
_________________________
!

download KiXnet

Top
#59914 - 2002-12-10 11:27 PM Re: Deleting all printer definitions
BDM Offline
Fresh Scripter

Registered: 2001-11-05
Posts: 28
delprinterconnections is an invalid command
Don't see the link you are talking about??

Top
#59915 - 2002-12-10 11:30 PM Re: Deleting all printer definitions
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
It is a UDF and as such has to be downloaded.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#59916 - 2002-12-10 11:31 PM Re: Deleting all printer definitions
BDM Offline
Fresh Scripter

Registered: 2001-11-05
Posts: 28
AH!! But I see it now!!
Top
#59917 - 2002-12-10 11:39 PM Re: Deleting all printer definitions
BDM Offline
Fresh Scripter

Registered: 2001-11-05
Posts: 28
Yes that works!! Thanks for the help!!!
Top
#59918 - 2002-12-10 11:47 PM Re: Deleting all printer definitions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, do we have anyone else to test it on other OS than w2k?

it seems that I should re-post the UDF in here too...
_________________________
!

download KiXnet

Top
#59919 - 2002-12-10 11:56 PM Re: Deleting all printer definitions
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Windows XP (Sp-1)

Jooel's code works a treat.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#59920 - 2002-12-10 11:58 PM Re: Deleting all printer definitions
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kent yes... (shouldn't it?)

but, does the delprinterconnection("") only for w2k?
if so, could ask ruud if he has issued it.
_________________________
!

download KiXnet

Top
Page 1 of 2 12>


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

Who's Online
0 registered and 484 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.069 seconds in which 0.022 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