Page 1 of 1 1
Topic Options
#7966 - 2001-04-04 03:03 PM Posting for Fabian (and others)...
Anonymous
Unregistered


Hi there,

I have tried to run Fabians inventory script, but I can't figure out the persistent mapping part...

The original posting was: http://kixtart.org/board/Forum2/HTML/000989.html

The part that is not working for me is:
(I have added the \Persistant path, because now I can see the mappings, but not the network path...)

$RK="HKEY_CURRENT_USER\Network\Persistent"
$SKNR=0
$SK=ENUMKEY("$RK",$SKNR)
WHILE @ERROR=0
$VNR=0
$VNM=ENUMVALUE("$RK\$SK",$VNR)
WHILE @ERROR=0
$VD=READVALUE("$RK\$SK\","$VNM")
$VT=READTYPE("$RK\$SK\","$VNM")
IF $VNM="RemotePath"
$MNT=$SK+": "+$VD
WRITELINE(1,"| $MNT"+SUBSTR($FILL,2+LEN($MNT),78-LEN($MNT))+CHR(13)+CHR(10))
$LC=$LC+1
ENDIF
$VNR=$VNR+1
$VNM=ENUMVALUE("$RK\$SK\",$VNR)
LOOP
$SKNR=$SKNR+1
$SK=ENUMKEY("$RK",$SKNR)
LOOP


Maybe the above is not enough to solve the problem, but I think this is what I need...

Thanx in advance!
Grtx, Eric

------------------
A l l Y o u r K I X A r e B e l o n g T o U s ! ! !

Top
#7967 - 2001-04-05 06:15 AM Re: Posting for Fabian (and others)...
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Which windows / kixtart version you are running?
Greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#7968 - 2001-04-05 03:43 PM Re: Posting for Fabian (and others)...
Anonymous
Unregistered


Hi MCA,

I'm using 3.63
Here's an example from a report...

+-----------------------[ System & User Informationsheet ]---------------------+
| |
| User NT Account : ERIC
| User FullName : Eric
| User Domain : NTADAM.DOM
| User PrimaryGroup : Domain Admins
| System Name : AMS000020
| System IP Address: 196.107.67.206
| System MAC Address: 00:60:08:60:B9:07
| |
+--------------------------[ Persistent System Mounts ]------------------------+
| |
| D:
| E:
| I:
| H:
| V:
| |
| |
| |
| |
+---------------------------[ Installed Patches ]------------------------------+
| |
| Version McAfeeDat-files : 4131
| |
+------------------------------------------------------------------------------+
+-------------------------[ Installed Applications ]---------------------------+
| |
| 3Com NIC Diagnostics
| Adobe Acrobat 4.0
| DU Meter
| HP DeskJet 840C Series (Remove only)
| McAfee VirusScan v4.0.3 (Licensed)
| Microsoft IntelliPoint
| Microsoft Internet Explorer 5 en Internet-werkset
| Microsoft Office Professional
| Microsoft Outlook Express 5
| Microsoft Windows Media Player 6.4
| MultiView 2000
| Norton Ghost
| PartitionMagic 5.0
| Serials 2000 v6.0
| System Policy Editor
| TeamWARE Office 5.3
| USB-aanvulling op OSR2
| Van Dale woordenboeken verwijderen
| Visio
| WinZip
+------------------------------------------------------------------------------+
| Info for System AMS000020 and user Eric on 2001/04/04 at 12:56:33

Laters, Eric

------------------
A l l Y o u r K I X A r e B e l o n g T o U s ! ! !

Top
#7969 - 2001-04-05 08:04 PM Re: Posting for Fabian (and others)...
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We add some debug code to your script.
We find not directly an error.

code:

?"- 1-" $rk="HKEY_CURRENT_USER\Network\Persistent"
?"- 2-" $sknr=0
?"- 3-" $sk=ENUMKEY("$RK",$sknr)
?"- 4-" WHILE @error=0
?"- 5-" $vnr=0
?"- 6-" $vnm=ENUMVALUE("$RK\$SK",$vnr)
?"- 7-" WHILE @error=0
?"- 8-" $vd=READVALUE("$RK\$SK\","$VNM")
?"- 9-" $vt=READTYPE("$RK\$SK\","$VNM")
?"- 10-" IF $vnm="RemotePath"
?"- 11-" $mnt=$sk+": "+$vd
?"- 12-" WRITELINE(1,"| $MNT"+SUBSTR($fill,2+LEN($mnt),78-LEN($mnt))+CHR(13)+CHR(10))
?"- 13-" $lc=$lc+1
?"- 14-" ENDIF
?"- 15-" $vnr=$vnr+1
?"- 16-" $vnm=ENUMVALUE("$RK\$SK\",$vnr)
?"- 17-" LOOP
?"- 18-" $sknr=$sknr+1
?"- 19-" $sk=ENUMKEY("$RK",$sknr)
?"- 20-" LOOP

Our script for same duty (it may gives you an idea):

code:

; - drive-mappings 95 (persistent) -

$ikey="HKEY_CURRENT_USER\Network\Persistent" ; - 95 -
$x=""
$debug_mode="yes"
IF (existkey($ikey) = 0)
$completed="no"
$first=""
$x=$x+" HKCU.network.persistent[95]=("
$index=0
DO
$icode=ENUMKEY($ikey, $index)
IF (@error = 0)
IF ($debug_mode = "yes")
? $ikey+"\"+$icode
ENDIF
IF (len($icode) <> 0)
$x=$x+$first+"["+$icode+"=("
IF (existkey($ikey+"\"+$icode+"\"+"RemotePath") = 0)
$x=$x+"RemotePath='" +ReadValue($ikey+"\"+$icode, "RemotePath")+"', "
$x=$x+"UserName='" +ReadValue($ikey+"\"+$icode, "UserName")+"', "
$x=$x+"ConnectionType='"+ReadValue($ikey+"\"+$icode, "ConnectionType")+"'"
ENDIF
$first=")],"
;
ENDIF
ELSE
$completed="yes"
ENDIF
$index=$index+1
UNTIL ($completed = "yes")
IF ($first = "")
$x=$x+")"
ELSE
$x=$x+")])"
ENDIF
?
? "persistent connection: "+$x


Greetings.


BTW: we prepare before reading your reaction.
we will look to the script also.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#7970 - 2001-04-05 11:43 PM Re: Posting for Fabian (and others)...
Anonymous
Unregistered


MCA,

I've taken a quick look at home, but unfortunaly no luck...
I get the idea how the persistent drive mappings can be read from the registry, but can't get it to work...
The only thing that happens is that the script runs by at lightspeed and does nothing!

Maybe I can work it out tomorrow, thanx for giving me a new idea.

Grtx, Eric

Top
#7971 - 2001-04-05 11:48 PM Re: Posting for Fabian (and others)...
Anonymous
Unregistered


Hi there again...

I think I have to go to bed now!
I'm testing on a NT4 Server...

------------------
A l l Y o u r K I X A r e B e l o n g T o U s ! ! !

Top
#7972 - 2001-04-06 11:00 AM Re: Posting for Fabian (and others)...
Anonymous
Unregistered


MCA,

I've tested your script on a 95 machine, but your script returns (exactly) the same information as my posted script...

The output reads: Persistent mappings: d: e: f:

The thing I'm searching for is a return of: D: \\SERVER\SHARE
E: \\SERVER\SHARE
...

Is this possible anyway? Fabian seems to have a solution...

Grtx, Eric

------------------
A l l Y o u r K I X A r e B e l o n g T o U s ! ! !

Top
#7973 - 2001-04-16 06:38 AM Re: Posting for Fabian (and others)...
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

A new kixtart script creates a summary of your local drives (fixed,
cdrom, removable, subst) & network drives. You can find in on our
site and is calling mappings.kix.
The topic for description, example and other information is:

http://kixtart.org/board/Forum2/HTML/001537.html

Also you will find additional information about removing persistent and
recent drive mappings.

Greetings.

program: mappings.kix
site: http://home.wanandoo.nl/scripting

[This message has been edited by MCA (edited 17 April 2001).]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#7974 - 2001-04-17 01:06 AM Re: Posting for Fabian (and others)...
Anonymous
Unregistered


MCA,

Thanx, your are "tha man" of this week!
Grtx, Eric

------------------
A l l Y o u r K I X A r e B e l o n g T o U s ! ! !

[This message has been edited by SLM (edited 17 April 2001).]

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 293 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.052 seconds in which 0.023 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