sushant_narula
Active participant

Invoke-Expression : Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\Program Files (x86)\ManageSoft\WebUI\bin\Ionic.Zip.dll' or one of its dependencies.

Jump to solution

config powershell failure.PNG

Hi All,

I am perfroming a database repointing, running the command - “.\Config.ps1 "Config\FNMS Windows Authentication Config.xml" ForceUpdateConfig”

after giving the database names and the credential for the service account, when about to reach the final part, got the below error.
My install directory is 😧

Error:

Invoke-Expression : Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\Program Files
(x86)\ManageSoft\WebUI\bin\Ionic.Zip.dll' or one of its dependencies. The system cannot find the file specified."
At D:\2018R1\2018R1\FlexNet Manager Suite Installer for 2018 R1\FlexNet Manager Suite\Support\ConfigHelper.ps1:579 char:12
+ $ret = Invoke-Expression "$exe $params"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-Expression], MethodInvocationException
+ FullyQualifiedErrorId : FileNotFoundException,Microsoft.PowerShell.Commands.InvokeExpressionCommand

===================================

Any idea what could be the issue, i believe may be it having issues with locating the file in C:.
it is available in D:.

Let me know if someone can suggest something.

0 Kudos
2 Solutions
It appears that the script has detected your FNMS install under C:\Program Files (x86)\ManageSoft\, is that where you have actually installed FNMS?

If not, please look in the registry under the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ManageSoft Corp\ManageSoft

and ensure the values for ComplianceInstallDir, ETAPInstallDir, and InstallDir correctly points to the FlexNet Manager Platform directory where you have FNMS installed.

And also the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Flexera Software\FlexNet Manager Platform

should have FNMPInstallDir pointing to the same path

ie. by default, FNMS is installed under C:\Program Files (x86)\Flexera Software\FlexNet Manager Platform\

View solution in original post

Aha, under
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ManageSoft Corp\ManageSoft

please update the value for InstallDir to match ETAPInstallDir (where you have FNMS installed). Then you can try rerunning the config.ps1 script

View solution in original post

8 Replies
adrian_ritz1
Consultant

Hi,

Seems to be a issue with ionic.zip.dll file, try the following workarround:

  1. Copy Support\Ionic.Zip.dll file to a temporary folder.
  2. Compress Ionic.Zip.dll in the temporary folder to Ionic.Zip.dll.zip.
  3. Delete Support\Ionic.Zip.dll file, you may need to close the PowerShell window.
  4. Uncompress Ionic.Zip.dll.zip and copy uncompressed Ionic.Zip.dll to Support folder.
  5. Run again the powershell scripts
0 Kudos

@adrian_ritz1 

As mentioned, all the components are installed in 😧
and from the error i think its trying to get something from C:

Should i be concerned about this before i try this workaround.

Thanks,
Sushant

0 Kudos
It appears that the script has detected your FNMS install under C:\Program Files (x86)\ManageSoft\, is that where you have actually installed FNMS?

If not, please look in the registry under the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ManageSoft Corp\ManageSoft

and ensure the values for ComplianceInstallDir, ETAPInstallDir, and InstallDir correctly points to the FlexNet Manager Platform directory where you have FNMS installed.

And also the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Flexera Software\FlexNet Manager Platform

should have FNMPInstallDir pointing to the same path

ie. by default, FNMS is installed under C:\Program Files (x86)\Flexera Software\FlexNet Manager Platform\

View solution in original post

@Jellou 

Thanks for the response.
We had the FNMS installed on 😧

I am sharing the screenshots from the registries. if you can take a look on it.

managesoft_reg.JPG

FlexNet Manager Platform_reg.JPG

and thanks for highlighting this.

0 Kudos
Aha, under
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ManageSoft Corp\ManageSoft

please update the value for InstallDir to match ETAPInstallDir (where you have FNMS installed). Then you can try rerunning the config.ps1 script

View solution in original post

@Jellou 

you are right, its trying to find the .dll file in C:
after making changes it ran successfully.

really appreciate your support on this case and help in fixing the problem

Thanks,
Sushant

austinraun
Occasional contributor
** Easy & universal fix provided by Microsoft **
Enable Windows to load files, such as the aforementioned (~Ionic.Zip.dll) from "remote" sources (different drives in this case).
--------------------------------------------------------------
Steps:
1. FIND `machine.config ` (*replace [VERSION] respectively see reference #1):
o 32-bit location: %windir%\Microsoft.NET\Framework\[VERSION]\config\machine.config
o 64-bit location: %windir%\Microsoft.NET\Framework64\[VERSION]\config\machine.config

2. UPDATE `machine.config` (see reference #2 for Microsoft verification):
<configuration>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>

3. SAVE `machine.config`

4. CLOSE (important) & RE-OPEN `powershell` (allows new changes to take place)

5. RE-RUN `Config.ps1` same way you did before
--------------------------------------------------------------
I recommend following this solution, as provided by Microsoft, because each environment is different. Also, there are a variety of reasons people would choose to have these items on another local drive or even a shared drive. In some cases, the other mentioned solutions worked for us, other cases they did not. In many cases, this issue will have nothing to do with Flexera/FNMS or there will be underlying reasons the config is setup the way it is. Additionally, you can always copy the original `machine.config` and plug it back in once you've completed your upgrade or installation.

References:
1. Find `machine.config`:
o https://stackoverflow.com/questions/2325473/where-is-machine-config
2. How to update `machine.config` appropriately (loadFromRemoteSources enabled="true"):
o https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/dd409252(v=vs.100)?redire...
Austin Raun, CSAM, CHAMP
IT Software Asset Manager, Engineering Lead
stefange
Active participant

Hi,

Errors with the file Ionic.Zip.dll are almost always related to file blocking. By default Windows blocks untrusted files and the Ionec.zip.dll is one of these files. Easiest solution is to unblock the file using Powershell (for example dir  "H:\Download_Software\FlexNet Manager Suite 2020 R2" -recurse | unblock-file)

Stefan

0 Kudos