SecurityManager dll do not get register on Client machine

Add-in Express™ Support Service
That's what is more important than anything else

SecurityManager dll do not get register on Client machine
 
Ashish Bogawat




Posts: 11
Joined: 2014-08-25
Greetings !!!
I have created outlook add-in application (office 2010) using Visual studio 2012 and used SecurityManager dll into it. Its worked alright on development machine.
I crated setup using WIX installer and installed it on client machine. It got install successfully.
But when I opened the outlook it gives me following error:

Could not load file or assembly 'SecurityManager.2005, Version=7.3.3143.2005, Culture=neutral, PublicKeyToken=aa42cad61af07cf4' or one of its dependencies. The system cannot find the file specified.

Below is the details of Product.wxs file


<Feature Id="ProductFeature" Title="TestApp" Level="1" ConfigurableDirectory="INSTALLFOLDER">
      <ComponentRef Id="INSTALLFOLDER" />
      <ComponentRef Id="comp_SECMANFOLDER" />
      <ComponentGroupRef Id="ProductComponents" />
    </Feature>

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="LocalAppDataFolder">
        <Directory Id="INSTALLFOLDER" Name="TestApp" >
          <Component Id="INSTALLFOLDER" Guid="dfddbd2c-f31d-4f34-ac2d-e9dc4aa1aa5a">
            <RemoveFolder On="both" Id="INSTALLFOLDER"/>
            <RegistryValue Root="HKCU" Key="Software[Manufacturer][ProductName]" Type="string" Value="TestApp" />
          </Component>
        </Directory>
      </Directory>
      <Directory Id="CommonFilesFolder">
        <Directory Id="SECMANFOLDER" Name="Outlook Security Manager" >
          <Component Id="comp_SECMANFOLDER" Guid="8E527249-ABFA-429a-AED0-3C4D5FFBC429" >
            <RegistryValue Root="HKCU" Key="Software[Manufacturer][ProductName]" Type="string" Value="Secman" />
          </Component>
        </Directory>
      </Directory>
    </Directory>
  </Fragment>


<Fragment>
    <ComponentGroup Id="ProductComponents" >
      <Component Id="ProductComponent" Guid="d3668a08-4640-427c-b332-d88e4131c63f" DiskId="1" Directory="INSTALLFOLDER" >
        <RegistryKey Root="HKCU" Key="Software[Manufacturer][ProductName]">
          <RegistryValue Type="string" Name="Installed" Value="[INSTALLFOLDER]" KeyPath="yes" />
        </RegistryKey>
        
       ....
 .....

        <File Id="_SecurityManager_2005_dll" Name="SecurityManager.2005.dll" Source="C:WindowsssemblyGAC_MSILSecurityManager.2005.3.3143.2005__aa42cad61af07cf4" />
      </Component>
      <Component Id="SecmanComponent" Guid="E6A37DBF-A5CC-4f54-89C5-99AF00F0DD48" DiskId="1" Directory="SECMANFOLDER"  Permanent="yes">
        <File Id="_secman_dll" Name="secman.dll" Source="C:Program FilesCommon FilesOutlook Security Manager" SelfRegCost="5000" />
      </Component>
      <Component Id="SecmanComponent_64" Guid="0E9A0C1D-ACD1-4fb6-9A8B-084DBC3A72B4" DiskId="1" Directory="SECMANFOLDER" Permanent="yes" >
        <File Id="_secman64_dll" Name="secman64.dll" Source="C:Program FilesCommon FilesOutlook Security Manager" SelfRegCost="5000" />
        <Condition><![CDATA[VersionNT64]]></Condition>
      </Component>
    </ComponentGroup>
  </Fragment>


Thanks in advance.
Posted 25 Feb, 2015 09:35:34 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Ashish,

Could you please check if that assembly gets acually deployed to the target folder?

If you develop an Add-in express based add-in, please try also setting shadowCopyEnabled=false in adxloader.dll.manifest.


Andrei Smolin
Add-in Express Team Leader
Posted 25 Feb, 2015 11:04:27 Top
Ashish Bogawat




Posts: 11
Joined: 2014-08-25
Hello Andrei,
Somehow I manage to resolve the issue, but now when I tried to install the setup on client machine not in administrator mode, it throws below exception.

"Module C:\Program files (x86)\common files\outlook security manager \secman.dll" failed to register. HRESULT -2147024891. Contact your support personal."

If I run set up file as administrator, then no issue.

Any solution for this?

Thanks,
Ashish Bogawat
Posted 26 Feb, 2015 09:41:23 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Ashish,

Administrative permissions are required in order to registere secman.dll.


Andrei Smolin
Add-in Express Team Leader
Posted 26 Feb, 2015 09:50:36 Top
Ashish Bogawat




Posts: 11
Joined: 2014-08-25
Its not a good way to show error message while installing the app

For plane .net win application there is provision to add Application Manifest File with below element
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

Which force user to run the program in administrator mode.
Manifest file does not work with add in application.
Posted 10 Mar, 2015 07:15:15 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Ashish,

I don't I follow. Could you please explain what you mean? What issue do you have? Does this issue belong to Add-in Express, Security Manager, WiX or something else? Do you develop and Add-in Express add-in? If yes, Is it per-user or per-machine?


Andrei Smolin
Add-in Express Team Leader
Posted 10 Mar, 2015 09:20:23 Top
Ashish Bogawat




Posts: 11
Joined: 2014-08-25
Hello Andrei,
To install the add-in, user need to right click on set up and have to select "Run as administrator" option.
If user double click on set up file to install it, below exception is fired up

"Module C:\Program files (x86)\common files\outlook security manager \secman.dll" failed to register. HRESULT -2147024891. Contact your support personal."

Showing above exception is not the proper way to convey the message to user that you need to run the file in administrative mode.

For plane .net win application there is provision to add Application Manifest File with below element
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

With this if user double click on setup file to install setup, Windows show the message that it needs administrative permission.

Is there any way where we can perform similar functionality with add-in setup ?

Please let me know in case need more information.

Thanks,
Ashish Bogawat
Posted 11 Mar, 2015 09:13:39 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Ashish,

Please check section "Deploying a per-machine Office extension via an MSI installer" in the Add-in Express manual, see the PDF file in the folder {Add-in Express}\Docs on your development PC. Is this what you are looking for?


Andrei Smolin
Add-in Express Team Leader
Posted 11 Mar, 2015 10:15:05 Top