uac

ClickOnce deployment CheckForDetailedUpdate throws an exception

断了今生、忘了曾经 提交于 2019-12-04 11:28:48
I have an application that's running 24/7 without attendance. It's deployed via ClickOnce and needs to check and download updates by itself. It checks for updates at application startup and at scheduled time at night. When it does it on startup, it works perfectly fine. However, when it does it at scheduled time, it crashes. In both cases it's using exactly the same piece of code. It's running under Windows 7 and might have something to do with UAC . I'm thinking that maybe it cannot access file system when computer is at idle state? I really need to fix that. Here are the exception details:

Manifest being ignored in mingw app

一笑奈何 提交于 2019-12-04 10:11:22
I have an old-fashioned Windows GDI application, written in C, which is being compiled with the Mingw toolchain. Some of my users have been complaining about Windows Vista and Windows 7's Virtual Store, where files which are written to directories the app shouldn't have access to are siphoned off and stored elsewhere. They say it's confusing them, and they'd much rather have an error. According to Microsoft's documentation, the way to prevent this from happening is to add an application manifest. Unfortunately this doesn't seem to do anything. My manifest is: <?xml version="1.0" encoding="UTF

VB6 Manifest not working on Windows 7

隐身守侯 提交于 2019-12-04 10:03:38
I have created a manifest file for a VB6 application that is running on Windows 7 (not for any visual style changes, just to make sure it accesses the common registry and not a virtualised one) The exe name is Capadm40.exe, the manifest is named Capadm40.exe.manifest and contains the following: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="CompanyName.Capadm40" type="win32"/> <description>Administers the System</description> <!-- Identify the

Add a UAC shield to a button and retain its background image?

。_饼干妹妹 提交于 2019-12-04 09:29:40
问题 Using C# and .Net 4.0 in a winforms application: Is it possible to add the UAC shield to a button and retain the buttons background image? How? This is what I'm using at the moment, but it removes the image... [DllImport("user32.dll")] public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam); public static void UACToButton(Button button, bool add) { const Int32 BCM_SETSHIELD = 0x160C; if (add) { // The button must have the flat style button.FlatStyle = FlatStyle

How do I make a console app always run as an administrator?

此生再无相见时 提交于 2019-12-04 08:31:30
问题 I have a console application that was developed to be called by a erp software. They call my app inside the erp and when they do it, i always get errors related to the insufficient permission to do it. I have checked the "run this program as an administrator" checkbox in the properties of the exe for all users but the result is the same. I have read something about adding a manifest that will make the app prompt for the uac dialog, but thats not what i want because the app will be called from

Can a program write to the root directory of a disk when UAC is turned on without having admin privileges?

江枫思渺然 提交于 2019-12-04 06:38:08
问题 If I am not an Administrator and start a program which writes to C:\ some textfile - will I need admin rights...in Windows 7 or Vista? I see in XP there are no problems to write to any folder including system32 - but I am not sure if a program in say .NET will be able to do that without admin permissions. 回答1: That depends on whether C:\ is a filesystem that supports permissions, and if so on the permissions set on the root directory, which can be modified by users with the correct privileges

Cannot Write to the Registry under HKEY_LOCAL_MACHINE\\Software

不问归期 提交于 2019-12-04 05:12:42
I'm writing an application that needs to create a special user account hidden from login screens and the Control Panel users applet. By writing a DWORD value of 0 with the user name to the registry key below, I'm able to accomplish this goal: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList The problem is that under Windows 7 with UAC on, no matter what I try, I cannot programmatically write a value to the key above. It is my understanding that writing to certain keys this is not allowed on Windows 7 with UAC on, unless you are running with

How do I control my application's name in the UAC dialog?

久未见 提交于 2019-12-04 03:47:06
I would like to control the name of my application as it appears in the UAC dialog. Right now it shows up as something like "MyCompany.MyApp.exe"; I would prefer something like "MyApp Pro". In other words, I would like a short, friendly phrase instead of the raw EXE file name. I noticed that MMC.EXE appears in the UAC dialog as "Microsoft Management Console", so it seems to be possible. But how? There must be a build setting somewhere that controls this, I just can't seem to find it ... Edit: The app is digitally signed. Paul Lalonde After some experimentation, I've found that providing a /d

Run Command as administrator in PowerShell script. UAC

青春壹個敷衍的年華 提交于 2019-12-04 02:17:44
OK here is my issue: I am trying to run a script remotely on a server. I am an administrator on both boxes, firewall exceptions are in place, remote admin is enabled, and everything else looks good that i can see. invoke-command -ComputerName $ComputerName -ScriptBlock ` { cd C:\Windows\System32\inetsrv\; ./appcmd.exe ADD vdir /app.name:<SiteName>/ /path:/<VDir Name> /physicalPath:<Path to files> } I keep getting the following error in return ERROR ( hresult:80070005, message:Failed to commit configuration changes. Access is denied. The server it is trying to run on is a server 2k8 R2 box and

Open default browser as standard user (C++)

做~自己de王妃 提交于 2019-12-03 20:16:24
I'm currently using ShellExecute "open" to open a URL in the user's browser, but running into a bit of trouble in Win7 and Vista because the program runs elevated as a service. When ShellExecute opens the browser, it seems to read the "Local Admin" profile instead of the user's. So for example, if the user at the keyboard has Firefox as his default browser, it may open IE (which is the admin's default). I know that the "runas" verb can be used to elevate, but how do you do it the other way around? Is there a way to open a URL in the default browser on a standard user's desktop from a service?