![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Which applications does get-command detect? I've been playing around a little with get-command to figure out which "Applications" it detects if you give it a command like: get-command * -commandType Application | more It displays a ton of stuff under C:\Windows. The only other thing that is displayed on my main machine are SQL Server 2005 files or Visual Studio 2005 files. Nothing else. No Office apps, for example. If you run the following commands do you see any applications other than those from SQL Server 2005 or Visual Studio 2005? get-command *.exe | where-object {$_.Definition -notmatch "Windows"} | more Or to be more comprehensive get-command *.exe,*.dll | where-object {$_.Definition -notmatch "Windows"} | more Just curious. Andrew Watt MVP |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Which applications does get-command detect? Hi Andrew, > I've been playing around a little with get-command to figure out which > "Applications" it detects if you give it a command like: > > get-command * -commandType Application | more > > It displays a ton of stuff under C:\Windows. The only other thing that > is displayed on my main machine are SQL Server 2005 files or Visual > Studio 2005 files. Nothing else. No Office apps, for example. But it displays word documents etc, too - if they are in an application search path. So I guess gcm displays all file types with a shell execution handler (<- not sure if that's the right name). In other words: gcm lists everything you can "start" in PS. If you copy a word document to the windows directory, you can "start" this document by typing PS> .\Document.doc That's because word documents can be opened by means of "ShellExecute". If you now type PS> get-command *.doc -commandType Application | more it should display the document.doc. But I'm just guessing... cu Max |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Which applications does get-command detect? Hi again, > If you copy a word > document to the windows directory, you can "start" this document by typing > > PS> .\Document.doc Sorry, that's a bad example ;-) You can actually open the document by just typing PS> Document.doc regardless of the current directory. cu |
My System Specs![]() |
| | #4 (permalink) |
| Guest | RE: Which applications does get-command detect? Hello Andrew, > It displays a ton of stuff under C:\Windows. The only other thing that > is displayed on my main machine are SQL Server 2005 files or Visual > Studio 2005 files. Nothing else. No Office apps, for example. Another issue might be, that the search method is obviously quite different from the "Start button / Run command" box. For example, I type in IEXPLORE, which opens the IE. Not so in PowerShell. Probably this is because the PowerShell does not use the AppPaths from the registry, which act as kind of an alternative search path for executables: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths Note they are not located under "Explorer" or any "Shell" entry, they're general. Is there any reason why the powerShell should not use these paths? Adding a custom function could be a solution. If anyone knows of a better one, please let us know. JensG |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Applications shut down when print command given | Larryjn | Vista hardware & devices | 1 | 05-21-2008 12:42 AM |
| Command Line Ren (Rename) command broken? | SixSigmaGuy | Vista General | 5 | 05-20-2008 05:52 AM |
| Several applications are trying to access the internet to specific ip address 10.0.0.138 & 224.0.0.2, while ARE NOT internet applications! ref/eDN3072784783 | dennis | Vista General | 1 | 09-27-2007 06:08 AM |
| get-command and *.txt "applications" | Andrew Watt [MVP] | PowerShell | 2 | 01-11-2007 12:29 PM |
| formatting command syntax like get-help or get-command | klumsy@xtra.co.nz | PowerShell | 1 | 10-18-2006 12:04 PM |