"program could not be run" - Advanced Installer Community
jonasnielsen
Posts: 7
Joined: Wed Apr 06, 2016 9:32 am

"program could not be run"

Problem Description
Our installer package is failing install only on Windows 10. Installation works on Windows 7. The problem appear to be related to custom actions, but this is surprising since the installation was working previously. From the log information we cannot track down the problem.

See attached screen shot for error. Log information and build files have been sent to support at advancedinstaller dot com.

How to reproduce
Build and install the aip shared via e-mail.

Environment
Windows 10 running Advanced Installer 12.8 (same issue with version 11)
Attachments
install error.png
install error.png (54.37 KiB) Viewed 6179 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: "program could not be run"

Hi and welcome to Advanced Installer forums.

Looking over the log file that you sent I noticed that the "InstallWebMCodecs" custom action is the one that fails during the installation. Also, in your project I noticed that you set the "Run as administrator" option in the "Install Parameters" page and for that custom action, too. Setting that option in both places sometimes causes problems.

Can you uncheck the "Run as administrator" option that is set for the custom action and see if the problem persists? You can also try to check the "Run under the LocalSystem account with full privileges (no impersonation)" option instead and see if it works.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jonasnielsen
Posts: 7
Joined: Wed Apr 06, 2016 9:32 am

Re: "program could not be run"

Thank you for the quick response, Eusebiu.

I tried both of your suggestions without luck. First configuring all custom actions not to run as administrator. Then enabling Run under the LocalSystem. The errors seems to be the same with installation failing at "InstallWebMCodecs".

I noticed that if I remove InstallWebMCodecs the installation fails at the proceeding custom action ("InstallByteScout").

What else could we try?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: "program could not be run"

Hi,

Can you try and see if those BAT files run successfully outside Advanced Installer on Windows 10 (i.e. from an elevated Command Prompt)?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jonasnielsen
Posts: 7
Joined: Wed Apr 06, 2016 9:32 am

Re: "program could not be run"

Hi Eusebiu,

The BAT files appear to run fine:

ByteScout:

Code: Select all

C:\Redistributable>InstallAsActiveX.bat
------------ x86 Windows installation ------------------------



copying dll and tlb

copying System32\BytescoutScreenCapturingFilter.dll
        1 file(s) copied.
copying System32\BytescoutScreenCapturing.dll
        1 file(s) copied.
copying System32\BytescoutVideoMixerFilter.dll
        1 file(s) copied.

register dll files

registering System32\BytescoutScreenCapturingFilter.dll
registering System32\BytescoutScreenCapturing.dll
registering System32\BytescoutVideoMixerFilter.dll
------------ x64 Windows installation ------------------------
WebMCodecs:

Code: Select all

C:\Redistributable\WebM>InstallWebMCodecs.bat
------------ x86 Windows installation ------------------------



copying dll and tlb

copying System32\vp8encoder.dll
        1 file(s) copied.
copying System32\webmmux.dll
        1 file(s) copied.
copying System32\dsfVorbisEncoder.dll
        1 file(s) copied.
copying System32\RGBtoYUV420Filter.dll
        1 file(s) copied.

register dll files

registering System32\vp8encoder.dll
registering System32\webmmux.dll
registering System32\dsfVorbisEncoder.dll
registering System32\RGBtoYUV420Filter.dll
------------ x64 Windows installation ------------------------
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: "program could not be run"

Hi,

I tested the package that you sent to me over the e-mail on a clean Windows 10 machine and it installed without errors. Can you reproduce the problem on multiple Windows 10 clean machines?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jonasnielsen
Posts: 7
Joined: Wed Apr 06, 2016 9:32 am

Re: "program could not be run"

Eusebiu,

It appears not to be an issue for all machines, but it is obviously concerning still. Is there a way to further debug?

Bet,
Jonas
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: "program could not be run"

Hi Jonas,

The problem might be related only to that specific machine if something is corrupted on it. You can try to add some log messages to the BAT custom actions that may help you debug them.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jonasnielsen
Posts: 7
Joined: Wed Apr 06, 2016 9:32 am

Re: "program could not be run"

Hi Eusebiu,

I'm not sure how that would help. Does the log information from the .bat files that I posted previously in this thread not confirm that they execute successfully outside of Advanced Installer?

