PDA

View Full Version : NT Service modify DomainUserName and Passwor



Bill.Yager
08-04-2004, 02:12 PM
Hi, I'm trying to create a service aat install. I have created a custom dialog for the user to set the Domain, user and password that the service should run as. I get the values without a problem, and they seem to get set to the appropriate values, but when the service is created, log on is set to LocalSystem. I'm modifying the NT Service object created in the Application Data sectioni of the IDE. Any idea what's going on? Here's the code:

set oObject = GetObject(szServiceName);

oObject.DomainUserName = szDomainUser;
oObject.Password = szPassword;

ServiceAddService(szServiceName, szServiceDisplayName, szServiceDescription, szServicePathFile, bStartService, szStartServiceArgs);

Thanks,

Bill

charliebecker
08-19-2004, 06:38 PM
Bill, did you ever figure out a solution to this problem? I'm looking at doing the same thing.

Thanks!

Bill.Yager
08-20-2004, 09:04 AM
No solution to this yet. I'll post it when I have one.

Bill