Page 1 of 1 1
Topic Options
#133273 - 2005-02-02 05:38 PM registry
Link Offline
Fresh Scripter

Registered: 2004-08-25
Posts: 6
Hello,
i need to get all entries in the registry for the following hive : HKCU\printers\connections and put it in a text file
Can you help me ?
The purpose is to list all printer (local and network) on the PC (NT4) with a kix script ...

Thanks a lot for your help

Christophe

Top
#133274 - 2005-02-02 05:47 PM Re: registry
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Just right-click and select "Export".
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#133275 - 2005-02-02 05:50 PM Re: registry
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Sorry... couldn't resist. What exactly from the reg do you want? Do you want the same as what "Export" would give you or do you want some sort of structured format? There are many posts discussing how printers are managed through INI files that would be much better that a raw dump.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#133276 - 2005-02-02 05:59 PM Re: registry
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Maybe you could do something with EnumValue

Below is a link to more information regarding the function

EnumValue

Aaron
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#133277 - 2005-02-02 06:00 PM Re: registry
Link Offline
Fresh Scripter

Registered: 2004-08-25
Posts: 6
No problem,
i just want to use a logon script that list all printer on NT4 PC when users open session.
This informations is in the "HKCU\printers\connections"
So if i can have the same as what "Export" would give me it is perfect. I can write an other vbs script to analyse a get all i need in this file after

Thanks !

Top
#133278 - 2005-02-02 06:12 PM Re: registry
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Quote:

I can write an other vbs script to analyse a get all i need




I must be missing something here. If you can do this with VB, why can't you do the registry read/export as well?

I take it you want the printer name, not ALL the data contained in those strings.

There are UDFs that will do this for you or allow you to easily get what you want.

Take a look here for sorted lists of UDF functions.

http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=126821&page=0&view=collapsed&sb=5&o=&fpart=1

Top
#133279 - 2005-02-03 09:07 AM Re: registry
Link Offline
Fresh Scripter

Registered: 2004-08-25
Posts: 6
Hello,
just because i can not use vbs script with Windows NT4 on the PC.
I just want to get all printer information from PC when user logon and put it automatically in a text file. One text file for each PC. After that i have all vbs script on my Windows XP PC to analyse files...
I know that not the best way but i have to wait for Windows XP on each PC of my network to make it easy

Thanks for your help !

Top
#133280 - 2005-02-03 09:14 AM Re: registry
Link Offline
Fresh Scripter

Registered: 2004-08-25
Posts: 6
Hello,
i have just tried on of the function from the "http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=126821&page=0&view=collapsed&sb=5&o=&fpart=1" web site called printerlist and it work perfectly !
In can use it to get all informations i need and put it in my text file ...
Thanks a lot for all your help
Best regards

Christophe

Top
#133281 - 2005-02-03 09:24 AM Re: registry
Link Offline
Fresh Scripter

Registered: 2004-08-25
Posts: 6
... i was happy too fast ...
i have done my test on my Windows XP and it work perfectly ... it is not the case on NT4 because the script use WMI ... and i can not use it on NT4

An other idea?

Top
#133282 - 2005-02-05 06:39 PM Re: registry
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Can you please refresh us as to what youre problem is? You've been told where in the registry to look, tou've been told that there are a couple of UDF to enumerate the registry, e.g. EnumValue, ArrayEnumKey, ArrayEnumValue, and you know how to script.

Get the printer list via ArrayEnumKey and the specific printer info via simple registry reads. And you can even do this via remote admin script using remote registry reads, thus no need to bloat a login script.
_________________________
There are two types of vessels, submarines and targets.

Top
#133283 - 2005-02-06 01:11 PM Re: registry
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Quote:

... i was happy too fast ...
i have done my test on my Windows XP and it work perfectly ... it is not the case on NT4 because the script use WMI ... and i can not use it on NT4

An other idea?





How about installing and configuring WMI on the NT4 wksta's?
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=AFE41F46-E213-4CBF-9C5B-FBF236E0E875
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

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
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.068 seconds in which 0.031 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