Sign in to follow this  
Followers 0
gcue

displaying array values 1 msgbox at a time

4 posts in this topic

#1 ·  Posted (edited)

here is the array display of $b

http://www.postyourimage.com/view_image.ph...EaVMi1217861795

so im trying to display each instance of where there is a mapped drive (where column 2 = 0)

but it only displays the first instance

any ideas?

thanks!

#include <Array.au3>
#include "HKCUReg.au3"
                  
    $sComputer = "d0079214"
                  
    For $i = 1 To 100
         $b = _HKCU_EnumKey("\\\" & $sComputer & "\Network", $i)
            $iProd = 1
        For $j = 1 To $b[0][0]
            $iProd *= $b[$j][2]
        Next

    If $iProd <> 0 Then ExitLoop

;       _ArrayDisplay($b, $i)

    If $b[$i][2]=0 Then
    $path= _HKCU_Read("\\\" & $sComputer & "\Network\" & $b[$i][1], "RemotePath")
    MsgBox(0, "", "User: "  & $b[$i][0] & @CRLF & _
                          "Drive: " & $b[$i][1] & @CRLF & _
          "Path: " & $path)
    EndIf

                          
    Next
Edited by gcue

Share this post


Link to post
Share on other sites



any help would be appreciated =)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Isn't the test "If $iProd <> 0 Then ExitLoop" busting you out of your main loop before you've processed all 100?

Edited by Spiff59

Share this post


Link to post
Share on other sites

good point! it checks to see if there are values under that registry key.. hmm ill look into it further.

thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0