uac

Showing the UAC prompt in PowerShell if the action requires elevation

纵然是瞬间 提交于 2019-11-27 01:26:36
问题 I have a simple PowerShell script to stop a process: $p = get-process $args if ( $p -ne $null ) { $p | stop-process $p | select ProcessName, ID, HasExited, CPU, Handles } else { "No such process" } If I try to stop a process not started by the current user; it works on Windows Server 2003. However, on Windows Server 2008 (and other Windows flavours with User Account Control), I get the following error: Stop-Process : Cannot stop process "w3wp (5312)" because of the following error: Access is

Why do files get placed in “C:\\Users\\<username>AppData\\Local\\VirtualStore\\Program Files(x86)”?

蓝咒 提交于 2019-11-27 00:57:06
I recently updated my Visual Basic 6.0 application and now include an exe.manifest file to prevent UAC Virtualization. After applying this update, some users can't find their data files ( Access MDB files) and after a system search they end up finding it in C:\Users\<username>AppData\Local\VirtualStore\Program Files(x86) . What is this folder area for and how/when do files get moved to this area? How do we prevent it? I'm hoping now that my application uses a .manifest this won't happen again. Did the files get placed there before the manifest was used as the application was being placed in

XAMPP installation on Win 8.1 with UAC Warning

扶醉桌前 提交于 2019-11-27 00:26:46
问题 I am trying to install Xampp win32-1.8.2 on Windows 8.1. I get a message saying" Because an activated user account User Account on your system some functions of XAMPP are possibly restricted." I've tried to change the user account control settings but still the warning is there. And the APACHE does not start. I've also disabled my IIS but still, its not working. What should I do? Thanks. 回答1: There are two things you need to check: Ensure that your user account has administrator privilege.

Mark MSI so it has to be run as elevated Administrator account

为君一笑 提交于 2019-11-27 00:17:41
问题 I have a CustomAction as part of an MSI. It MUST run as a domain account that is also a member of the local Administrators account. It can't use the NoImpersonate flag to run the custom action as NT Authority\System as it will not then get access to network resources. On Vista/2008 with UAC enabled if NoImpersonate is off then it will run as the executing user but with the unprivileged token and not get access to local resources such as .installState. See UAC Architecture Anyone know of a way

Elevating privileges doesn't work with UseShellExecute=false

时光毁灭记忆、已成空白 提交于 2019-11-26 22:58:27
I want to start a child process (indeed the same, console app) with elevated privileges but with hidden window. I do next: var info = new ProcessStartInfo(Assembly.GetEntryAssembly().Location) { UseShellExecute = true, // ! Verb = "runas", }; var process = new Process { StartInfo = info }; process.Start(); and this works: var identity = new WindowsPrincipal(WindowsIdentity.GetCurrent()); identity.IsInRole(WindowsBuiltInRole.Administrator); // returns true But UseShellExecute = true creates a new window and I also I can't redirect output. So when I do next: var info = new ProcessStartInfo

How to screen shot a UAC prompt?

大兔子大兔子 提交于 2019-11-26 22:45:46
问题 I'm trying to document a work flow with a series of screen shots. At one point in the flow, a UAC prompt appears, and I'd like to grab a bitmap of it to make my storyboard complete. Because UAC prompts are on a virtual desktop (or something like that), the usual Alt+PrintScreen doesn't work. Any suggestions? 回答1: This method using the group policy editor should do the job: 1) Run gpedit.msc 2) Under Computer Configuration\Windows Settings\Security Settings\Local Policies\SecurityOptions:

Run process as administrator from a non-admin application

僤鯓⒐⒋嵵緔 提交于 2019-11-26 22:11:14
From an application that is not being run as administrator, I have the following code: ProcessStartInfo proc = new ProcessStartInfo(); proc.WindowStyle = ProcessWindowStyle.Normal; proc.FileName = myExePath; proc.CreateNoWindow = false; proc.UseShellExecute = false; proc.Verb = "runas"; When I call Process.Start(proc), I do not get a pop up asking for permission to run as administrator, and the exe is not run as administrator. I tried adding an app.manifest to the executable found at myExePath, and updated the requestedExecutionLevel to <requestedExecutionLevel level="requireAdministrator"

Program Compatibility Assistant Manifest Not working in Vista32

只愿长相守 提交于 2019-11-26 22:10:09
问题 When I run my application "A driver Installer and Uninstaller Application", I am getting a "Program Compatibility Assistant" window once my exe get ended successfully. After going through the SO links and googling I couldnt find a solution to avoid "Program Compatibility Assistant" window in vista 32. I used the below manifest to avoid PCA and it works as expected (am not getting any PCA window in windows 7) but except windows vista 32? What should I do to make this work? After Using the

c# starting process with lowered privileges from UAC admin level process

断了今生、忘了曾经 提交于 2019-11-26 22:03:30
问题 I have one major problem with my app. I have an app & updater as a separate exe files. When an update is available, updater does the update, and on process completion it starts my app. The main problem is - app is installed in program files folder, so updater need UAC admin privileges, and that's ok, but when I need to run my app updater needs to run it as a normal user, because if it's run as an administrator drag and drop doesn't work (not an app problem, UAC blocks it). I've tried several

Detect if program is running with full administrator rights

房东的猫 提交于 2019-11-26 20:49:28
I need to determine if my program is running with full administrator rights. By that I mean if uac is turned on (for win vista/7) that I need to determine if the program actually has admin rights (like if the user right clicked and selected "run as administator") and not limited by uac. How do I do this in C++? Win9x: Everyone is "admin" NT4: OpenThreadToken/OpenProcessToken + GetTokenInformation(...,TokenGroups,...) on DOMAIN_ALIAS_RID_ADMINS SID in a loop 2000+: OpenThreadToken/OpenProcessToken + CheckTokenMembership on DOMAIN_ALIAS_RID_ADMINS SID Other alternatives are: IsUserAnAdmin or