Click to See Complete Forum and Search --> : Localsystem account privileges in Windows2003


ranadhir nag
February 1st, 2007, 03:10 AM
We launch a IE browser from within a windows service and cause the browser to navigate to a particular site using the IWebBrowser2 interface.
The code is as fllows:
hr=CoCreateInstance(CLSID_InternetExplorer,NULL,CLSCTX_LOCAL_SERVER,IID_IWebBrowser2,(void**)&psIE);
if(SUCCEEDED(hr))
{

hr=psIE->put_Visible(VARIANT_TRUE);
CComVariant ve;
CComVariant vurl(_T("www.experts-exhange.com"));

hr = psIE->Navigate2(&vurl, &ve, &ve, &ve, &ve);
if(FAILED(hr))
{

return hr;

}


//Wait thill the page is ready
READYSTATE isReady;
do{
hr=psIE->get_ReadyState(&isReady);
}while( isReady != READYSTATE_COMPLETE);

This works fine in W2K and XP - but in Windows 2003 ,the browser does not navigate to the site.
We just get a blank page-there is no error either.
Does the localsystem account in 2003 have to given additional privileges - the service runs under localsystem account with 'Interact with desktop' setting.

PeejAvery
February 1st, 2007, 05:45 PM
What language is this? C++? Let us know so that we can move this to its proper forum.