Sign in to follow this  

Open Files Properties via Commandline

Recommended Posts

brink668    14

Does anyone know how to open up this screen via command prompt or maybe through AutoIT?

 

For an old application I need to get to this window and modify a setting per each machine. This has to be done under the user profile and needs to be open via the desktop gui interface cannot be done silently.

 

Just trying to get to this window as fast as possible.

 

"Right Click" on Exe then click "Properties"

 

66Dg4k5.png

Share this post


Link to post
Share on other sites
zhangm    1,210

This Powershell function appears to accomplish what you've described.

 

function Show-Properties {
param(
[Parameter(ValueFromPipelineByPropertyName=$true)]
[Alias('LinkPath')]
[Alias('FileName')]

$Path
)
begin {
  $shell = New-Object -ComObject Shell.Application
}

process {
  $parent = Split-Path $Path
  $child = Split-Path $Path -Leaf

  $folder = $shell.NameSpace($parent)
  $file = $folder.ParseName($child)
  $file.InvokeVerb('Properties')
}
}

http://powershell.com/cs/media/p/7746.aspx

  • Like 1

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  

  • Recently Browsing   0 members

    No registered users viewing this page.