Author Topic: Distributing my add-in for users with no admin privilege  (Read 1694 times)

waheedmp3

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Distributing my add-in for users with no admin privilege
« 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7729
  • Karma: +165/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Distributing my add-in for users with no admin privilege
« Reply #1 on: May 18, 2016, 03:55:47 pm »
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

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 The idea behind it is that you only touch the HKCU section of the registry, for which you don't need admin access.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6190
  • Karma: +47/-5
    • View Profile
Re: Distributing my add-in for users with no admin privilege
« Reply #2 on: May 19, 2016, 08:51:52 am »
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.
Simon

support@sparxsystems.com

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7729
  • Karma: +165/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Distributing my add-in for users with no admin privilege
« Reply #3 on: May 19, 2016, 01:17:32 pm »
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 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

Glassboy

  • EA User
  • **
  • Posts: 896
  • Karma: +52/-54
    • View Profile
Re: Distributing my add-in for users with no admin privilege
« Reply #4 on: May 20, 2016, 11:54:23 am »

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.

MrWappy

  • EA User
  • **
  • Posts: 144
  • Karma: +3/-0
    • View Profile
Re: Distributing my add-in for users with no admin privilege
« Reply #5 on: May 20, 2016, 09:17:16 pm »
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.
 

abdallahmahran

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Distributing my add-in for users with no admin privilege
« Reply #6 on: May 26, 2016, 12:17:52 am »
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 but it doesn't compile giving me the following errors:

Code: [Select]
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.
« Last Edit: May 26, 2016, 08:11:31 pm by abdallahmahran »

MrWappy

  • EA User
  • **
  • Posts: 144
  • Karma: +3/-0
    • View Profile
Re: Distributing my add-in for users with no admin privilege
« Reply #7 on: May 26, 2016, 08:46:32 pm »
As promised I have done a post with information on how we create non-admin installers

Hope this helps.
 

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7729
  • Karma: +165/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Distributing my add-in for users with no admin privilege
« Reply #8 on: May 26, 2016, 09:38:01 pm »
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 but it doesn't compile giving me the following errors:

Code: [Select]
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/

Geert

Guillaume

  • EA User
  • **
  • Posts: 549
  • Karma: +18/-0
    • View Profile
    • www.umlchannel.com
Re: Distributing my add-in for users with no admin privilege
« Reply #9 on: November 20, 2017, 06:58:54 pm »
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.

Code: [Select]
    <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
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com | Automated tests for scripts & addins: www.eatests.com

Uffe

  • EA Practitioner
  • ***
  • Posts: 1066
  • Karma: +81/-5
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Distributing my add-in for users with no admin privilege
« Reply #10 on: November 20, 2017, 07:14:56 pm »
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
My theories are always correct, just apply them to the right reality.

Guillaume

  • EA User
  • **
  • Posts: 549
  • Karma: +18/-0
    • View Profile
    • www.umlchannel.com
Re: Distributing my add-in for users with no admin privilege
« Reply #11 on: November 20, 2017, 10:50:37 pm »
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
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com | Automated tests for scripts & addins: www.eatests.com

Helmut Ortmann

  • EA User
  • **
  • Posts: 884
  • Karma: +37/-1
    • View Profile
Re: Distributing my add-in for users with no admin privilege
« Reply #12 on: November 20, 2017, 11:23:00 pm »
Hi Guillaume,

regarding ICE57:

Maybe this helps: 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
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Helmut Ortmann

  • EA User
  • **
  • Posts: 884
  • Karma: +37/-1
    • View Profile
Re: Distributing my add-in for users with no admin privilege
« Reply #13 on: November 21, 2017, 07:58:46 am »
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

Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Guillaume

  • EA User
  • **
  • Posts: 549
  • Karma: +18/-0
    • View Profile
    • www.umlchannel.com
Re: Distributing my add-in for users with no admin privilege
« Reply #14 on: November 22, 2017, 12:59:15 am »
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/).




Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com | Automated tests for scripts & addins: www.eatests.com