Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: waheedmp3 on May 18, 2016, 02:04:04 am
-
In order to install my add-in the users need administrator access on their machines to register the dll in the registry using regasm.exe
is there a way to enable users who have no admin access to use install the add-in?
-
The proper way to to create an MSI and have your system administrator distribute the installation that way.
See Tutorial: Deploy your Enterprise Architect C# add-in with an MSI package (https://bellekens.com/2011/02/23/tutorial-deploy-your-enterprise-architect-csharp-add-in-with-an-msi-package/)
Geert
PS. There is a way, but it requires messing about a lot in the registry. I was working on an add-in manager that was meant to install add-ins on the fly and without admin-access. The core functionality worked, I just never gotten around to finishing it. You can see (and use) the code on in my github repository: https://github.com/GeertBellekens/Enterprise-Architect-Toolpack/tree/master/EAAddinManager (https://github.com/GeertBellekens/Enterprise-Architect-Toolpack/tree/master/EAAddinManager) The idea behind it is that you only touch the HKCU section of the registry, for which you don't need admin access.
-
Geert, you can register an add-in with EA without having access as you say. But how do you get around registering the dll itself? That part needs administrator access to do.
-
Geert, you can register an add-in with EA without having access as you say. But how do you get around registering the dll itself? That part needs administrator access to do.
No, there's also a workaround for that.
The Registry part HKEY_CLASSES_ROOT that is needed to register the classes for COM interop is actually a merge from part of the HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER.
See http://stackoverflow.com/questions/334603/is-there-an-hkey-current-user-equivalent-of-hkey-classes-root-record (http://stackoverflow.com/questions/334603/is-there-an-hkey-current-user-equivalent-of-hkey-classes-root-record) for more info.
And since we can modify the HKCU without admin rights we can register a dll for COM interop without admin access. (of course only for the current user)
Geert
-
And since we can modify the HKCU without admin rights we can register a dll for COM interop without admin access. (of course only for the current user)
Not fun when another user expects the same behavior on the same machine and the person trying to find the root cause of the problem doesn't know what has been done.
-
hi
I have a non-admin installer for eaForms, which works fine, although without admin rights you need to be careful with updates/uninstall.
I'm out of the office today but if you send me a mail eaforms(at)exploringea.co.uk that will remind me and I'll try and provide the relevant information.
-
Hey Geert,
I tried to compile and build ur source code mentioned in ur reply which is existed in the following https://github.com/abdallahmahran10/Enterprise-Architect-Toolpack/tree/master/EAScriptAddin (https://github.com/abdallahmahran10/Enterprise-Architect-Toolpack/tree/master/EAScriptAddin) but it doesn't compile giving me the following errors:
Error 40 Cannot implicitly convert type 'System.Collections.Generic.HashSet<SchemaType>' to 'System.Collections.Generic.HashSet<EA.SchemaType>' C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 69 20 EAAddinFramework
Error 9 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\MyAddin\CSC MyAddin
Error 10 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\EAAddinManager\CSC EAAddinManager
Error 11 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\BalsamiqConnector\CSC BalsamiqConnector
Error 12 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\EANavigator\CSC EANavigator
Error 13 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\EAWorksetSharing\CSC EAWorksetSharing
Error 14 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\EAScriptAddin\CSC EAScriptAddin
Error 15 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\ECDMMessageComposer\CSC ECDMMessageComposer
Error 16 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\LicensekeyGenerator\CSC LicensekeyGenerator
Error 18 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 23 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\MyAddin\bin\Debug\MyAddin.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 17 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\BalsamiqConnector\bin\Debug\BalsamiqConnector.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 19 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\EANavigator\bin\Debug\EANavigator.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 20 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\EAScriptAddin\bin\Debug\EAScriptAddin.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 21 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\EAWorksetSharing\bin\Debug\EAWorksetSharing.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 22 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\ECDMMessageComposer\bin\Debug\ECDMMessageComposer.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 25 The type or namespace name 'SchemaComposer' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\EAAddinBase.cs 1264 75 EAAddinFramework
Error 26 The type or namespace name 'SchemaComposer' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 41 56 EAAddinFramework
Error 32 The type or namespace name 'SchemaComposer' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 19 14 EAAddinFramework
Error 33 The type or namespace name 'SchemaComposer' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 29 44 EAAddinFramework
Error 24 The type or namespace name 'SchemaProfile' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\EAAddinBase.cs 1256 71 EAAddinFramework
Error 2 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaPropertyWrapper.cs 18 22 EAAddinFramework
Error 3 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaLiteral.cs 22 71 EAAddinFramework
Error 4 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaProperty.cs 22 72 EAAddinFramework
Error 5 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaAssociation.cs 24 82 EAAddinFramework
Error 7 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaPropertyWrapper.cs 26 86 EAAddinFramework
Error 8 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaElement.cs 98 19 EAAddinFramework
Error 27 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 45 90 EAAddinFramework
Error 28 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 67 74 EAAddinFramework
Error 30 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 77 77 EAAddinFramework
Error 31 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 82 73 EAAddinFramework
Error 1 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaElement.cs 17 15 EAAddinFramework
Error 6 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaElement.cs 25 64 EAAddinFramework
Error 29 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 72 66 EAAddinFramework
Error 34 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 44 18 EAAddinFramework
Error 35 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 59 22 EAAddinFramework
Error 36 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 61 15 EAAddinFramework
Error 37 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 61 56 EAAddinFramework
Error 39 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 63 16 EAAddinFramework
Error 38 The type or namespace name 'SchemaTypeEnum' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 62 7 EAAddinFramework
I would really appreciate it, If you can guide me what I am doing wrong.
EDIT: Never mind I manage to understand your code and I did a program which do the same steps your code does, and it works fine now, thanks a lot.
-
As promised I have done a post with information on how we create non-admin installers (http://wp.me/p2RcMp-gC)
Hope this helps.
-
Hey Geert,
I tried to compile and build ur source code mentioned in ur reply which is existed in the following https://github.com/abdallahmahran10/Enterprise-Architect-Toolpack/tree/master/EAScriptAddin (https://github.com/abdallahmahran10/Enterprise-Architect-Toolpack/tree/master/EAScriptAddin) but it doesn't compile giving me the following errors:
Error 40 Cannot implicitly convert type 'System.Collections.Generic.HashSet<SchemaType>' to 'System.Collections.Generic.HashSet<EA.SchemaType>' C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 69 20 EAAddinFramework
Error 9 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\MyAddin\CSC MyAddin
Error 10 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\EAAddinManager\CSC EAAddinManager
Error 11 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\BalsamiqConnector\CSC BalsamiqConnector
Error 12 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\EANavigator\CSC EANavigator
Error 13 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\EAWorksetSharing\CSC EAWorksetSharing
Error 14 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\EAScriptAddin\CSC EAScriptAddin
Error 15 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\ECDMMessageComposer\CSC ECDMMessageComposer
Error 16 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Toolpack\LicensekeyGenerator\CSC LicensekeyGenerator
Error 18 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 23 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\MyAddin\bin\Debug\MyAddin.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 17 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\BalsamiqConnector\bin\Debug\BalsamiqConnector.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 19 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\EANavigator\bin\Debug\EANavigator.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 20 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\EAScriptAddin\bin\Debug\EAScriptAddin.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 21 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\EAWorksetSharing\bin\Debug\EAWorksetSharing.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 22 Metadata file 'C:\Workset\GIT\Enterprise-Architect-Toolpack\ECDMMessageComposer\bin\Debug\ECDMMessageComposer.dll' could not be found C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinTester\CSC EAAddinTester
Error 25 The type or namespace name 'SchemaComposer' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\EAAddinBase.cs 1264 75 EAAddinFramework
Error 26 The type or namespace name 'SchemaComposer' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 41 56 EAAddinFramework
Error 32 The type or namespace name 'SchemaComposer' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 19 14 EAAddinFramework
Error 33 The type or namespace name 'SchemaComposer' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 29 44 EAAddinFramework
Error 24 The type or namespace name 'SchemaProfile' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\EAAddinBase.cs 1256 71 EAAddinFramework
Error 2 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaPropertyWrapper.cs 18 22 EAAddinFramework
Error 3 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaLiteral.cs 22 71 EAAddinFramework
Error 4 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaProperty.cs 22 72 EAAddinFramework
Error 5 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaAssociation.cs 24 82 EAAddinFramework
Error 7 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaPropertyWrapper.cs 26 86 EAAddinFramework
Error 8 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaElement.cs 98 19 EAAddinFramework
Error 27 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 45 90 EAAddinFramework
Error 28 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 67 74 EAAddinFramework
Error 30 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 77 77 EAAddinFramework
Error 31 The type or namespace name 'SchemaProperty' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 82 73 EAAddinFramework
Error 1 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaElement.cs 17 15 EAAddinFramework
Error 6 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaElement.cs 25 64 EAAddinFramework
Error 29 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchemaBuilderFactory.cs 72 66 EAAddinFramework
Error 34 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 44 18 EAAddinFramework
Error 35 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 59 22 EAAddinFramework
Error 36 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 61 15 EAAddinFramework
Error 37 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 61 56 EAAddinFramework
Error 39 The type or namespace name 'SchemaType' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 63 16 EAAddinFramework
Error 38 The type or namespace name 'SchemaTypeEnum' does not exist in the namespace 'EA' (are you missing an assembly reference?) C:\Workset\GIT\Enterprise-Architect-Add-in-Framework\EAAddinFramework\SchemaBuilder\EASchema.cs 62 7 EAAddinFramework
I would really appreciate it, If you can guide me what I am doing wrong.
EDIT: Never mind I manage to understand your code and I did a program which do the same steps your code does, and it works fine now, thanks a lot.
You need to download the three repositories for the code to compile.
More info on how to use the EA Addin Framework here: https://bellekens.com/2014/05/27/how-to-use-the-enterprise-architect-add-in-framework/ (https://bellekens.com/2014/05/27/how-to-use-the-enterprise-architect-add-in-framework/)
Geert
-
Hi,
I started working on a wix setup project version to release a portable edition of my addin.
I read Adrian's link (https://exploringea.com/2016/05/26/non-admin-installation-of-addins/) however I'm still getting errors (current is ICE57).
I'd like to install the DDL in a user folder such as AppData, and update the registry in the HKCU.
Below is an extract from my wxs files.
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="LocalAppFolder" Name="AppData">
<Directory Id="eaUtilsFolder" Name="eaUtils" />
</Directory>
</Directory>
<DirectoryRef Id="eaUtilsFolder">
<Component Id="eaUtilsFiles" Guid="xxxxxxxx">
<CreateFolder/>
<RemoveFolder Id="RemoveeaUtilsFolder" Directory="eaUtilsFolder" On="uninstall" />
+ other published files...
<RegistryKey Root="HKCU" Key="Software\eaUtils\eautils" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Value="eautils.Main" />
</RegistryKey>
</Component>
</DirectoryRef>
Any comment or suggestion is welcomed!
thanks
-
Hi Guillaume,
Just a quick hit to say I've done Add-In WiX installers before. I don't have one here, but I'll have a look tonight.
I spent this weekend trying to create a Visual Studio template for EA Add-Ins. It almost almost works -- but Studio creates an extraneous directory between the solution directory and the two projects that I create (for the Add-In DLL and the WiX installer). If anyone's got any input on that, it'd be a lot of help.
/Uffe
-
Hi Uffe,
Thanks for your reply. Please note that I have a working Wix installer and I'm looking at a way to publish a portable version as a number of EA users don't have admin rights on their PC (e.g. especially in large/industrial companies).
Guillaume
-
Hi Guillaume,
regarding ICE57:
Maybe this helps: https://stackoverflow.com/questions/12422601/how-to-fix-ice57-per-user-installation (https://stackoverflow.com/questions/12422601/how-to-fix-ice57-per-user-installation)
Could you please publish your working WIX install files for non admin installation?
I think there is a lot of interests.
Thanks a lot,
Helmut
-
Hello,
if I haven't done something stupid it's enough to change WIX install:
- Add to <Package>
-- InstallScope='perUser'
-- InstallPrivileges='limited'
- Make sure install into accessible folder like '..user\appdata\local\apps\'
If you use WIX UI to decide whether to install per user or per machine it should work in the per-user case without admin rights.
WIX seems to handle registry keys on its own.
I tested it with a Windows10 standard user.
Kind regards,
Helmut
-
Hi,
Making progress, I managed getting the addin to be installed on a local folder (appdata, local) and some of the registry values set.
Testing it on a blank PC, I found out that the DLL is not registered i.e. the result from the regasm /codebase is missing.
I wrongly thought that I had fixed it on my main PC since the addin DLL is registered by compiling new versions.
I started looking at running WiX Heat tool on tlb files (see hints on https://corengen.wordpress.com/2009/12/24/wix-registering-a-net-com-interop-assembly/ (https://corengen.wordpress.com/2009/12/24/wix-registering-a-net-com-interop-assembly/)).
-
Guillaume,
If managed to get the dll registering done in code.
It is basically the same as registering the dll for a machine install.
Here's the interesting part of the code.
This snippet will register a single public com visible class.
private bool register(Type type)
{
bool isAlreadyRegistered = isAlreadyRegisteredInHKCR(type);
if (!isAlreadyRegistered && isComVisible(type))
{
// software classes
RegistryKey controlKey = Registry.CurrentUser.CreateSubKey(@"Software\Classes\" + type.FullName);
controlKey.SetValue(string.Empty,type.FullName);
RegistryKey clsidKey = controlKey.CreateSubKey("CLSID");
clsidKey.SetValue(string.Empty,type.GUID.ToString("B"));
//CLSID
RegistryKey classKey = Registry.CurrentUser.CreateSubKey(@"Software\Classes\CLSID\" + type.GUID.ToString("B"));
classKey.SetValue(string.Empty,type.FullName);
//implemented category
Registry.CurrentUser.CreateSubKey(@"Software\Classes\CLSID\" + type.GUID.ToString("B") + @"\Implemented Categories");
Registry.CurrentUser.CreateSubKey(@"Software\Classes\CLSID\" + type.GUID.ToString("B") + @"\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}");
//inprocerver
RegistryKey inprocKey = Registry.CurrentUser.CreateSubKey(@"Software\Classes\CLSID\" + type.GUID.ToString("B") + @"\InprocServer32");
inprocKey.SetValue(string.Empty,"mscoree.dll"); //hardcoded
inprocKey.SetValue("ThreadingModel","Both"); //hardcoded?
inprocKey.SetValue("Class",type.FullName);
inprocKey.SetValue("Assembly",type.Assembly.FullName);
inprocKey.SetValue("RuntimeVersion",type.Assembly.ImageRuntimeVersion);
inprocKey.SetValue("CodeBase",type.Assembly.EscapedCodeBase);
//version
RegistryKey versionKey = Registry.CurrentUser.CreateSubKey(@"Software\Classes\CLSID\" + type.GUID.ToString("B") + @"\InprocServer32\" + type.Assembly.GetName().Version);
versionKey.SetValue("Class",type.FullName);
versionKey.SetValue("Assembly",type.Assembly.FullName);
versionKey.SetValue("RuntimeVersion",type.Assembly.ImageRuntimeVersion);
versionKey.SetValue("CodeBase",type.Assembly.EscapedCodeBase);
//ProgID
RegistryKey progIdkey = Registry.CurrentUser.CreateSubKey(@"Software\Classes\CLSID\" + type.GUID.ToString("B") + @"\ProgId");
progIdkey.SetValue(string.Empty,type.FullName);
}
return isAlreadyRegistered;
}
Geert
-
Hi Geert,
I seem to have found a working solution yesterday by copying the content from the file generated via the following command line:
Heat.exe file "c:\<addin path>\addin.tlb" -out addinWix.dll.wxs
So far it works but the solution you mentioned looks much more appropriate. I will try it out.
When I get some time, I will try to write something about it.
Thanks!
-
Are you sure that creates the registry entries in the user space? (so without admin rights)
I use a similar method for the installer of my add-ins, but they do require admin-rights.
The command I use is this:
"C:\Program Files (x86)\WiX Toolset v3.8\bin\heat.exe" file MyAddin.dll -ag -template fragment -out MyAddin.wxs
Not sure what those different parameters mean, but this works for me.
The advantage of setting the registry keys in the installer (rather then in code) is that these settings are also removed when un-installing. (I think, not 100% sure :-\)
I haven't found this to be a major problem though. Most organisations who don't give admin-rights to their users want to control which software gets installed and used on the computers. I can imagine that those organisations wouldn't be too with happy users installing software themselves just because they can.
Geert
-
Found some info on creating Wix Custom Actions that would let me run the suggested Registry update you sent.
Am looking into it as a better & cleaner option.
These installation setup projects aren't straightforward...
-
Hi,
I've tried a bit to find an easy solution to install without local administration right. I use WIX 3.11.
The easiest one is quite simple. Microsoft installer handles all the stuff with the folders, putting the registry keys to the right location. The major things are:
- Add to <Package>
-- InstallScope='perUser'
-- InstallPrivileges='limited'
- Add SetProperty:
<SetProperty Id="ProgramFilesFolder" Value="[LocalAppDataFolder]" Before="CostFinalize"><![CDATA[NOT Privileged]]></SetProperty>
- Don't use advanced WIX UI (User Interface)
- Register to EA: RegistryKey Root="HKCU" Key="Software\Sparx Systems\EAAddins\hoReverse">
- Register dll: <RegistryValue Root="HKCR" Key="CLSID\...
(Standard for WIX tool Heat)
I think about making this easy approach to always install for a user to my standard method. Easy to develop and to use! You can see an example in hoTools, branch Development, AaddinSimpleNoAdminSetup.
It's possible to make an *.msi file with WIX for per user or per-machine install. It took me a while to figure it out and to get it running. During install you have to go to advanced (not click install) to make a proper per-user install without asking for admin. See the references.
It's complicated, and you have to install in Advanced Mode to get it properly working without asking for admin rights. The main things are:
- Register to EA: RegistryKey Root="HKMU" Key="Software\Sparx Systems\EAAddins\hoReverse">
- Register dll: <RegistryValue Root="HKCR" Key="CLSID\...
(Standard for WIX tool Heat)
The Installer keeps care of the correct location in the registry (user/machine).
You can see it at GITHUB in my hoReverse, Branch Development.
I would also like to hear about your experiences.
Summary:
- Install per user without admin rights is quite simple with WIX
- Install with GUI for per user and per machine may cause you long nights. But it works with one drawback I know about.
Best regards,
Helmut
- Basics: Single Package Authoring
https://msdn.microsoft.com/en-gb/library/dd408068.aspx?f=255&MSPPError=-2147217396 (https://msdn.microsoft.com/en-gb/library/dd408068.aspx?f=255&MSPPError=-2147217396)
- Proper UAC Control (for per machine / per user) in WiX
http://uvinw.com/per-machine-and-per-user-without-UAC-in-WiX/ (http://uvinw.com/per-machine-and-per-user-without-UAC-in-WiX/)
-
Hi Helmut,
Thanks for the info. I seem to have found a solution by combining your approach with custom actions as suggested by Geert.
I wanted to use Custom Actions to avoid having to run Wix Heat tool and copy/paste each time the content.
The way I defined it lets me register and unregister the DLL respectively during the install and uninstall processes.
I will write something up once tests and installation from various users don't bring any other issue.
I published both the standard and portable editions of eaUtils on http://www.eautils.com/en/download (http://www.eautils.com/en/download). Please feel free to install and send me your feedback (successful or else...)
Thanks
-
Hi Guillaume,
looks good! I tested the portable release with a test user who has no admin rights.
Making the registration via code has its charm. There is no fiddling with the right version or using Heat and copy and past.
Could you publish the code? Yes, it's not complicated but using code is easy and reliable.
I'm not sure which approach I use in future. Putting the dll registration in WIX or integrating your peace of code.
With the single Package Authoring approach, there is only one *.msi file and the user choose whether to install per-user or per-machine.
Thanks and best regards,
Helmut
-
Hi Guillaume,
Sorry not had much time to look at forum recently - head down mode...
Re registering the DLL have you include code in wxs file to do this, e.g. below is the complete registration for my eaForms installer, which works for both machine and current users hence use of root HKMU but this could be HKCU if definitely only for current user. This is the component that does class registration and sparx addin key
<Component Id="ProgramKeys" Guid="9******">
<RegistryKey Root="HKMU" Key="Software\EXploringEA\eaForms">
<RegistryValue Type="string" Value="Default Value" />
<RegistryValue Type='string' Name='ProgramDir' Value='[INSTALLDIR]' KeyPath ="yes"/>
<RegistryValue Type="string" Name="Examples" Value='[EXAMPLESFOLDER]' />
</RegistryKey>
<RegistryKey Root="HKMU" Key="Software\Sparx Systems\EAAddins\eaForms" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Value="eaFormsCE.eaForms"/>
</RegistryKey>
<RegistryKey Root="HKMU" Key="Software\Microsoft\Active Setup\Installed Components\eaForms" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Value="eaForms Addin" />
<RegistryValue Type="string" Name="Version" Value="1" />
<RegistryValue Type="string" Name="StubPath" Value='reg add "HKMU\Software\Sparx Systems\EAAddins\eaForms" /ve /d eaFormsCE.eaForms /t REG_SZ /f' />
</RegistryKey>
</Component>
Then includes in the feature section as:
<ComponentRef Id="ProgramKeys"/>
Perhaps this may give you a clue, and one day I'll update my post with other findings such as custom UI etc along my path of creating quite a few installers now!!
Ping me if you are still having issues and I'll see what I can do.
BR
Adrian