I am just wondering if there is a good way I can write a short .bat script or .vbscript to do the following:
While Excel is open, unregister the xll.
Grab the xll from a folder I specify to the deployment folder, replacing the current XLL
Register the new xll as an Excel addin.
The reason I would like to have such a script is because every time I compile the code I get a new xll and it would be a huge hassle if I have manually save all the opening Excel workbooks, shut down Excel, and reopen Excel after replacing the file.
My current set up is Excel 2010 on Windows XP/7 depending on the machine I work on.
Thanks!
You can rename memory mapped files, like DLLs, but not delete them while open.
You can do what you want, but it won't take effect till you restart Excel, gaining you nothing.
Registration is only used to create objects. Once created they don't use the registry so unregistring will probably work. You have to rename existing DLL before copying a new one in. Registering easy (as long as you don't then try to create an object).