This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Connect
- :
- FlexNet Connect Forum
- :
- Running UpdateService from a service
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 13, 2005
05:18 AM
Running UpdateService from a service
I am trying to create a Windows service based application that uses UpdateService. However I cannot get it to work, it fails when i call AutoUpdate in both silent and non silent modes even if the service is logged in as an Administrator on the machine. If i run AutoUpdate from a standalone program it runs fine.
Has anyone got any ideas why this maybe happening?
Thanks
Has anyone got any ideas why this maybe happening?
Thanks
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 13, 2005
07:59 PM
Could you post the source code that you are using to check for updates? That way, we can get a better idea of whats going on. I know many of us are able to get AutoUpdate working, myself included. It must be a simple coding mistake somewhere
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2005
03:33 AM
The code I use to run from the windows service and the code I use that runs the standalone program is exactly the same. The service in fact launches an executable that does the update and I can run that update as a standalone application. When I run it as standalone application it works, when I let the service launch it it doesnt. AutotUpdate fails when it runs from the service, and HRESULT is a very large -ve number which doesnt correlate to any windows error message.
Here is the code:
USES_CONVERSION;
VARIANT_BOOL bUpdateInitiated = VARIANT_FALSE;
CComBSTR productCode(szProductCode);
VARIANT_BOOL varbSilent;
if(bSilent)
{
varbSilent=VARIANT_TRUE;
}
else
{
varbSilent=VARIANT_FALSE;
}
HRESULT hr = m_spAgent->AutoUpdate(productCode, varbSilent, 0, 0,&bUpdateInitiated);
if(bUpdateInitiated==VARIANT_FALSE)
{
return (FALSE);
}
return TRUE;
It doesnt matter if I run the service as Admin or local system.
Here is the code:
USES_CONVERSION;
VARIANT_BOOL bUpdateInitiated = VARIANT_FALSE;
CComBSTR productCode(szProductCode);
VARIANT_BOOL varbSilent;
if(bSilent)
{
varbSilent=VARIANT_TRUE;
}
else
{
varbSilent=VARIANT_FALSE;
}
HRESULT hr = m_spAgent->AutoUpdate(productCode, varbSilent, 0, 0,&bUpdateInitiated);
if(bUpdateInitiated==VARIANT_FALSE)
{
return (FALSE);
}
return TRUE;
It doesnt matter if I run the service as Admin or local system.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2005
02:02 PM
Oh darn, I misread your earlier post. I didn't see you have two distinct setups here...a Windows service based application and a standalone application. If you can get it to work on a standalone application, then I'm stumped...I thought you just couldn't get anything to work at all.
I'd investigate this more, make a simple test case program, and then open up a MySupport request on this if it is a bug. Sorry I can't be of more help. 😞
I'd investigate this more, make a simple test case program, and then open up a MySupport request on this if it is a bug. Sorry I can't be of more help. 😞
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)