ShellExecute Eigenschaften ("properties")

  • Hallo Leute,

    habe Vista x86 und bei mir funktioniert

    [autoit]

    ShellExecute(@DesktopDir, "", "", "properties")

    [/autoit]

    nicht. In der Hilfe steht es funktioniert mit Dateien und Ordner. Bei mir funktioniert beides nicht. Folgender Fehler erscheint:

    [Blockierte Grafik: http://img85.imageshack.us/img85/3218/errorfehler.jpg]

    Hoffe ihr könnt mir helfen.

    Mit freundlichen Grüßen,
    BurakSZ

    2 Mal editiert, zuletzt von BurakSZ (7. Juli 2010 um 11:00)

  • Du führst @DesktopDir aus. Aber das ist doch kein Programm, sondern nur der Desktop-Pfad des CurrentUsers?

    Aber auch bei mir funktioniert es nicht, W7 32Bit

    Verstehe ich nicht, ich will doch nur die Eigenschaften des Ordners sehen? Und @DekstopDir (Wie der name schon sagt "Dir") ist doch ein Ordner, der wie jeder andere eigenschaften hat?

  • Gibt es da eine andere Möglichkeit die Eigenschaften eines Ordners bzw. einer Datei zu sehen? (Es soll dieses Eigenschaften wie bei Windows sein)

  • Bei Google / im Englischen Forum gibts keine Infos darüber, dass sowas funktionieren soll. Aber du kannst die einzelnen Daten auslesen.

    Jap daran habe ich auch schon gedacht. Nur ich will dass diese GENAU so sind wie als ob man rechter mausklick --> eigenschaften drückt. Also genau dasselbe fenster.

  • Wieso sehr schwer? Ein GUI mti ein paar Tabs, wenn nur die Infos gezeigt werden sollen, könenn manche Buttons weg, ...

    Egal, ich setz das ganze mal auf gelöst

  • Das hier funktioniert bei mir auf einem XP Pro.

    Spoiler anzeigen
    [autoit]


    _ShowFileProperties(@DesktopDir)

    [/autoit] [autoit][/autoit] [autoit]

    Func _ShowFileProperties($sFile, $sVerb = "properties", $hWnd = 0)
    ; function by Rasim
    ; http://www.autoitscript.com/forum/index.ph…ndpost&p=565547
    Local Const $SEE_MASK_INVOKEIDLIST = 0xC
    Local Const $SEE_MASK_NOCLOSEPROCESS = 0x40
    Local Const $SEE_MASK_FLAG_NO_UI = 0x400
    Local $PropBuff, $FileBuff, $SHELLEXECUTEINFO

    [/autoit] [autoit][/autoit] [autoit]

    $PropBuff = DllStructCreate("char[256]")
    DllStructSetData($PropBuff, 1, $sVerb)

    [/autoit] [autoit][/autoit] [autoit]

    $FileBuff = DllStructCreate("char[256]")
    DllStructSetData($FileBuff, 1, $sFile)

    [/autoit] [autoit][/autoit] [autoit]

    $SHELLEXECUTEINFO = DllStructCreate("int cbSize;long fMask;hwnd hWnd;ptr lpVerb;ptr lpFile;ptr lpParameters;ptr lpDirectory;" & _
    "int nShow;int hInstApp;ptr lpIDList;ptr lpClass;hwnd hkeyClass;int dwHotKey;hwnd hIcon;" & _
    "hwnd hProcess")

    [/autoit] [autoit][/autoit] [autoit]

    DllStructSetData($SHELLEXECUTEINFO, "cbSize", DllStructGetSize($SHELLEXECUTEINFO))
    DllStructSetData($SHELLEXECUTEINFO, "fMask", $SEE_MASK_INVOKEIDLIST)
    DllStructSetData($SHELLEXECUTEINFO, "hwnd", $hWnd)
    DllStructSetData($SHELLEXECUTEINFO, "lpVerb", DllStructGetPtr($PropBuff, 1))
    DllStructSetData($SHELLEXECUTEINFO, "lpFile", DllStructGetPtr($FileBuff, 1))

    [/autoit] [autoit][/autoit] [autoit]

    $aRet = DllCall("shell32.dll", "int", "ShellExecuteEx", "ptr", DllStructGetPtr($SHELLEXECUTEINFO))
    If $aRet[0] = 0 Then Return SetError(2, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    Return $aRet[0]
    EndFunc ;==>_ShowFileProperties

    [/autoit]