rema
Posts: 2
Joined: Fri Jan 18, 2013 10:34 am

How run existing file

Hello,
sorry for my question, I am new with Advanced Installer.
I need build MSI, which only run existing EXE located in path %PROGRAMFILES%\Miktex 2.9\miktex\binfile, with some parameters because of refresh database.
I need run this command: "%PROGRAMFILES%\Miktex 2.9\miktex\bin\initexmf.exe" --admin --update-fndb.
And it has to work on Windows XP (where is Miktex installed in Program Files) and Windows 7 (where is Miktex installed in Program Files (x86).
Thanks for help :-)
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: How run existing file

Hi and welcome to Advanced Installer forum.

Thank you for your interest in Advanced Installer.

In Advanced Installer the [ProgramFilesFolder] property is resolved to "Program Files" folder for 32-bit machines and to "Program Files (x86)" folder 64-bit machines.

Let us know if it helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rema
Posts: 2
Joined: Fri Jan 18, 2013 10:34 am

Re: How run existing file

Thanks for reply.

And how can i only execute some existing exe file with parameters?

I need to run this command: C:\PROGRAM FILES\Miktex 2.9\initexmf.exe" --admin --update-fndb

Thanks
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: How run existing file

Hi,

In order to achieve this you can go in the Custom Actions page and create a "Launch file or open URL" custom action with the following settings:
  • Command: "[ProgramFilesFolder]Miktex 2.9\initexmf.exe" --admin --update-fndb
    Execution Time: check the "When the system is being modified (deferred)" radio button
    Execution Options: check all three checkboxes
    Execution Stage Conditions: check only "Install" (if you want this custom action to run only on install)
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”