All About Shims
How to Exclude Executables from Getting Shims
If you have executables in the package or brought into the package folder during PowerShell run and you want to exclude them you need to create an empty file named exactly like (case sensitive) the executable with .ignore
suffixed on the end in the same directory where the executable is or will be.
Example: In the case of Bob.exe
you would create a file named Bob.exe.ignore
and that file would not get a redirect batch link. The Chocolatey package has an example of that. To further expand, bob.exe.ignore
would not work because it doesn't have the correct casing.
Here's a great programmatic example:
$files = get-childitem $installDir -include *.exe -recurse
foreach ($file in $files) {
#generate an ignore file
New-Item "$file.ignore" -type file -force | Out-Null
}
Setting Up Shims for Applications That Have a GUI
If you don't want to see a hanging window when you open an application from the command line that was set up with Chocolatey, you want to create a file next to the executable that is named exactly the same (case sensitive) with .gui
suffixed on the end.
Example: In the case of Bob.exe
you would create a file named Bob.exe.gui
and that file would be set up as a GUI application so the window will call it and then move on without waiting for it to finish. Again, bob.exe.gui
would not work because it doesn't have the correct casing.