imjohns
Posts: 5
Joined: Mon Feb 20, 2006 10:05 pm

Providing "user name" variable at install time

I need to create a domain install for my tool and may not know a valid user name/group variable to use until I go to install as I would like to make the install generic. I.e. the user name variable might be "Everyone" in some cases and "Domain Users" in others.

Would a .ini file work for this?

Ivan
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

You can enter a Property in the "Domain" and "Username" comboboxes (from the "Permission" dialog). For example: [MYDOMAIN] or [SOMEUSER].

The value of these Properties can be set at install time depending on the required conditions.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
imjohns
Posts: 5
Joined: Mon Feb 20, 2006 10:05 pm

Providing "user name" variable at install time

I am new to advanced installer so where specifically do you mean I can set the value of the variable? In an .ini file?
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

You have several alternatives:

1. You can set the value of a Property from the command-line, for example:

Code: Select all

msiexec /i package.msi SOMEUSER="Mike"
2. If you create an EXE setup package and you select the option "Leave install files outside" (in the Media page), you will notice that AdvInst creates an INI file with the same name as your EXE package, if there are Prerequisites in your package or if you specify options for "msiexec" in the "MSI Command Line" text field. You can modify those command-line options by changing the "MainAppCmdLine" INI entry, such as:

Code: Select all

MainAppCmdLine=SOMEUSER=Mike
3. You can set a Property using a Script Inline or Property Set with Formmated Custom Action. For example, a Script Inline Custom Action that sets a Property will look like this:

Code: Select all

Session.Property("SOMEUSER")="Mike"
Hope this helps.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”