Installer Project

One of the worst tasks you can get as a programmer is having to write an installer.  Installers are hard to write, hard to debug and hard to maintain.  What's worse is that nobody appreciates all the hard work you did.  As far as the end user (or your boss) is concerned, an installer is either "adequate" or "a complete piece of garbage".  Those are the only 2 states.  There is no in-between and no way to go above adequate.  Nobody ever says, "Wow! What a great installer!"

And don't even get me started on the MSI framework.

Anyway, you may have noticed that most of my samples are deployed via an installer.  So I've posted a simple Visual Studio 2008 installer project that you can use to deploy your custom Vault Explorer extensions.

Features:

  • Detects if Vault Collaboration, Workgroup or Professional client is installed and sets the [VAULTWGDIR], [VAULTCOLLABDIR] and [VAULTPRODIR] paths respectively.  If the path is empty, then it means that the client is not installed, and the path will be empty.
  • Installer will not work if it doesn't detect one of the above mentioned Vault clients.
  • Performs a menu reset, so your custom command should show up after the installer runs and your restart Vault Explorer.

 Click here to download the installer project

To use:

You can look at the MSDN documentation on how to work with installer projects.  Also, Kean Walmsley posted a great 3 part series on installers on his blog

To use my installer project, you basically have to change the parts that say "ChangeMe".  Next you add your files to the appropriate folders.  For example, if you are supporting all Vault Collaboration and Vault Professional, then you would add your extension files to both of those locations.   

Make sure to set the appropriate condition for each file you are installing.  For example, all Vault Collaboration files should have [VAULTCOLLABDIR] as the condition.

You may want to update the Vault2011 launch condition if you are not supporting all 3 customizable Vault clients.

Warning: Use of this project may result in you getting stuck as the "Installer Guy".


Comments

12 responses to “Installer Project”

  1. Hi Doug,
    First I´d like to congratulate you about the blog. It´s good to have access to these features.
    I have some doubts about work with API to program Custom Revision Schemes. How could I contact you about my doubt? Just using the Blog´s comment or do you prefer to send me your e-mail?
    Thank you a lot.
    Best Regards,
    Marcelo Magalhães Barbosa – MAPData Autodesk Reseller

  2. Till Klingenberg-Scholle Avatar
    Till Klingenberg-Scholle

    Once again, you proof that your blog is a real treasure chest. RESPECT.
    Best regards

  3. If you are a member of the Autodesk Developer Network, then that is the best place to go. They fully support the Vault API and can answer specific Vault API issues. They can also give guidance on your program, such as advising you on the best approach or answering if what you have in mind is even possible with the API.

  4. Till Klingenberg-Scholle Avatar
    Till Klingenberg-Scholle

    Hi Doug,
    I don’t know if you can help me out but it would be very nice if you could. The thing, I want to automate some processes in inventor. But I just can’t make it work, that the document gets checked in automatically into the vault. You know what I mean? an automated “script”:open file -works fine, do some changes-works fine,check into vault-i just do not know how.
    It would be very great if you had a clue.
    Greeting and a nice weekend
    Till Klingenberg-Scholle

  5. Unfortunately, there is no easy way to automate the check-in of an Inventor file. The file itself is easy to upload, but getting the file links and BOM data correct is very difficult. We recommend only using Vault clients from Autodesk to upload Autodesk files.
    If you are writing an Inventor plug-in, the best thing you can do is invoke the check-in command, which brings up the check-in dialog.

  6. Till Klingenberg-Scholle Avatar
    Till Klingenberg-Scholle

    Hello Doug, thank you for your answer.
    I thought it would be difficult. But I think I’ve got a solution.
    1st step is to get all references from an iam-file.
    2nd step is to upload all the child-data
    3rd step is to read out all the file ids of the children (in vault)
    4th step is to finally upload the iam with all the ids as dependencies.
    Ok, thats just some kind of a scribble but i think i can do it.
    For further clues I would be very very grateful
    Best regards

  7. Your steps are correct for the file dependencies, but there is still the issue of the BOM object. If you don’t provide a BOM, then Item data in Vault Professional will not be correct.
    If you are not using Vault Professional and are sure that you will never use it in the future, only then you can pass in a null BOM.
    There is also the issue of DWF. The Vault plug-in creates DWF files when a file is checked in. It can also be configured to queue up a DWF job or do nothing.
    In any event, you will have to do plenty of testing to make sure that files you upload still work properly with the rest of the Vault applications.

  8. Till Klingenberg-Scholle Avatar
    Till Klingenberg-Scholle

    Thank you very much. I am already struggling on the BOM-object.Well, this won’t get easy. Is there any sample code that handles the BOM-object?!? I think first of all I need to read out the BOM-structure from Inventor (Item and quantity) and then go on and look how to use this knowledge with the BOM-Object…but first I GO ON HOLIDAY!!!!
    Have a good time Doug and thank you for your hints.

  9. Creating your own BOM for an Inventor file is a bad idea. In order to work, you need to make sure you come up with the same BOM that the Vault plug-in does, and we haven’t released any information on how that BOM is constructed. So what you want to do is unsupported.
    If you try to reverse engineer things, you will probably make a mistake or skip over a use-case. The result might be quite costly, such as the wrong number of parts being manufactured. It’s just too risky.
    We do have it as a wish-list item for the Vault plug-in to be able to silently check in a file, but I have no information on when this feature can get into a release.

  10. Till Klingenberg-Scholle Avatar
    Till Klingenberg-Scholle

    Hi Doug,
    thank you for your reply.
    Well, I think I better focus on other things than to mess with things that are such risky. But I remain looking forward for the silent check-in plug-in.
    Best regards

  11. Hi Doug,
    I realize this hasn’t been commented on in a while, but hopefully you get a notice about a comment.
    How can your installer template be updated to work with Vault 2012? In searching my registry, I don’t see the same registry values used to set the conditions.
    Thanks

  12. I should probably post my 2012 installer. It’s simpler than the 2011 version. In 2012, all extensions go to the same location (%programData%\Autodesk\Vault 2012\Extensions) so I don’t need any of the registry stuff to detect the location of the client install.
    In installer terms, the [Application Folder] is what maps to ProgramData. So you can build an installer from scratch just by doing a basic file dump.

Leave a Reply to Till Klingenberg-ScholleCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading