uac

How to launch SFC programatically on Windows Vista/7/8?

戏子无情 提交于 2019-12-01 21:13:10
I've been trying to solve the problem that Chris Iverson was having in this other Stackoverflow question . I want to launch SFC (the System File Checker tool) programatically. It works on Windows XP: private void RunSfc() { ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/K sfc.exe /scannow"); System.Diagnostics.Process.Start(startInfo); } Other variants that do work under Windows XP: //Launch SFC directly ProcessStartInfo startInfo = new ProcessStartInfo("sfc.exe", "/scannow"); System.Diagnostics.Process.Start(startInfo); //Use full path to SFC String sfcPath = Path.Combine

Issue with .cab file (ActiveX) installation on Windows Vista and 7

给你一囗甜甜゛ 提交于 2019-12-01 20:30:47
I have made an ActiveX control and have made its .cab file for automatic installation on client machine using Internet Explorer.. It working fine of Windows XP, but on windows Vista and Windows 7 its installation is blocked by UAC (User account control), and when I disable it, all things works fine... I have signed my .cab file with a certificate for development enviornment... What is the way to over come this problem.. I don't want to tell users to disable their UAC module... Most likely this is because you're trying to register your control in HKEY_LOCAL_MACHINE, which is the default in ATL.

What makes c:\Program Files UAC-protected?

我只是一个虾纸丫 提交于 2019-12-01 20:19:51
问题 I know that c:\Program Files is UAC-protected, and if I allow a user to install to d:\Program Files , this is not, by default, UAC protected. What makes c:\Program Files UAC protected other then the directory security settings? Is it simply directory security, or is there something else that Windows does to make it special? I am trying to advise someone if it is possible to make d:\Program Files sort of as equivalently secure as c:\Program Files . If I were to create d:\Program Files with the

set “run as administrator” flag programmatically

对着背影说爱祢 提交于 2019-12-01 19:41:57
Is it possible to programmatically set the "Run As Administrator" flag on exe file or shortcut file? Does Installshield support this functionality if i'll do it as part of the installation process? I'm trying to find the relevant command line / API / installshield command for this. The upstream build process should be manifesting your EXE with the require administrator attribute. This doesn't have anything to do with InstallShield or the shortcut. Done correctly when the user clicks the shortcut, Windows will see the manifest and UAC will prompt for elevation. 来源: https://stackoverflow.com

IE8 won't download a file with a custom mime/type with UAC enabled

淺唱寂寞╮ 提交于 2019-12-01 17:58:50
I have a .net service running on the local machine (Windows 7 x64, IE8, .net 3.5, C#) that returns a file to the browser in response to a user action. Using firefox or chrome, the file is downloaded properly and our application is launched via a custom mime type and all is well. However, with IE8, I receive a dialog "unable to download file from . Unable to open this internet site. The requested site is either unavailable or cannot be found. Try again later". Using fiddler, I verified that IE does receive the payload from the service. If I turn off UAC, IE does download the file and launch the

Windows Form Startup with Admin Permission

假如想象 提交于 2019-12-01 14:52:57
I have a windows form application that need of the admin permission for running, to make this, I use this code: <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> The next step for complete the development is that this windows form application start up after windows restart, turn off and turn on again or user logon. Here is my problem, this application need administrator permission and need startup after system startup, but I don't know to make this. things did I do: Put the application executable path on regedit Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\

Process with administrative privileges run on user logon

时间秒杀一切 提交于 2019-12-01 12:56:39
I'm trying to figure out how to solve the privilege acquisition. The application requires a desktop access, so it cannot be executed as a Windows service: it have to create a window for receiving message sent by other processes using SendMessage (it must be used for waiting message acknowledge). The application shall be started when an user login, and it will manage the user session (manage applications, windows...). Only one user can be managed at time. What I'm asking is which is the best solution for requesting privilege acquisition, since the application requires it (execute a process

Windows 7 - Can't update my program's files in C:\\Program Files

假装没事ソ 提交于 2019-12-01 12:22:50
I have an addin program that works with MS Word (version 2007). It is located in the C:\Program Files location. I installed Windows 7 and then went to make a routine change to my files in this location and it would only bring up a read only file. How can I grant myself permission to write to my own program? I cannot change this location or use any other workaround. I have this product out to 25 different companies and I can't change the programming to work from any other location. Thanks You could also embed a manifest in your EXE that makes your program require adminrights on Windows 7 /

How to design autostart application that runs as admin on Windows Vista/7?

拈花ヽ惹草 提交于 2019-12-01 11:34:16
I have the need for my application to start and stop Windows Services based on certain events. The thing is that this application needs to run as an elevated normal user (In order to stop services), as well as auto start when Windows starts. Additionally, it need to be in the systray with an user interface. What are my options here? I suppose that there are at least two possibillities: To make the application auto start by putting it in the Startup folder or in the ..\Run key in the registry. But the question is, can this be done without the UAC prompt dialog pops up every time Windows starts?

Executing a process normally from an elevated one

故事扮演 提交于 2019-12-01 11:31:25
Is there some way to launch a process in non-elevated way from an elevated one. My setup is launched elevated and when it finalizes, it will just launch the main application. Because the setup is elevated, the main process will be elevated as well which is not desirable. What is the best solution to this? That's a problem, Vista/Win7 don't appear to have an API to obtain the unprivileged user token you need to call CreateProcessAsUser(). The only solutions I've found involve using the task scheduler to launch the program. That doesn't strike me as very practical. An easy solution that jumps to