privilege function wrapper on Windows