MSI Install

Got a problem you cannot solve? Try here.
SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

MSI Install

Postby SITL » Fri Nov 25, 2016 6:07 am

Dear Francesco Toscano,

I used to generate .exe, it was OK till now.

I have some basic questions regarding msi silent install.

In my build settings, i have Choosed to generate myproduct.msi.
Question 1: I double clicked myproduct.msi, nothing happens.
Question 2: Using Silent install, I got the Windows message -
"Do you want to allow the program from unknown publisher ....." ?
I clicked on "YES" That's it, Nothing happens

Appreciate your guidelines

Regards
SITL

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI Install

Postby FrancescoT » Fri Nov 25, 2016 11:40 am

Dear Sitl,

regarding the msi package, please have a look at the following thread.
https://www.installaware.com/forums/viewtopic.php?f=2&t=10772&p=41102&hilit=msiexec#p41102

Question 2:

Running the msi or a setup.exe in silent mode, of course only the elevation prompt (... the dialog) gets displayed.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: MSI Install

Postby SITL » Mon Nov 28, 2016 1:17 am

Dear Francesco Toscano,

Thanks,
With your help, I'm almost done with creating .exe.
Great !

For Silent install, I'm trying to read an .ini file.
Problem is variable are not set properly. This is how my .ini file looks

[Information]
USERNAME=MyName
COMPANYNAME=ABC Company
INSTALLATION=Site/Network/Standalone
LICENSEFILE=FilePath
SERIALNUMBER=885100001
INSTALLPATH=FolderPath


In the beginning, I read this file and set all the script variable necessary for Silent install.
I'm sure you already have something for this, Please point me to appropriate link.

Regards
SITL

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI Install

Postby FrancescoT » Mon Nov 28, 2016 1:00 pm

It's really simple and if you have an INI file;

Code: Select all

Set Variable MY_VAR to
Get INI <Path to my file....>, [Information] USERNAME Value into Variable MY_VAR

Code: Select all

~InstallAware Clipboard Data~
~Get INI File Settings~
~{1BC75FF0-5561-4536-AA87-13999660A07A}~
~MY_VAR~
~<Path to my file....>~
~Information~
~USERNAME~
~Set Variable~
~{60E6D75B-359D-469D-892B-5A3BD1155C94}~
~MY_VAR$MYAH$MYAH$FALSE~
~~


Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: MSI Install

Postby SITL » Tue Nov 29, 2016 1:52 am

Dear Francesco Toscano,

Oh ! yaa..
I tried that :D
Thanks
SITL

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: MSI Install

Postby SITL » Thu Dec 01, 2016 5:12 am

Dear Francesco Toscano,

Little confusion here.
Within my script,
CASE I :
I have SILENT=TRUE.
IF SILENT equals TRUE
{
set all the necessary variable from ini file. No problem here.
}

I build my product and No issue, everything is fine with the following comands
msiexec.exe /i "C:\mypackage.msi" CMDLINE="SILENT=TRUE"

or

msiexec.exe /i "C:\mypackage.msi" CMDLINE="/s"

NOTE : I had deliberately set SILENT=TRUE above, I should not do that.

CASE II:
I do not have SILENT=TRUE
then IF SILENT equals TRUE block is not executed.
Any hint ? why the variable SILENT is not set to TRUE through Command line execution.

I don't get any error, installation won't happen.
which means necessary variable are not set.
those variable are set within IF SILENT equals TRUE block.

Appreciate your suggestion.
Regards
SITL

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI Install

Postby FrancescoT » Thu Dec 01, 2016 11:58 am

Dear SITL,

I can assure you that any value passed from command line gets correctly assigned to the respective variable.

By the way, if the setup dialogs do not get displayed (the "setup dialogs interview" only when CMDLINE="SILENT=TRUE") .... this obviously means that SILENT value passed from command line has been assigned correctly.

I suggest you to carefully check your script code, the problem is in the code surely.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: MSI Install

Postby SITL » Fri Dec 02, 2016 5:47 am

Dear Francesco Toscano,

