Open Files Properties via Commandline


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is now closed to further replies.