- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
23-07-24 01:34 PM
Hello,
I want to execute with Blue prism a powershell script by using the CMD.
It works when I launch the script with the CMD manually. But it doesn't work when I want to execute the script in CMD with Blue prism.
I have the error message :"An attempt was made to load a program with an incorrect format. (Exception from
HRESULT: 0x8007000B)".
Can someone help me, please ?
Regards
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-07-24 09:51 AM - edited 25-07-24 09:52 AM
Try placing the required reference DLL files in the Blue Prism folder. By default, this is where the Blue Prism Library DLL files are referenced.
C:\Program Files\Blue Prism Limited\Blue Prism Automate\
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
23-07-24 05:04 PM
We'll need more information on what you're trying to do. Google suggests that error code relates to a 32/64bit clash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-07-24 07:54 AM
The error HRESULT: 0x8007000B typically indicates a mismatch between the bitness of the application you're trying to run and the operating system. For example, trying to run a 32-bit application on a 64-bit system, or vice versa.
Here are some steps to troubleshoot and fix this issue:
1. Ensure Matching Bitness
Verify that the PowerShell script and any dependent modules or DLLs are compiled for the same architecture (either 32-bit or 64-bit). If you're on a 64-bit system, ensure you're using the 64-bit version of PowerShell.
2. Run 64-bit PowerShell
By default, the Command Prompt might be running the 32-bit version of PowerShell. To explicitly run the 64-bit version, you can use the full path to the 64-bit PowerShell executable:
cmd
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File "C:\path\to\your\script.ps1"
For the 32-bit version, you can use:
cmd
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -File "C:\path\to\your\script.ps1"
3. Check Script and Dependencies
Ensure that any DLLs or external dependencies your PowerShell script uses are also the correct bitness. Mixing 32-bit and 64-bit binaries can cause this error.
4. Check Environment Variables
Sometimes, environment variables might point to the incorrect version of a required library. Make sure all relevant environment variables are set correctly for the bitness you're using.
5. Recompile Dependencies
If you have control over the source of any DLLs or external dependencies, recompile them for the correct architecture.
Example Command
Here's how you can run your script using the 64-bit version of PowerShell from the Command Prompt:
cmd
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\path\to\your\script.ps1"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-07-24 09:11 AM
Hi,
I have a powershell script which use a some DDLs from an application. It works when I execute the script manually with a CMD.
But it doesn't work when I launched it with Blue Prism with AutomateC.exe (Start Process) and I have the error message : "An attempt was made to load a program with an incorrect format. (Exception from
HRESULT: 0x8007000B)".
Other important information : the Blue Prism is install in C: drive but the DLLs are in another drive K:.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-07-24 09:51 AM - edited 25-07-24 09:52 AM
Try placing the required reference DLL files in the Blue Prism folder. By default, this is where the Blue Prism Library DLL files are referenced.
C:\Program Files\Blue Prism Limited\Blue Prism Automate\