windows-vista

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

Vista and ProgramData

和自甴很熟 提交于 2019-11-26 21:46:45
问题 What is the right place to store program data files which are the same for every user but have to be writeable for the program? What would be the equivalent location on MS Windows XP? I have read that C:\ProgramData is not writeable after installation by normal users. Is that true? How can I retrieve that directory programmatically using the Platform SDK? 回答1: SHGetFolderPath() with CSIDL of CSIDL_COMMON_APPDATA. Read more at http://msdn.microsoft.com/en-us/library/bb762181(VS.85).aspx If you

Java Sound API to access the system/master volume control in Vista and Win 7

别来无恙 提交于 2019-11-26 21:45:20
问题 History & Situation: I'm currently working on updating a Java application that was developed for a client several years ago (to run on WinXP) and is used for testing and training people with certain hearing impairments. Users who bought this application were provided with a particular USB sound device and headphones. One of the most important requirements for this software is that the audio must be played to the user at specific decibel sound levels. Using the Java Sound API, the application

Run-Time Check Failure #0 loading QueryFullProcessImageName from kernel32.dll

本秂侑毒 提交于 2019-11-26 21:38:19
问题 I have an application that needs to run both on WinXP and Vista64. My program requires QueryFullProcessImageName() to work on Vista but not on XP. I try to load QueryFullProcessImageName() (instead of linking statically) via the kernel32.dll so that the same executable can run on both WinXP and Vista. The code that loads it is: //only gets called on vista bool LoadQueryFullProcessImageName() { HMODULE hDLL = LoadLibrary("kernel32.dll"); if (!hDLL) return(0); //Now use pointer to get access to

Hide Start Orb on Vista / Win 7 in C#

做~自己de王妃 提交于 2019-11-26 21:19:52
问题 When hiding the Task Bar on Vista and Windows 7 the Start Button (also known as the Start Orb) doesn't get hidden. I've been looking for a solution to this and I've found one but it seems more complex than necessary. This CodeProject article describes (and contains code for) a solution where you enumerate all child windows of all threads in the process that contains the start menu. Has anyone found a simpler solution? Just for reference. The code for hiding the Task Bar (without hiding the

OS.symlink support in windows

怎甘沉沦 提交于 2019-11-26 19:53:30
问题 I downloaded python 2.7.1 from the python website and installed it to windows. When attempting to symlink a file, I find that it is not supported. However, I found this issue, and saw that it was fixed. Will this be implemented, and if so when? I'm running windows Vista. 回答1: There's a way to fix this, patching the os module on your's python environment start. The function to create symlinks is already avaliable from Windows API, you only need do call it. During python's startup, an attempt

Active Directory - Check username / password

 ̄綄美尐妖づ 提交于 2019-11-26 18:56:21
问题 I'm using the following code on Windows Vista Ultimate SP1 to query our active directory server to check the user name and password of a user on a domain. public Object IsAuthenticated() { String domainAndUsername = strDomain + "\\" + strUser; DirectoryEntry entry = new DirectoryEntry(_path, domainAndUsername, strPass); SearchResult result; try { //Bind to the native AdsObject to force authentication. DirectorySearcher search = new DirectorySearcher(entry) { Filter = ("(SAMAccountName=" +

Request Windows Vista UAC elevation if path is protected?

て烟熏妆下的殇ゞ 提交于 2019-11-26 18:53:14
For my C# app, I don't want to always prompt for elevation on application start, but if they choose an output path that is UAC protected then I need to request elevation. So, how do I check if a path is UAC protected and then how do I request elevation mid-execution? Adrian Clark The best way to detect if they are unable to perform an action is to attempt it and catch the UnauthorizedAccessException . However as @ DannySmurf correctly points out you can only elevate a COM object or separate process. There is a demonstration application within the Windows SDK Cross Technology Samples called UAC

How to request administrator permissions when the program starts?

倾然丶 夕夏残阳落幕 提交于 2019-11-26 18:33:20
I need my software to be able to run as administrator on Windows Vista (if someone runs it without administrative permissions, it will crash). When launching other software, I've seen a prompt by the system like "this software will run as administrator. do you want to continue?" when the app was trying to acquire administrative privileges. How do I request administrative privileges when running an c# app on Windows Vista? manojlds Add the following to your manifest file: <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> You can also use highestAvailable for the level.

Windows 7 and Vista UAC - Programmatically requesting elevation in C#

允我心安 提交于 2019-11-26 17:38:20
I have a program that only requires elevation to Admin on very rare occasions so I do not want to set-up my manifest to require permanent elevation. How can I Programmatically request elevation only when I need it? I am using C# WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent()); bool hasAdministrativeRight = pricipal.IsInRole(WindowsBuiltInRole.Administrator); if (!hasAdministrativeRight) { RunElevated(Application.ExecutablePath); this.Close(); Application.Exit(); } private static bool RunElevated(string fileName) { //MessageBox.Show("Run: " + fileName);