emigrate migration tool part 2

Post new topic   Reply to topic

View previous topic View next topic Go down

emigrate migration tool part 2

Post  surreal on Thu Dec 03, 2009 2:09 pm

Thanks for all your help in the past. I have gotten pretty far with the program but have once again hit a point that is beyond my coding knowledge and looking for some assistance.

Here is the new code: Download
When you run it you will want to use the file – backup, option. That way it will place anything you select in a folder that you choose. This is best for testing.

The mapped drives and printers part is what I’m having trouble with. I have the code working to create an array that will export the information to a text file (c:\temp). What I would like to do is have it to where it would pop up a listview with each device the array gathered. Within that listview have a checkbox so the user can select what printers or mapped drives they want.

to run the mapped drives or printers script it is located with the toolbar (programs)

I did notice that maybe the problem with this is that the text file does not populate the array info tell you exit the program.

Thanks again, let me know if you have any questions.

d@ve

surreal

Posts: 11
Join date: 2009-10-26
Location: Denver, Colorado

View user profile

Back to top Go down

Re: emigrate migration tool part 2

Post  surreal on Tue Dec 15, 2009 9:12 pm

i have been playing with the below code, but it is not fully working and im not sure if checkboxes can be added to a GUICtrlList. any help will be great. thanks. this is a smaller program that i use for testing: download

Code:
;===Function For Mapped Drives=====================================================================
Func Drives()
    If GUICtrlRead($cnTarget) = '' Then
        MsgBox(16, "", 'Target machine must be entered')
    Else
        SplashTextOn($sTitle, "Transfering Mapped Drives", 165, 40, -1, -1, 2, "", 9)
        Local $masset = GUICtrlRead($cnTarget)
        DirCreate("c:\Temp\Drives")
        Local $mapLocation = "c:\Temp\Drives\Drives.txt"

        Local $mapFile = FileOpen($mapLocation, 10)
        For $i = 1 To 25
            $b = _HKCU_EnumKey("\\\" & $masset & "\Network", $i)
            $iProdm = 1
            For $j = 1 To $b[0][0]
                $iProdm *= $b[$j][2]
                If $b[$j][2] = 0 Then
                    $Path = _HKCU_Read("\\\" & $masset & "\\" & $b[$j][0] & "\Network\" & $b[$j][1], "RemotePath")
                    FileWriteLine($mapFile, $b[$j][1] & "," & $Path[1][1])
                EndIf
            Next
            If $iProdm <> 0 Then ExitLoop
        Next
        SplashOff()
        FileClose("c:\Temp\Drives\Drives.txt")
    EndIf

    GUICreate("Network Drives", 520, 125)
    $listview = GUICtrlCreateListView("", 10, 10, 495, 100)
    GUISetState()

    _GUICtrlListView_AddColumn($listview, "Drive Letter", 100)
    _GUICtrlListView_AddColumn($listview, "Mapped Path", 100)
    _GUICtrlListView_AddArray($listview, $Path)
EndFunc  ;==>Drives

surreal

Posts: 11
Join date: 2009-10-26
Location: Denver, Colorado

View user profile

Back to top Go down

View previous topic View next topic Back to top


Post new topic   Reply to topic
Permissions of this forum:
You cannot reply to topics in this forum