How do i debug command line silent installation ?
I do not know what's happening.

My command looks like this
F:\InstWork\Myprod\Release\Single>msiexec /i MyProd.msi CMDLINE="SILENT=TRUE"

If i Run thro' InstallAware Development Environment i.e., by clicking Run.
It installs properly without any User interaction, But if i run thro' command line nothing is happening.

Suggestion ? Debugging tips please.,
Regards
SITL

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI Install

Postby FrancescoT » Fri Dec 02, 2016 1:31 pm

... just store the values of your variables in a text file (Write to text File command) and/or write something to a text file when a specific condition is TRUE/FALSE.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: MSI Install

Postby SITL » Mon Dec 05, 2016 6:10 am

Dear Francesco Toscano,
Thanks,
I'm sorry, Puzzled :(
I'm writing values at all stages. Variable values are fine.
Everything looks OK, Except After Apply install
$SUCCESS$ is ERROR
$LASTERROR$ is Fatal error during installation


For your reference, I write the issue again here..
command line execution
F:\InstWork\Myprod\Release\Single>msiexec /i MyProd.msi CMDLINE="SILENT=TRUE"
Problem - Fatal error during installation
But, if i Run thro' InstallAware Development Environment i.e., by clicking Run , Everything is fine.


--------------------- New block Start -----------------------------------
Just for our understanding I wold like to mention one issue (I'm living with it because it's not a show stopper ).

I'm almost done with creating .exe.
During that development process (creating .exe) When i install by clicking Run, No issues.
But when i try to install by clicking Debug, After Apply Install i used to get Fatal error during installation.
So i managed by not going till Apply install and by watching variables and installing using Run command.
--------------New block Ends -------------------------------------

So with all this, My script seems to be OK
Is it something to do with permissions ?
Is there any variables where i can exclusively set highest level rights (Admin rights) ?
But I'm already having admin rights.
Confused sir ???

Regards
SITL

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI Install

Postby FrancescoT » Mon Dec 05, 2016 2:05 pm

Dear SITL,

you should post "at least" a very "VERY" minimal project that replicates the issue. By the information you shared, I am really confused about which is your effective target and how you are trying to implement it.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: MSI Install

Postby SITL » Tue Dec 20, 2016 7:30 am

Dear Francesco,

Thanks for your support.
Created a small project and that worked.

So back to my project, I removed all merge modules.
Now installation and uninstallation is fine.

Any hints ?
So .. i'm planning to add all merge modules one by one.

Regards
SITL

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: MSI Install

Postby SITL » Wed Dec 28, 2016 2:24 am

Dear Francesco,

Thanks for your support.
Sorry, it may not sound good, But I'm not getting proper directory values.
Lets us say ...
I have created the Myproduct.msi.
User is going to keep this Myproduct.msi in a directory F:\MyInstaller
Also Myproduct.ini in the same folder.

So within my script how do i refer to this directory F:\MyInstaller ?
I do not know folder name.

My silent installer goint to read this Myproduct.ini
So i need the folder name where my msi is residing.
I tried couple of predefined variables (MSIFILE, SFXFILE, SFXPATH, SETUPPATH etc),
but none of them are giving me correct folder name.
Please advice.

Regards
SITL

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: MSI Install

Postby FrancescoT » Wed Dec 28, 2016 12:57 pm

Dear SITL,

I really don't know how did you test the value returned by the SETUPPATH ... but this is the one that can be to detect the outermost folder containing the executable program or setup database that initiated the installation. Supposing of course, that you are running a Single Compressed EXE/MSI.

As you can see by the attached screen-shot, I tried to run "myproject.msi" from the desktop and the SETUPPATH holds the expected desktop path, for the current user context who executed the package.
SETUPPATH.png
SETUPPATH.png (285.59 KiB) Viewed 8065 times

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: MSI Install

Postby SITL » Thu Dec 29, 2016 6:32 am

Dear Francisco,

Thank you very much. Great !
Just to update you.
I'm almost done. I think all the areas are covered.
(except few minor known issues ).

Appreciate your help.
Regards
SITL


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 35 guests