Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

general MSI help needed


7 replies to this topic

Asat232

Asat232
  • Full Members
  • 5 posts

Posted 07 June 2008 - 15:21

I used before Inno Setup compiler to create installation packages but now I need to use MSI.
Visual Studio 2008 may create deployment project where I ‘m able to assign visually a lot of useful things such as dialogs to use, files, custom actions and so on. After I created MSI, orca can be used to edit MSI. That is all great.
But our project is very complicated and I need full control over its installation
For example, I need on per file basement have options to replace file with the same version or not, to remove it on uninstall or not, to replace it on restart or immediately or not and so on.
Next thing I need to do that is to run script or executable that has full access to MSI properties to run some configuration utilities which are part of our project. As a result of this server side installation must be produced client MSI to deploy it on clients.
:
What tools are more suitable to achieve my goals?
I looked through InstallShield and first glance opinion: its complicated, some pleasant graphical features but I doubt that I may gain the full control over the process of installation with it helps.

How can I do that the changes in MSI that I did by orca will not be lost after next run of VS deployment project?
Where can I find an open source of VS deployment project which can be an example of using Windows Installer?

All advices will be helpful for me.
Thanks a lot for your help.



VBScab

VBScab
  • Full Members
  • 436 posts

Posted 09 June 2008 - 09:32

There are a few freeware and shareware tools available for MSI authoring but few, if any, match the breadth of capabilities of those from the two main players, Wise and InstallShield. I presume you pride yourselves on the quality of your products so why compromise that by trying to save a few pennies on your packaging solution? It's true that these tools seem complex but they're not that different to VS in that, day-to-day, you'll probably use less than 20% of their capabilities.

Bite the bullet and invest in a proper tool. First, though:

- acquaint yourself FULLY with Windows Installer technology on MSDN
- spend a few days browsing here, the forums on AppDeploy.Com, the Wise forums on Altiris.com and the InstallShield forums on community.installshield.com. They will give you an idea of the day-to-day issues packagers - and, in particular RE-packagers - face with vendor's setup programs.
- juice.altiris.com is another good resource
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

marf

marf
  • Full Members
  • 2 posts

Posted 19 May 2009 - 14:57

I've also a question about installing MSI with Inno setup. I want to make that the user can chose the installation folder for the MSI installation, instead of using the installation folder which is specified in the MSI package. I tried to do this in the following way. But it installs the program still in the default folder of the MSI package. mad.gif



procedure InitializeWizard;
var
Page: TInputDirWizardPage;
DataDir: String;
begin
Page := CreateInputDirPage(wpWelcome, 'MyProgram Installation folder', 'Select MyProgram Installation folder:','', False, 'NewDatadir');
Page.Add('');
Page.Values[0] := ExpandConstant('C:\{pf}\MyCompany\Myprogram v1');
DataDir := Page.Values[0];
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode : Integer;
begin
if CurStep=ssPostInstall then
begin
ExtractTemporaryFile('MyProgram.msi');
Exec('msiexec',ExpandConstant('/i "{tmp}\MyProgram.msi" /qb INSTALLDIR="DataDir" ALLUSERS=2'),'', SW_SHOW, ewWaitUntilTerminated, ResultCode);
end;
end;


Has anybody a suggestion?

Edited by marf, 19 May 2009 - 15:27.


VBScab

VBScab
  • Full Members
  • 436 posts

Posted 19 May 2009 - 15:18

Your INSTALLDIR entry is being read verbatim as "DataDir". Since that directory doesn't exist (it doesn't even have a drive letter) the engine ignores it. I don't know Inno's syntax at all but, from what you've posted, I'd *guess* you need:
CODE
Exec('msiexec',ExpandConstant('/i "{tmp}\MyProgram.msi" /qb INSTALLDIR="{DataDir}" ALLUSERS=2'),'', SW_SHOW,

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

marf

marf
  • Full Members
  • 2 posts

Posted 25 May 2009 - 08:54

I tried it without quotes, but it doesn't help. Somebody another suggestion?

Is it possible that the MSI package doesn't allow to change the installation folder?

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 26 May 2009 - 14:00

Unlikely.

Given that the name of the command ExpandConstant is in the singular, how about:
CODE
Exec('msiexec',ExpandConstant('/i "{tmp}\MyProgram.msi" /qb INSTALLDIR="')ExpandConstant('{DataDir}" ALLUSERS=2'),'', SW_SHOW,


Again, I'm not sure of Inno's syntax but I think you can see what I'm driving at.

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 May 2009 - 09:17

QUOTE (marf @ 2009-05-25 08:54)
I tried it without quotes, but it doesn't help. Somebody another suggestion?

Did you also try it with the curly braces: {DataDir}

Did you verify that INSTALLDIR is actually the property name that the msi packages uses for its destination folder? Some packages are using TARGETDIR instead, and the setup author could chose any other name.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 May 2009 - 09:20

QUOTE (marf @ 2009-05-25 08:54)
Is it possible that the MSI package doesn't allow to change the installation folder?

Yes, it's possible to create a msi package that doesn't accept setting the destination directory on the command line, or that resets it later.

Are you testing this on Vista? Try on XP.