Variable vom Typ Object nach compile Int32 in WinPE_SE

  • Hey,
    komischerweise funktioniert das Script nicht, wenn ich es in meiner WinPE_SE starte (x64). Dort wandelt er nämlich das Object $AList in den Typ Int32 (MsgBox(0, "Typ", VarGetType($AList))) um.
    Hat jemand ne Idee, warum das so ist? Oder liegt das daran, dass die Umgebung in der PE 64bit ist und die meines Desktops 32bit?

    [autoit]

    Global $AList = ObjCreate("System.Collections.ArrayList")
    MsgBox(0, "dfsf", "adad")
    For $i = 65 To 90 ; ASCII digits
    If Not FileExists(Chr($i) & ':\') Then
    MsgBox(0, "dfsf", VarGetType($AList))
    $AList.add(Chr($i) & ':')
    EndIf
    Next

    [/autoit]
  • ok das löst das Problem. Aber dann steh ich vor dem Problem davor, dass der map drive nicht funktioniert:

    [autoit]

    Global $letter = DriveMapAdd("*", "\\192.168.0.10\network_share", 0, "Administrator", "test")
    Switch @error
    Case 1
    MsgBox(0, "MapDrive", "Undefined / Other error. @extended set with Windows API return." & @extended)
    Case 2
    MsgBox(0, "MapDrive", "Access to the remote share was denied.")
    Case 3
    MsgBox(0, "MapDrive", "The device is already assigned.")
    Case 4
    MsgBox(0, "MapDrive", "Invalid device name.")
    Case 5
    MsgBox(0, "MapDrive", "Invalid remote share.")
    Case 6
    MsgBox(0, "MapDrive", "Invalid password.")
    EndSwitch

    [/autoit]

    Er landet dann immer bei Case 1.

    Ich hab das Programm als x86 kompiliert und wende es in einer x64 Umgebung an. Ich dachte zuerst es liegt daran, wie ich es kompiliere, da es mit x64 kompilieren funktioniert. Egal was ich mache immer Case 1 Fehler. Bug?