Administrative privileges and running tests under Windows

Mariusz Pluciński vshader at
Fri Jul 16 12:36:11 CDT 2010

Hi wine-devel
I have problems with tests I written last time.
The problem is connected with privileges levels under Windows.

The method I'm testing is IGameExplorer::AddGame,
which registers given game in Windows Game Explorer.
One of it's parameters (installScope) defines if game should
be registered for all users or only currently logged one. The
problem is that routine's behaviour depends on if application
was started with administrative privileges or not.

If I call method with GIS_ALL_USERS parameter, it succeeds
only with administrative privileges (fails if I run it as normal
user). If I call it with GIS_CURRENT_USER parameter, it succeeds
under normal user level, and fails (sic!) under administrative.

My question is, how I should write tests to support both
of these cases. Both seems to be exclusive, and I prefer first
to ask, rather than trying implement it in some odd
(and probably wrong) way. I also want to make it available
to run under Wine project's test machines, but I don't know
how they're configured and will them allow me to test
administrative case.

More information about the wine-devel mailing list