Hi,
on Win7(in my case, probably in all versions) it seems that after an update for which it required administrator privileges the game keeps running in this mode.
I think it should switch back normal user privileges to avoid security risks.
Regards
Archetim
[0.12.11] [kovarex] Game is running in administrator mode after update
Re: Game is running in administrator mode after update
Well, we run the updated game with the "open" command. While the updater is ran with the "runas" (administrator).
I have no idea why would the game be ran in admin mode. Couldn't it be because the parent process is already administrator?
I have no idea why would the game be ran in admin mode. Couldn't it be because the parent process is already administrator?
Re: Game is running in administrator mode after update
Hi,
sorry for my late response. I had not much time this week.
I see no parent process for Factorio after updating.
My assumption was that the updater starts factorio after updating and because of this factorio runs with the same permissions as the updater.
When I close it and start factorio again as usual with the link on the desktop then it runs in normal user mode.
sorry for my late response. I had not much time this week.
I see no parent process for Factorio after updating.
My assumption was that the updater starts factorio after updating and because of this factorio runs with the same permissions as the updater.
When I close it and start factorio again as usual with the link on the desktop then it runs in normal user mode.
Re: Game is running in administrator mode after update
Archetim, thanks for bringing this to light. I wish the likes of Adobe, Mozilla, and other big software developers also fixed this security flaw. The last thing a Windows computer needs is Acrobat, Flash or any web browser running with administrator priviledges.
How can I launch an unelevated process from my elevated process and vice versa?
How can I launch an unelevated process from my elevated process and vice versa?
Re: Game is running in administrator mode after update
_aD wrote:Archetim, thanks for bringing this to light. I wish the likes of Adobe, Mozilla, and other big software developers also fixed this security flaw. The last thing a Windows computer needs is Acrobat, Flash or any web browser running with administrator priviledges.
How can I launch an unelevated process from my elevated process and vice versa?
Code: Select all
void GetDesktopAutomationObject(REFIID riid, void **ppv)
{
CComPtr<IShellView> spsv;
FindDesktopFolderView(IID_PPV_ARGS(&spsv));
CComPtr<IDispatch> spdispView;
spsv->GetItemObject(SVGIO_BACKGROUND, IID_PPV_ARGS(&spdispView));
spdispView->QueryInterface(riid, ppv);
}
void ShellExecuteFromExplorer(
PCWSTR pszFile,
PCWSTR pszParameters = nullptr,
PCWSTR pszDirectory = nullptr,
PCWSTR pszOperation = nullptr,
int nShowCmd = SW_SHOWNORMAL)
{
CComPtr<IShellFolderViewDual> spFolderView;
GetDesktopAutomationObject(IID_PPV_ARGS(&spFolderView));
CComPtr<IDispatch> spdispShell;
spFolderView->get_Application(&spdispShell);
CComQIPtr<IShellDispatch2>(spdispShell)
->ShellExecute(CComBSTR(pszFile),
CComVariant(pszParameters ? pszParameters : L""),
CComVariant(pszDirectory ? pszDirectory : L""),
CComVariant(pszOperation ? pszOperation : L""),
CComVariant(nShowCmd));
}
Re: [0.12.11] [kovarex] Game is running in administrator mode after update
You should really start a bootstrapper of your own non-elevated, then run the installer and elevate that, keeping the bootsrapper running non-elevated to relaunch Factorio of new version after the installer is done.
But why bother, there's like one in thousand programs that does UAC right, Factorio does other things right, right?
PS: What's horrible and not understandable on asking Explorer to open something for you? (other than the fact Explorer might not be there and might not have the privileges you expect, and generally being unreliable for this purpose)?
But why bother, there's like one in thousand programs that does UAC right, Factorio does other things right, right?
PS: What's horrible and not understandable on asking Explorer to open something for you? (other than the fact Explorer might not be there and might not have the privileges you expect, and generally being unreliable for this purpose)?