Partially fixed RunAsAdmin code