You can use the following UDF to run code inside a script as another user. Useful if you want to use built-in file and registry management functions as an admin user without calling an external script. There are some limitations so I suggest you read up on LogonUser. For example, calling this API on Windows 2000 requires the SE_TCB_NAME privilege which your non-admin user won't have. To impersonate a local user, set the domain parameter to "." Global Const $LOGON32_LOGON_INTERACTIVE = 2
Gl