PDA

View Full Version : Can't set agent to use local notification server...?



smcgill
09-23-2003, 11:26 AM
I'm trying to point the agent at our local notification server, so I set the property DWUSHOST when I register the product code.

Ex :

// Create agent
THR(spAgent.CoCreateInstance(CLSID_Agent))

// Register product code/version
THR(spAgent->Register(bstrGuid, bstrVer))

// Disable scheduler
CComBSTR bstrName = _T("UseScheduler");
CComVariant vtVal = L"0";
THR(spAgent->put_value(bstrGuid, bstrName, vtVal))

// Set local notification server
bstrName = _T("DWUSHOST");
vtVal = _T("http://10.99.1.56");
THR(spAgent->put_value(bstrGuid, bstrName, vtVal))


Does this seem correct? If so, it doesn't seem to be working... the agent is still going out to the installshield notification server.

Thanks!

Christine at IS
09-23-2003, 12:37 PM
The keyword in the product ini file (which I think is what you are trying to set) is actually "Server". Also, if you are entering it directly into the product ini, you need to add a trailing forward slash to the pathurl.

So, the following would be valid:
// Set local notification server
bstrName = _T("Server");
vtVal = _T("http://10.99.1.56/");
THR(spAgent->put_value(bstrGuid, bstrName, vtVal))

However, we provide a method to do this directly:
SetHost

smcgill
09-23-2003, 12:45 PM
Ohhh yeah, sorry. When I searched the help files for setting the local notification server I saw that other property and just assumed that was what needed to be set. I'll just use SetHost(), thanks.