windows-vista

How to detect whether Vista UAC is enabled?

徘徊边缘 提交于 2019-12-02 16:43:51
I need my application to behave differently depending on whether Vista UAC is enabled or not. How can my application detect the state of UAC on the user's computer? Philip Rieck This registry key should tell you: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System Value EnableLUA (DWORD) 1 enabled / 0 or missing disabled But that assumes you have the rights to read it. Programmatically you can try to read the user's token and guess if it's an admin running with UAC enabled (see here ). Not foolproof, but it may work. The issue here is more of a "why do you need to know" - it has

Troubleshooting DPI Virtualization and DPI-aware applications, in Windows Vista and Windows 7

吃可爱长大的小学妹 提交于 2019-12-02 15:57:30
I have a problem where an application (written in Delphi) is behaving properly at default 96 DPI settings on all systems, but is behaving inconsistently at the "150% text size" (internally 144 dpi) setting, on different systems. It seems that on some systems, that certain text/font parts of my application are being stretched and on other systems, they aren't. I would have thought that my application, on a certain version of Windows (Win7), at a certain DPI, should behave the same way. Either my application will make it known to Windows that it doesn't need the DPI Virtualization feature, or it

calling TaskDialogIndirect loader says ordinal 345 not found

此生再无相见时 提交于 2019-12-02 13:18:34
问题 I built the simple MS example for TaskDialogIndirect (see https://msdn.microsoft.com/en-us/library/windows/desktop/bb760544(v=vs.85).aspx) When I run it I get "The ordinal 345 could not be located in the dynamic link library COMCTL32.dll" The above page says it needs ComCtl32.DLL version 6 but C:\Windows\System32\ComCtl32.DLL is 5.82.7601.18201 and I can't find a version 6 anywhere on the disk. I am running Windows 7 with VS2012. TaskDialog was added in Vista so why don't I have the correct

Vista + VB.NET - Access Denied while writing to HKEY_LOCAL_MACHINE

╄→尐↘猪︶ㄣ 提交于 2019-12-02 07:48:17
问题 I want my program to be able to edit a values within a registry key that resides in 'HKEY_LOCAL_MACHINE' My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\XYZ", "MyValue", "MyData") The above works fine in Windows XP, but throws an UnauthorizedAccessException in Vista. 回答1: You are running into Vista's UAC feature. It will not let you write to arbitrary places in the HKLM hive because you are not running with Administrative priviledges. There are two ways to work around this issue

Vista + VB.NET - Access Denied while writing to HKEY_LOCAL_MACHINE

回眸只為那壹抹淺笑 提交于 2019-12-02 06:30:09
I want my program to be able to edit a values within a registry key that resides in 'HKEY_LOCAL_MACHINE' My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\XYZ", "MyValue", "MyData") The above works fine in Windows XP, but throws an UnauthorizedAccessException in Vista. JaredPar You are running into Vista's UAC feature. It will not let you write to arbitrary places in the HKLM hive because you are not running with Administrative priviledges. There are two ways to work around this issue Run the program with Administrative priviledges (different than running a program as an account which

Simple Application to switch Primary dispay

五迷三道 提交于 2019-12-02 05:53:28
问题 My current set up for my computer is with a 17 inch monitor on my desk and my HDTV a few feet away. Every once in a while (generally when playing games) things work better when I switch my primary display to my HDTV. I'm running vista, so things can become a huge pain, as I have to go through several windows just to switch. I'm thinking of making a simple application that will simply switch my primary and secondary monitors. I've looked around here, codeprojects and the MSDN library and haven

calling TaskDialogIndirect loader says ordinal 345 not found

谁说胖子不能爱 提交于 2019-12-02 05:14:23
I built the simple MS example for TaskDialogIndirect (see https://msdn.microsoft.com/en-us/library/windows/desktop/bb760544(v=vs.85).aspx ) When I run it I get "The ordinal 345 could not be located in the dynamic link library COMCTL32.dll" The above page says it needs ComCtl32.DLL version 6 but C:\Windows\System32\ComCtl32.DLL is 5.82.7601.18201 and I can't find a version 6 anywhere on the disk. I am running Windows 7 with VS2012. TaskDialog was added in Vista so why don't I have the correct version of ComCtl32.DLL??? Here's a common and useful block of code that should help to load the

What programming language was Windows Vista programmed in?

回眸只為那壹抹淺笑 提交于 2019-12-02 02:17:41
问题 Which programming language(s) were used to code Windows Vista? 回答1: From working with the Windows CE operating system I'd say its a mix of C for the old school code and interfaces, and a lot of C++ behind the scenes for drivers and other code. It (WinCE) uses C++ in the drivers behind a C interface to the rest of the system. Now I'm going to guesstimate and say there are many bits of C# and other code in it now as well. 回答2: Well, the Windows kernel is still almost entirely C. However, there

Vista/7 UAC: how to lower process privileges

烂漫一生 提交于 2019-12-02 01:47:50
问题 Is it possible for a process to lower itself from elevated UAC permission back to standard user? If not can the elevated process launch its copy with standard user token and then kill itself? Any code examples (C# preferred)? Details: Problem: - user installs my product (written in C#) - the installer elevates its UAC permission to admin - at the end the installer launches my exe - the exe inherits elevated permissions from admin - the exe mounts network drives which become invisible in

Vista/7 UAC: how to lower process privileges

烂漫一生 提交于 2019-12-02 00:59:05
Is it possible for a process to lower itself from elevated UAC permission back to standard user? If not can the elevated process launch its copy with standard user token and then kill itself? Any code examples (C# preferred)? Details: Problem: - user installs my product (written in C#) - the installer elevates its UAC permission to admin - at the end the installer launches my exe - the exe inherits elevated permissions from admin - the exe mounts network drives which become invisible in Windows Explorer (that runs with regular permissions) Options I considered: 1) break installer into outer