Looking for advice for deploying DLLs

Looking for advice for deploying DLLs

waynehelley
Collaborator Collaborator
453 Views
2 Replies
Message 1 of 3

Looking for advice for deploying DLLs

waynehelley
Collaborator
Collaborator

Hi all,

 

I work for a company which focuses on configurable products.  We are constantly running iLogic/.Net scripts, hence I have create a DLL which contains many commonly used subroutines.

 

I was wondering if anybody had any advice on the most efficient way to distribute this DLL file to every machine which needs it (this is about 5 machines and 2 servers).  The main thing that is tricky is that DLL files become locked when in use.

 

I have set up a (BitBucket) GIT repository which we use for all our iLogic and .Net scripts.  I was hoping to just drop the file in there so that it would get copied over whenever a user pulls from the repository but Inventor locking the DLL file causes various problems.

 

The best idea I have so far is to create a program, running at regular intervals, which will copy the newest build of the DLL to every machine.  If the copy fails due to the destination file being read only, the script will rename the locked file so that the copy can retry and should succeed.

 

Any ideas will be much appreciated.

 

Thanks,

 

Wayne

Wayne Helley
Inventor 2013 Certified Professional

Autodesk Inventor Professional 2023
Visual Studio 2022
Windows 10 Pro, 64-bit
0 Likes
454 Views
2 Replies
Replies (2)
Message 2 of 3

ekinsb
Alumni
Alumni

One possible option is to package your files in an installer that has the intelligence to handle locked files.  Typically, if files that are being updated are locked, the installer will require a reboot to be able to overwrite the locked file.  You'll see this occasionally when you install software where at the end of the install process it will tell you that you need to reboot to complete the installation.

 

A fairly simple, and free, installer that supports this is Inno Setup.  You'll want to look at the "restartreplace" flag.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 3

Jef_E
Collaborator
Collaborator

I created a small "installer" that replaces the existing .dll file when the program runs. It does a check for the Inventor process. If the process does not exist no reboot is required.

 

I added this program to the start programs of the computers and after each boot the program will set the latest .dll in the correct position. when booting Inventor is not running and no problems.

 

This will mean that the oldest version for the users is max 1day out-of-date ( unless he/she doesn't shutdown.. )

 

 



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2