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

Service Parameters


5 replies to this topic

Gadlakha

Gadlakha
  • Members
  • 18 posts

Posted 25 January 2005 - 12:40

Hi.
First of all I'll like to thank Mr.Stefan Krueger for posting prompt replies to my problems which helped me a lot in getting them solved.
I have a problem, I am creating a service in component view and am leaving the username and password fields blank. Not later in my setup, I am generating a custom dialog in which user provides the UserName & Password. I need to assign this UserName and Password to each service before installing it.
I found out that calling SERVICE_IS_PARAMS.lpServiceStartName and SERVICE_IS_PARAMS.lpPassword can work. But the first problem I face is that if I use these, It gives me an error message saying that "Numeric values required", but how can username and password be numeric.
Secondly, I am not even aware of the proper syntax and flow control required for using them.
I'll be really greatful to you if you could kindly guide me as to how to resolve this.
With thanks & regards.
Gautam Adlakha.

Edited by Gadlakha, 25 January 2005 - 12:42.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 January 2005 - 16:23

Why don't you put properties in the service settings for username and password, e.g.
[USERNAME] and [PASSWORD]

Gadlakha

Gadlakha
  • Members
  • 18 posts

Posted 27 January 2005 - 05:56

Is there a way to put these properties through script. Actually I am getting these values as inputs from the user and thus at run time I need to set these properties for the service.
I'll be greatly thankful for your prompt reply.
Thanks & Regards.
Gautam Adlakha.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 January 2005 - 12:20

You can set a property value using MsiSetProperty.

Gadlakha

Gadlakha
  • Members
  • 18 posts

Posted 27 January 2005 - 12:46

The syntax of MsiSetProperty is UINT MsiSetProperty( MSIHANDLE hInstall, LPCTSTR szName, LPCTSTR szValue);.
How do I get the MSIHANDLE hInstall (Handle to the installer) value.


Pittyman

Pittyman
  • Members
  • 3 posts

Posted 28 January 2005 - 17:19

if your calling it from Installscript, heres how

#include "iswi.h" at the top of Setup.rul

and then the MsiSetProperty call looks like this:

MsiSetProperty(ISMSI_HANDLE, "YourProperty", YourValue);