Best,
Jonas
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: "program could not be run"

Hi Jonas,

Yes, the log confirms that the BAT files were executed correctly outside Advanced Installer, but you can try to catch the error that is encountered when the files are executed from the Advanced Installer package. As I mentioned before, the BAT files were executed correctly from the Advanced Installer package too, on my Windows 10 machine.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jonasnielsen
Posts: 7
Joined: Wed Apr 06, 2016 9:32 am

Re: "program could not be run"

Hi Eusebiu,

Sorry to loop you back to this thread, but we really need your assistance.

We've attempted configuring this .bat file with Advanced Installer, most recently with Advanced Installer 13.0, but it fails consistently on both Windows 7 and Windows 10.

The .bat file runs smoothly when executed from Command Prompt (as administrator):

Code: Select all

Redistributable>InstallAsActiveX
------------ x86 Windows installation ------------------------

copying dll and tlb

copying System32\BytescoutScreenCapturingFilter.dll
        1 file(s) copied.
copying System32\BytescoutScreenCapturing.dll
        1 file(s) copied.
copying System32\BytescoutVideoMixerFilter.dll
        1 file(s) copied.

register dll files

registering System32\BytescoutScreenCapturingFilter.dll
registering System32\BytescoutScreenCapturing.dll
registering System32\BytescoutVideoMixerFilter.dll
------------ x64 Windows installation ------------------------
The .bat file itself is fairly simple (pasted below). How do we debug where, when run with Advanced Installer, the installation breaks down?

Thanks,
Jonas

.bat file:

Code: Select all

@echo off

REM --------------------------------------------------------------------------------------
REM - this batch installs the SDK
REM - for both x86, x64 and x86 emulation modes                                          -
REM - on Windows Vista/7/8/2008/2012 this batch should be run in "As Administrator" mode -
REM --------------------------------------------------------------------------------------


REM change current directory (required for Vista and higher)
@setlocal enableextensions
@cd /d "%~dp0"

SET DLLFILE1=BytescoutScreenCapturingFilter.dll
SET DLLFILE2=BytescoutScreenCapturing.dll
SET DLLFILE3=BytescoutVideoMixerFilter.dll


SET ERROR=0

ECHO ------------ x86 Windows installation ------------------------

IF NOT EXIST "%systemroot%\SYSWOW64\" (

ECHO.
REM pure x86 mode 
ECHO. 

ECHO.
ECHO copying dll and tlb
ECHO.

ECHO copying System32\%DLLFILE1%
copy "x86\%DLLFILE1%" "%windir%\System32\%DLLFILE1%"

ECHO copying System32\%DLLFILE2%
copy "x86\%DLLFILE2%" "%windir%\System32\%DLLFILE2%"

ECHO copying System32\%DLLFILE3%
copy "x86\%DLLFILE3%" "%windir%\System32\%DLLFILE3%"


ECHO.
ECHO register dll files
ECHO.

ECHO registering System32\%DLLFILE1%
"%systemroot%\system32\regsvr32.exe" /s "%windir%\System32\%DLLFILE1%"
ECHO registering System32\%DLLFILE2%
"%systemroot%\system32\regsvr32.exe" /s "%windir%\System32\%DLLFILE2%"
ECHO registering System32\%DLLFILE3%
"%systemroot%\system32\regsvr32.exe" /s "%windir%\System32\%DLLFILE3%"

)


ECHO ------------ x64 Windows installation ------------------------

REM check if we are on Windows x64 
IF EXIST "%systemroot%\SYSWOW64\" (


ECHO.
ECHO x64 native mode and x86 emulation modes installations
ECHO.

REM --- x86 on x64
ECHO.
ECHO 1 - x86 emulation mode on x64
ECHO.

ECHO copying SYSWOW64\%DLLFILE1%
copy "x86\%DLLFILE1%" "%systemroot%\SYSWOW64\%DLLFILE1%"
ECHO copying SYSWOW64\%DLLFILE2%
copy "x86\%DLLFILE2%" "%systemroot%\SYSWOW64\%DLLFILE2%"
ECHO copying SYSWOW64\%DLLFILE3%
copy "x86\%DLLFILE3%" "%systemroot%\SYSWOW64\%DLLFILE3%"


ECHO.
ECHO register dll files
ECHO.

