Thursday, December 30, 2010

Alias Schm-alias

An old colleague and friend of mine "Dave" (not me, I swear) e-mailed me with some interesting info that he thought might be worth sharing.  This is regarding the command alias data file used by AutoCAD 2010 and AutoCAD Mechanical 2010.  More importantly: the DIFFERENCES between them.

AutoCAD 2010 apparently uses a file named "alias.pgc", stored in the folder path %ProgramFiles%\AutoCAD 2010\Express.

AutoCAD Mechanical 2010 uses a file named "alias.pgp", stored in the folder path %ProgramFiles%\Autodesk\ACADM 2010\acadm.

But that's not all!

In his environment at work, "users" do not have Administrator rights.  EVER*.  It's prohibited by policy (as it damn well should be everywhere on the planet Earth).  Users therefore cannot edit their own command aliases while the files reside in those locations.

*SIDE NOTE: If you can't make your Windows client environment work without granting users Administrator rights you have NO idea what you are doing.  There are no exceptions.  Violators will be waterboarded, beaten, tasered in the groin and trampled with ice climbing boots.  Any questions?  Good.  I didn't think so.  Now… back to the story…

So, normally Dave does what most experienced packagers/administrators do: run a CACLS process on the file or folder to make it behave normally for a "user" login.  The problem is that AutoCAD Mechanical 2010 wants to create a temporary lock file, while the alias.pgp file is being modified.  This is only a small challenge since CACLS works fine on files AND folders. 

However, it presents a dilemna wherein opening the permissions to the entire folder defeats the intentions of having user security levels in the first place.  This, by proxy, violates Microsoft Windows XP Compatability tenants.  I presume such practice on Windows 7 would violate those as well.  But I'm not an attorney.  I just make fun of them when they're not around.

So, now he's faced with two CACLS processing chores:

CACLS "%programfiles%\AutoCAD 2010\Express\alias.pgc" /e /c /g users:c

CACLS "%programfiles%\Autodesk\ACADM 2010\acadm" /e /c /g users:c

Aside from the path names, can you see the difference?  One ends with a file name, the other does not.  That means the second statement applies to the entire folder and all of the files within it.  Wag of the finger!

Here's a Software Development 101 tip:  If you are developing software to install on Windows clients, and you're not making it with something clever like Microsoft ClickOnce, App-V, ThinApp, XenApp, or whatever, make sure that anything a "user" can modify will allow a "user" to modify it. 

While some vendors make no distinction between "user" and "administrator" (aka "admin"), the rest of the brain-enabled world does.  I'm not picking on Autodesk, they get enough picking on. They're actually one of the better vendors out there.  There are many who, shall I say, write crap code, and leave us IT pukes to deal with shoe-horning it into real-world environments.

Post a Comment