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

Need variable user ID for starting service


1 reply to this topic

Kevinw

Kevinw
  • Members
  • 5 posts

Posted 15 January 2004 - 16:55

Hi,

I'm using IS DevStudio 9 to create an install which installs and starts several services. In the InstallScript I prompt the user for the User ID and Password that the service should use to run under and assign the values to InstallScript variables. How do I refer to these variables in the "Install NT Services" section of the IDE? I don't know the sytax/trick.

One thing I tried was using the various MSI database functions in my script to change the ServiceInstall table entry directly. This didn't work. I was able to execute SELECT queries but when I tried to do an UPDATE query it always failed with the return code ERROR_FUNCTION_FAILED. Any suggestion?

Thanks in advance. :-)

Kevinw

Kevinw
  • Members
  • 5 posts

Posted 15 January 2004 - 17:55

Ten minutes after I made the above post a coworker of mine discovered a fairly simple way to do this: Create a property called "UserID" in the InstallScript using MsiSetProperty(). Then reference it in the "User Name" of the "Install NT Services" area user square brackets: [UserID]

Don't know if this is the best way, but it works. :-)