ECHO registering SYSWOW64\%DLLFILE1%
"%systemroot%\SYSWOW64\regsvr32.exe" /s "%systemroot%\SYSWOW64\%DLLFILE1%"
ECHO registering SYSWOW64\%DLLFILE2%
"%systemroot%\SYSWOW64\regsvr32.exe" /s "%systemroot%\SYSWOW64\%DLLFILE2%"
ECHO registering SYSWOW64\%DLLFILE3%
"%systemroot%\SYSWOW64\regsvr32.exe" /s "%systemroot%\SYSWOW64\%DLLFILE3%"

REM --- x64 mode

ECHO.
ECHO 2 - x64 native mode on x64
ECHO.


REM copy and register files if running in x86 mode (the batch is running in x86 mode)
REM and we use "sysnative" to access x64 system32 folder 

IF EXIST "%systemroot%\sysnative\cmd.exe" (

REM we are calling cmd.exe and regsvr32.exe from "sysnative" folder (special "alias" available when running x86 batch on x64)
REM although we call from "sysnative" folder but we should pass "system32" in the command line parameters to these utilities

ECHO copying sysnative\%DLLFILE1%"
"%systemroot%\sysnative\cmd.exe" /c copy "x64\%DLLFILE1%" "%systemroot%\system32\%DLLFILE1%"
ECHO copying sysnative\%DLLFILE2%"
"%systemroot%\sysnative\cmd.exe" /c copy "x64\%DLLFILE2%" "%systemroot%\system32\%DLLFILE2%"
ECHO copying sysnative\%DLLFILE3%"
"%systemroot%\sysnative\cmd.exe" /c copy "x64\%DLLFILE3%" "%systemroot%\system32\%DLLFILE3%"

REM register dll files

ECHO registering sysnative\%DLLFILE1%"
"%systemroot%\sysnative\regsvr32.exe" /s "%systemroot%\system32\%DLLFILE1%"
ECHO registering sysnative\%DLLFILE2%"
"%systemroot%\sysnative\regsvr32.exe" /s "%systemroot%\system32\%DLLFILE2%"
ECHO registering sysnative\%DLLFILE3%"
"%systemroot%\sysnative\regsvr32.exe" /s "%systemroot%\system32\%DLLFILE3%"

) ELSE (

REM copy and register files if running in x64 mode (the batch is running in x64 mode)
REM and we use "system32" to access x64 system32 folder (sysnative alias works when the batch runs in x86 mode only)

ECHO copying system32\%DLLFILE1%"
"%systemroot%\system32\cmd.exe" /c copy "x64\%DLLFILE1%" "%systemroot%\system32\%DLLFILE1%"
ECHO copying system32\%DLLFILE2%"
"%systemroot%\system32\cmd.exe" /c copy "x64\%DLLFILE2%" "%systemroot%\system32\%DLLFILE2%"
ECHO copying system32\%DLLFILE3%"
"%systemroot%\system32\cmd.exe" /c copy "x64\%DLLFILE3%" "%systemroot%\system32\%DLLFILE3%"

REM register dll files

ECHO registering system32\%DLLFILE1%"
"%systemroot%\system32\regsvr32.exe" /s "%systemroot%\system32\%DLLFILE1%"
ECHO registering system32\%DLLFILE2%"
"%systemroot%\system32\regsvr32.exe" /s "%systemroot%\system32\%DLLFILE2%"
ECHO registering system32\%DLLFILE3%"
"%systemroot%\system32\regsvr32.exe" /s "%systemroot%\system32\%DLLFILE3%"

)




)


if %ERROR% EQU 0 goto :EOF

:SHOWERROR

echo .
echo Error installing the SDK as ActiveX object: %ERROR%
echo .

REM Exit %ERROR%

:EOF
jonasnielsen
Posts: 7
Joined: Wed Apr 06, 2016 9:32 am

Re: "program could not be run"

Hi Eusebiu,

Quick update: the installation does not appear to fail with "Use 64-bit Launcher" disabled. Any idea why that could be?

Best,
Jonas
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: "program could not be run"

Hi Jonas,

I'm not sure why the BAT file fails when the "Use 64-bit Launcher" option is enabled. Does it fail on 32-bit Operating Systems only or it fails on 64-bit Operating Systems, too?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”