Hishiro
Posts: 4
Joined: Fri Jul 07, 2023 4:47 pm

A program run as part of the setup did not finish as expected

Hi guys.
I have a question when create a installer file.
In fole App :
----x32 folder
----x64 folder
----Fix SN v8.reg
----HASP.exe
----Install.cmd
----key40096
----lectralic.exe
----remove.cmd
In x32 folder :
----_install.cmd
----devcon.exe
----Notestmode.cat
----Notestmode.inf
----Notestmode.sys
----PathLservrc64.reg
----remove.reg

In x64 folder :
----_install.cmd
----devcon.exe
----Notestmode.cat
----Notestmode.inf
----Notestmode.sys
----PathLservrc64.reg
----remove.reg

code by install.cmd

Code: Select all

HASP.exe
@regedit /s key40096
lectralic.exe
echo ProgramFiles(x86) dir:
if not exist "%systemdrive%\Program Files (x86)" (
  cd x32  
    call _install.cmd
) else (
  cd x64
    call _install.cmd
)
call remove.cmd
exit
Code by _install.cmd

Code: Select all

@echo off
echo.
echo Install Emulator Computer x64	
@devcon remove root\Notestmode
@devcon install Notestmode.inf root\Notestmode
exit
I wait after advanced installer extract file in C:\Program Files\HishiroCAD
and run file HASP.exe, install.cmd and remove.cmd in order.
1. HASP.exe
2. Install.cmd
3. Remove.cmd

I create custome action : Launch file [#Install.cmd].

But i get error messenger when installer Notestmode.inf on win 10. Win 7 OK.
Image

Why ? Pls help me .
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: A program run as part of the setup did not finish as expected

Hello,

Please make sure the custom actions are scheduled after the "Add resources" action group and with their "Execution Time" set to "When the system is being modified (deferred)".

Additionally, if your custom action requires admin privileges, make sure to have the "Run under the local system account with full privileges (no impersonation)" option enabled.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Hishiro
Posts: 4
Joined: Fri Jul 07, 2023 4:47 pm

Re: A program run as part of the setup did not finish as expected

Catalin wrote: Wed Oct 04, 2023 3:07 pm Hello,

Please make sure the custom actions are scheduled after the "Add resources" action group and with their "Execution Time" set to "When the system is being modified (deferred)".

Additionally, if your custom action requires admin privileges, make sure to have the "Run under the local system account with full privileges (no impersonation)" option enabled.

Hope this helps!

Best regards,
Catalin
I've definitely added files and folders.
Pic 1, 2, 3
Image
Image 1
Image
Image 2
Image
Image 3
set execution time :
if i custome action for image 4. I get 1500 error and error the same my first question. and then i set action for image 5 . execution time is immediately. Can't set up anything else
Image
Image 4
Image
Image 5

i want it setup hasp, install.cmd and remove.cmd in order.

If i set action for image 6. I cant set executiopn time.
Image

Is there a way I can set up: If win x64, it will run _install.exe in the x64 directory and vice versa?
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: A program run as part of the setup did not finish as expected

Hello,

Please note that the files are copied on the machine during the "Add resources" action group, on deferred.

This is the reason why the custom actions should be added at that point.
Is there a way I can set up: If win x64, it will run _install.exe in the x64 directory and vice versa?
Regarding this, we can achieve that by having two custom actions and conditioning them using the VersionNT64 property.

The condition would look like this:

Code: Select all

NOT VersionNT64 
for 32-bit one and:

Code: Select all

VersionNT64
for the 64-bit one.

Now, regarding the error 1500 - "Another installation is already in progress".

The EXE you are trying to launch is actually an installer.

Now, please note that there's a limitation regarding two installation happening at the same time on the same machine - it is prohibited by the OS.

What you could do is the following:

- add the exe as a prerequisite in the "Prerequisites" page

- launch the batch files (schedule the custom actions after the "Add resources" as we've previously discussed)

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”