Jump to content

Get Properties Window Of A File


 Share

Recommended Posts

Well, I need to get the windows properties window, like if you right-clicked on it, and clicked 'Properties' I want that window to come up, of a file like:

$File="C:\randomfile.txt"

ShellExecute("Iamproperties", $File)

Or is this a dll call? Thanks guys!

Edited by R6V2
Link to comment
Share on other sites

Like this?

Dim $sFile    = "boot.ini"
Dim $sFolder    = "c:\"

Dim $oShell  = ObjCreate("Shell.Application")

GetVerbs()


Func GetVerbs()
    Dim $sList = ""
    
    $oFolder            = $oShell.NameSpace($sFolder)
    $oFolderItem        = $oFolder.ParseName($sFile)
    $oFolderItemVerbs   = $oFolderItem.Verbs
    

    For $i = 0 To $oFolderItemVerbs.Count - 1
        $sList = $sList & $i & ": " & $oFolderItemVerbs.Item($i).Name & @LF
    Next
    
    MsgBox(0, "", $sList)
EndFunc
Link to comment
Share on other sites

Like this?

Dim $sFile    = "boot.ini"
Dim $sFolder    = "c:\"

Dim $oShell  = ObjCreate("Shell.Application")

GetVerbs()


Func GetVerbs()
    Dim $sList = ""
    
    $oFolder            = $oShell.NameSpace($sFolder)
    $oFolderItem        = $oFolder.ParseName($sFile)
    $oFolderItemVerbs   = $oFolderItem.Verbs
    

    For $i = 0 To $oFolderItemVerbs.Count - 1
        $sList = $sList & $i & ": " & $oFolderItemVerbs.Item($i).Name & @LF
    Next
    
    MsgBox(0, "", $sList)
EndFunc
No, but thank you, is what I mean, is I want the actual WINDOWS properties window to come up, like if you right-clicked on a file and clicked: Properties, if no one knows, I might have some luck looking on the internet for a exact viewer (displays exactly whats happening every second) But thanks for your help guys.
Link to comment
Share on other sites

Global Const $SHOP_FILEPATH = 0x00000002

$a = DllCall("shell32.dll","int","SHObjectProperties","hwnd",0,"dword",$SHOP_FILEPATH, _

"wstr","c:\windows\explorer.exe","wstr",0)

WinWait("explorer.exe Properties")

WinWaitClose("explorer.exe Properties")

edit: I use DLLExp to explorer shell32.dll.

Lar.

Edited by LarryDalooza

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

Yes! Thank you, but why exactly doesn't this work, (I didn't make this)

It should get the name, and the directory...and then use the properties window to show it.

$Pro = StringReplace(_GUICtrlListView_GetItemText($listView, $lvItems[1], 0), """", """""")
    DllCall("shell32.dll","int","SHObjectProperties","hwnd",0,"dword",0x00000002, _
"wstr",$Pro,"wstr",0)
Link to comment
Share on other sites

Looks like stringreplace is putting quotes in... No Quotes should go to this function ...

so msgbox the $Pro before the DLLCall .. to make sure there are no quotes going to Dllcall ... then delete the msgbox.

Lar.

It needs the directory too, it's just sending: Hijack This...hmmm....hmmm...! I'll figure it out, thanks though!

WOOT GOT IT! I needed: $Dir & $Pro :) go me! :)

Edited by R6V2
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...