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

Installing an application as second administrator


11 replies to this topic

bogdan.carjac

bogdan.carjac
  • Full Members
  • 24 posts

Posted 18 January 2007 - 17:37

Hello,

I have a doubt, I'm not sure how it should be a normal behaviour.
First, let me describe the scenario.
I have installed an aplication (doesn't metter what) using an administrator account, with "only for me option" checked in Customer Information Page .
- Log off, and log on with a second administrator user and "only for me" and "install for all users" options are not available anymore !

Is this normal? I mean generally, for any application, is it ok to behave like this?

Bogdan

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 January 2007 - 20:13

It's the default behaviour with InstallShield, but from the top of my head I'm not sure why they did it this way.

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 21 January 2007 - 01:54

Windows Installer doesn't support that scenario. Once a package is installed for one user, it can no longer be installed for all users.


bogdan.carjac

bogdan.carjac
  • Full Members
  • 24 posts

Posted 22 January 2007 - 09:34

Hello,

First of all, thank you very much for your reply.
My problem, is related to a bug reported to me by QA department.
I'm using InstallShield X 10.0 to develop the installer for my product.
I have installed my product ( I believe it doesn't metter which one) using an administrator account, with "only for me option".
- Log Off the curent user and log on with the second administrator account.
- I run Setup.exe again from the kit and I observed that the "only for me" and "install for all users" options are not available anymore, and I finished the install.
In the curent stage the product should be available only for the 2 administrator
accounts.
Log Off and log on with a normal user account.

Expected:
The product is not available for this user.

Actual:
The product is available for the user.

Do you have any idea if this is normal, and if QA is right, how can I fix this bug? Which is the option (which variable ) I have to modify and how in order for this installation to be availlable only for those 2 admin users, and not for the normal user?
Thanks!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 January 2007 - 21:32

QUOTE (Zweitze @ 2007-01-21 02:54)
Windows Installer doesn't support that scenario. Once a package is installed for one user, it can no longer be installed for all users.

Is that written somewhere? From the top of my head I thought that a product could be installed once for each context, which means: once for a specific user, and once for the machine.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 January 2007 - 21:34

bogdan.carjac: there's a condition on the radio button groupo that makes it invisible if the product is already installed. You could change it in the dialog editor, but first you and I should understand why InstallShield added this condition. Maybe Zweitze is right and it would crash your setup.

bogdan.carjac

bogdan.carjac
  • Full Members
  • 24 posts

Posted 23 January 2007 - 08:39

Hi all,

Regarding the radio group buttons within Customer Information dialog, there are 3 conditions with
Hide = NOT Privileged ( which means buttons are hidden if user is not having admin rights)
Hide = ProductState > 0 ( which returns the install state information for a product)
Hide = Version9X ( returns the version no. for Win95/Win98/Win ME).

I believe ProductState is important in this context.
All I want to achieve, is radio group buttons to be present when installing the application logged as second admin (so after was already installed as first admin with "only for me " option.
Maybe deleting the condition "Hide = ProductState > 0 " would solve it... I'll try it.

Thank you a lot for your answers!

Cheers,
Bogdan.

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 23 January 2007 - 10:46

QUOTE (Stefan Krueger @ 2007-01-22 20:32)
QUOTE (Zweitze @ 2007-01-21 02:54)
Windows Installer doesn't support that scenario. Once a package is installed for one user, it can no longer be installed for all users.

Is that written somewhere? From the top of my head I thought that a product could be installed once for each context, which means: once for a specific user, and once for the machine.


I derived this information from MsiGetProductState(): A product is installed for the current user, all users, but never both.
It would be weird when a user has two installations of the same product, with different features.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 January 2007 - 15:28

QUOTE (Zweitze @ 2007-01-23 11:46)
I derived this information from MsiGetProductState(): A product is installed for the current user, all users, but never both.

Can't find this information right now. Do you have a link?

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 23 January 2007 - 22:02

My mistake - MsiQueryProductState()
http://msdn2.microso...y/aa370363.aspx

The returned INSTALLSTATE_XYZ values are like 1,2 3 etc., meaning that they can't be OR-ed.
Therefore, if an application could be installed twice (for active user AND all users), this function could give a complete result.

BTW The internal protection of Windows Installer is not bulletproof. I once experimented with advertizing sequences (Msiexec /jm combined with Msiexec /ju) and managed to destroy a profile completely, even Msizap.exe could not fix the problems. This was Windows Installer 2.0. In normal installations you get a non-descriptive error (I believe ERROR_INSTALL_PACKAGE_REJECTED, could be wrong though - it's been years ago).


bogdan.carjac

bogdan.carjac
  • Full Members
  • 24 posts

Posted 24 January 2007 - 09:06

I deleted the condition HIDE -> ProductState >0 (from Customer Information dialog)

Now behaves how the QA wants: install with first admin selecting "only for me" option, login as second admin, now this radio group is present, so I install the product with only for me option as well, and for a third user(normal user ) the product is not available. I'm not sure if this solution is good, and what could happen to the installer if that condition (HIDE -> ProductState >0) is missing!

I also don't know if uninstaller is affected or not. I'm dealing with InstallShield only for 2 weeks, so I don't have a lot of experience.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 January 2007 - 15:15

QUOTE
INSTALLSTATE_DEFAULT The product is installed for the current user.

This could mean: is eitehr installed per-user for this, or per-machine, or both. The result being that the user can use the software.

But you may be actually right, I think I've read about this topic somwhere, maybe in a blog or chat log. I just don't recall the details and the location.