Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell error: Module bin could not be loaded #60

Closed
QGtKMlLz opened this issue Nov 18, 2023 · 3 comments
Closed

Powershell error: Module bin could not be loaded #60

QGtKMlLz opened this issue Nov 18, 2023 · 3 comments

Comments

@QGtKMlLz
Copy link

QGtKMlLz commented Nov 18, 2023

I have tried:

  • Using Medicat_installer.exe & medicat_installer.bat
    • ran each from explorer with 'Run as Administrator'
    • run from admin instances of cmd, powershell, and Powershell 7.

I found if I removed the call to a 2nd script for my powershell profile it no longer gave the error.
This is the line that is in my "C:\Users\a\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" profile.
. "C:\Users\a\Documents\WindowsPowerShell\Powershell-WinDefault\Microsoft.PowerShell_profile.ps1"
Commenting that out and then running it goes to the menu. I've attached a screenshot of the powershell error; perhaps this is the same issue as issue #23 ?

See attached:
Untitled2

@mon5termatt
Copy link
Owner

Strange, its trying to load this file https://github.com/mon5termatt/medicat_installer/blob/main/translate/licence.ps1

but that file doesnt try to import anything, just read the file from the bin folder.

@thegraffix
Copy link

I think that using powershell.exe -NoProfile -Command would make sense in Medicat_Installer.bat -- the potential for interference and conflict is present when a custom profile.ps1 is loaded, and some profiles can take seconds (or longer) to load, so each powershell.exe call can add up.

Also - is there a reason that Medicat_Installer.bat is setting the execution policy for the entire machine rather than using powershell.exe -ExecutionPolicy Bypass for each powershell command? Would you consider capturing the current execution policy in the .BAT script (using either a foreach loop or reg.exe /query) then resetting it back to its original state when the installer finishes?

@mon5termatt
Copy link
Owner

Im working on trying to redo the entire thing soon. as for setting execution policy. i got tired of errors when trying to run shit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants