[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Passing "Username" and "Password" to ServiceProcessInstaller at install-time to avoid prompt.

greg.persson

8/29/2006 8:33:00 PM

I've created a Visual Studio Setup Project that makes use of the
ServiceProcessInstaller class to install a Windows Service.

We are installing the service under a User security context. The
Username and Password are not know during compile time, so we allow
ServiceProcessInstaller to prompt for this information during install
time.

Now my company wants me to define an "msiexec /quiet" procedure for
running the install. Is there a way to pass the username and password
to msiexec on the command line and bypass the SPI prompt?

1 Answer

Phil Wilson

8/29/2006 11:45:00 PM

0

You'd pass them in like this:

msiexec /i <path to msi> /q MYUSERNAME=WHATEVER MYPASSWORD=Something

where there are a few other flavors of /q, such as /qn

and you'd have to pass the values of those properties via CustomActionData
into the installer class Install custom action and configure the service
with them.

(This is a little complicated because you need to write code due to the way
Visual Studio uses installer classes to install services).
--
Phil Wilson
[Microsoft MVP Windows Installer]
<greg.persson@gmail.com> wrote in message
news:1156883559.702410.292500@h48g2000cwc.googlegroups.com...
> I've created a Visual Studio Setup Project that makes use of the
> ServiceProcessInstaller class to install a Windows Service.
>
> We are installing the service under a User security context. The
> Username and Password are not know during compile time, so we allow
> ServiceProcessInstaller to prompt for this information during install
> time.
>
> Now my company wants me to define an "msiexec /quiet" procedure for
> running the install. Is there a way to pass the username and password
> to msiexec on the command line and bypass the SPI prompt?
>