Page 1 of 1 1
Topic Options
#130370 - 2004-11-30 06:56 PM Removing Novell Queues on Windows 2K Pro
Mike Pratt Offline
Fresh Scripter

Registered: 2003-10-17
Posts: 18
Loc: Maine
Hi,

I am doing some research on how to remove Novell print queues on Windows 2000 Pro PCs that we are migrating to an Active Directory environment. I have seen some posts from last year re: using the SendKeys() but cannot find any info when I do a board search. Can anyone give me a hand?

Thanks,
Mike

Top
#130371 - 2004-11-30 07:58 PM Re: Removing Novell Queues on Windows 2K Pro
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Been many, many years since I was on Novell, but I'm not sure what you mean by Novell print queues on the PC. I thought the print que was only on the Server.

Can you please provide a little more detail of the issue or clarify for me what/why a print que is on a local PC and not a Server. Is it just a terminology thing or is there in fact a print que on the local PC?

Top
#130372 - 2004-11-30 08:20 PM Re: Removing Novell Queues on Windows 2K Pro
Mike Pratt Offline
Fresh Scripter

Registered: 2003-10-17
Posts: 18
Loc: Maine
Thanks for the reply - sorry for the confusing terminology; what I meant was there are Novell network printers setup on Windows 2000 Pro client PCs that I need to delete during the migration to AD...so I'm looking for a way to script the deletion of those Novell printers on the PCs...

Thanks,
Mike

Top
#130373 - 2004-11-30 09:03 PM Re: Removing Novell Queues on Windows 2K Pro
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
I think Les wrote some script for that a long while back. He had to run off and go do something. Hopefully he will be back in a bit and perhaps he remembers the link for that posting.
Top
#130374 - 2004-11-30 09:06 PM Re: Removing Novell Queues on Windows 2K Pro
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2082
Loc: Tulsa, OK
You can try Jooel's DelPrinterConnections() UDF. This should remove all network printer connections if I recall correctly.
Top
#130375 - 2004-11-30 09:39 PM Re: Removing Novell Queues on Windows 2K Pro
Mike Pratt Offline
Fresh Scripter

Registered: 2003-10-17
Posts: 18
Loc: Maine
CitrixMan,

Thanks for the suggestion. This UDF is handy for deleting Windows Network Printers but not Novell. The Novell Printers are created in HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers and have ,, before each printer connection. Could I delete all of the printers in that key that began with ,,?

Thanks,
Mike

Top
#130376 - 2004-12-01 01:23 AM Re: Removing Novell Queues on Windows 2K Pro
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2082
Loc: Tulsa, OK
Shouldnt be a problem in theory. Made a couple of small modifications to the previously mentioned UDF to get this..Give it a try.

Code:

function DelNovellPrinterConnections()
dim $c,$bk,$conn
$c=0
$bk="HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers"
$conn=enumkey($bk,$c)
while @error=0
$c=$c+1
if left($conn,2)=",,"
$conn=delkey($bk+"\"+$conn)
endif
$conn=enumkey($bk,$c)
loop
endfunction



Also remember since these keys are located in HKLM, local admin priviledges may be required.

Top
#130377 - 2004-12-01 04:37 PM Re: Removing Novell Queues on Windows 2K Pro
Mike Pratt Offline
Fresh Scripter

Registered: 2003-10-17
Posts: 18
Loc: Maine
CitrixMan,

Great idea, but it didn't do anything when I ran the script...it didn't error out, but didn't delete any keys...

Thanks,
Mike

Top
#130378 - 2004-12-01 11:11 PM Re: Removing Novell Queues on Windows 2K Pro
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2082
Loc: Tulsa, OK
Sorry about that. Just assumed that you were familiar with Kix enough to know how to use a UDF. The function will not do anything until its called somewhere in the script. Check out the FAQ How to use UDFs for more info.

Code:

DelNovellPrinterConnections()

function DelNovellPrinterConnections()
dim $c,$bk,$conn
$c=0
$bk="HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers"
$conn=enumkey($bk,$c)
while @error=0
$c=$c+1
if left($conn,2)=",,"
$conn=delkey($bk+"\"+$conn)
endif
$conn=enumkey($bk,$c)
loop
endfunction


Top
Page 1 of 1 1


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

Who's Online
0 registered and 158 anonymous users online.
Newest Members
Jodey, Hiker, GTRoberts, KatieQuinn, Brennnnn
17684 Registered Users

Generated in 0.036 seconds in which 0.013 seconds were spent on a total of 12 queries. Zlib compression enabled.

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