Video Screencast Help

LayerExcludeFinder

Created: 25 Aug 2009 • Updated: 09 Aug 2010 | 20 comments
Jordan's picture
+5 5 Votes
Login to vote

LayerExcludeFinder is a command line tool that generates exclude entries for file extensions based off what file association types that are saved in the layer. Unlike ExcludeGen here on Connect, LayerExcludeFinder only adds excludes for Open, Edit or New shell commands that are assigned in the registry so you’re only getting the entries you need and not just all. Office 2007, for example, has 138 extensions registered but only 67 of those get added when using LayerExcludeFinder.

LayerExcludeFinder can take a Layer’s GUID or a Layer’s Name with each of these options having their own switch so the program knows what you’re trying to pass in.

 

LayerExclude Finder is compatible  with SWV 6.1 SP1, 6.1 SP4 and 6.1 SP5 which ExcludeGen is not.

 

Usage:
  • [/G]uid -- Layer Guid.
  • [/N]ame -- Layer Name.
Examples:
  • LayerExcludeFinder /G 9101cd50-9bfe-4740-86a5-63d565361cac
  • LayerExcludeFinder /N "Office 2007"

Comments 20 CommentsJump to latest comment

rantpe's picture

Great little helper, but it didn't find anything when i try it with IrfanView 4.25. IrfanView was associated with all image files (.gif, .jpg ect).
No problem with Office 2003
-Petri

-Petri

0
Login to vote
Jordan's picture

it won't work with notepad++ either because of how it stores associated files.

If an app doesn't store then in the standard place, Classes, or have them marked as Open, Edit or New this won't find them.  If the association is Marked as Read then I don't do anything with them because the app shouldn't be able to save the file type in question so you wouldn't need and exclude.

If a forum post solves your problem please flag is as the solution

0
Login to vote
yamine's picture

It won't work with SWV 6.1 sp1?
Probably because of the new registry issue isn't it?

0
Login to vote
Jordan's picture

it works with SP1, I tested it on SP1 before I posted it and have code that checks for the dynamic registry stuff.

If a forum post solves your problem please flag is as the solution

0
Login to vote
yamine's picture

Thank's Jordan.

0
Login to vote
schiffne's picture

I saw one machine, which was updated from version 6.1.5114 to 6.1.5126, where

the call

layerExcludeFinder.exe /N "Adobe Reader 9.3.2"

throwed the error message:

Unhandled Exception: System.Management.ManagementException: Invalid class
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
at layerExcludeFinder.commandLineParser.validateGUID(String myGuid)
at layerExcludeFinder.commandLineParser.parse()
at layerExcludeFinder.Program.Main(String[] args)

but this seems to be a single incident - other machines with 6.1.5126 are working....

Regards,
schiffne

0
Login to vote
Jordan's picture

ValidateGUID, where the exception is being thrown, uses WMI to get all the layer GUIDS on a machine so it's possible that SWV's WMI provider wasn't properly registered after that upgrade.

If a forum post solves your problem please flag is as the solution

0
Login to vote
Jordan's picture

I uploaded a new version (1.1) that fixed a bug preventing this from working with 6.1. SP4.

If a forum post solves your problem please flag is as the solution

0
Login to vote
Jordan's picture

I've uploaded a new version that's compatible with 6.1. SP5.

If a forum post solves your problem please flag is as the solution

0
Login to vote
DJ Funk's picture

I really appreciate this little tool but I’m having real trouble running it.
 
I have set my SWV packaging environment on virtual clients (WinXPSP3) and hosted by VMWare and Hyper-V running on two separate physical desktops for comparison.
 
Not sure how I initially managed to set things up but now on each machine and all the XP clients and snapshots running Layerexcludefinder.exe I get an application error 0xc0000135 (the application failed to initialize correctly) and the application simply exits. It does this regardless of conditions (have run it locally, from network drive, command prompt etc).
 
Running the app on the host works but creates an unnecessary step exporting and importing the .vsa project. I am really dumbstruck here since initially it did work and I managed to generate exclusions for my projects.

0
Login to vote
Jordan's picture

Error 0xc0000135 is caused by not having .Net installed on the system.  Layer exclude finder requires version 2.0 or higher to run.

If a forum post solves your problem please flag is as the solution

0
Login to vote
DJ Funk's picture

Doh, it was that easy. Thanks for the quick fix.

0
Login to vote
snruebes72's picture

If I call

LayerExcludeFinder /N "Layer Name"

on Windows 7 64Bit Enterprise English I get the following exception:

Unhandled Exception: System.Management.ManagementException: Invalid class
   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
   at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
   at layerExcludeFinder.commandLineParser.validateGUID(String myGuid)
   at layerExcludeFinder.commandLineParser.parse()
   at layerExcludeFinder.Program.Main(String[] args)

Any plans to fix that? Would make sense, because SWV version 6.3.2046 officially supports Windows 7 64Bit.

Thanks,

snruebes

0
Login to vote
Jordan's picture

It works fine for me on x64.  What's throwing the exception is in the WMI code where LayerExcludeFinder is validating that the layer you entered is on the system so there may be something off with your WMI service. 

If a forum post solves your problem please flag is as the solution

0
Login to vote
mautzu's picture

this is a very good program because is good to have a file extensions list to tell you which program for the extension you want to use, great development.

0
Login to vote
schiffne's picture

Hi Jordan,

on some of our machines your utility is freezing when we e.g. do import 10 layers, and after each layer import we execute layerexludefinder. Then it only helps to hard reboot the machine. Any ideas. It does not always happen, but enough to say that this might have a bug.

 

Thanks for your help

Marco

0
Login to vote
Jordan's picture

No clue as I've never done any testing with that extensive amount of use.

However, I can say you should running the tool on the packaging machine and then export for deployment to cut down on this problem.

Excludes are saved in the layer so running it after an import just adds to the amount of work you have to do.

If a forum post solves your problem please flag is as the solution

0
Login to vote
FrankB's picture

Jordan,

I've looked a little bit deeper in your program, and I must say;

This is Shear Genius!

My sincere compliments, I would never had thought about this approach to read the entries :)

______________________________________________
Frank Bastiaens
Senior Technical Consultant
Vanderlet B.V.

0
Login to vote
Jordan's picture

Thank you Frank.

If a forum post solves your problem please flag is as the solution

0
Login to vote
Robert999's picture

Frank,

Your program is just what I was looking for. Worked flawlessly!

Thanks,

Robert Meyer

0
Login to vote