windows-vista

How do you retrieve the tags of a file in a list with Python (Windows Vista)?

血红的双手。 提交于 2019-11-26 11:27:57
问题 I want to make something of a tag cloud for various folders I have, but unfortunately, I can\'t seem to find a way to access the tags of a file in Windows Vista. I tried looking at the win32 module, and os.stat, but I can\'t seem to find a way. Can I get some help on this? 回答1: I went about it with the win32 extensions package, along with some demo code I found. I posted a detailed explanation of the process on this thread. I don't want to reproduce it all here, but here is the short version

Disabling UAC programmatically

拟墨画扇 提交于 2019-11-26 11:09:53
问题 Is it possible to programmatically disable UAC in Vista? Or, can I make my application run unrestricted by the UAC setting in any way? FYI, the application needs to mount hard drives on the fly, which is why I can\'t ask for UAC permission each time... Update: I\'m looking for something in line with what Kosi2801 mentioned, basically to ask the user to always start the program in an \'elevated\' mode. I\'d want the permission to be a 1 time thing, I\'m not saying that I programmatically

Executing a Jar on Vista with a double click

為{幸葍}努か 提交于 2019-11-26 09:28:44
问题 This pretty much has me defeated. On XP and earlier versions of Windows you could customise Open With filetypes to include java - jar \"myjar.jar\", but on Vista this functionality seems to have been removed. I can of course create a .bat file to launch my application, but is it possible to make Vista execute a .jar as required? 回答1: You can do it from the command line with 2 utilities. The first one, ASSOC, is used to create a file association. To verify if there is one defined for JAR type

C++ - GetUserName() when process is run as administrator

余生颓废 提交于 2019-11-26 08:35:48
问题 I have a simple C++ program that prompt the user name #include <windows.h> #include <Lmcons.h> #include <winbase.h> int _tmain(int argc, _TCHAR* argv[]) { wchar_t username[UNLEN + 1]; DWORD username_len = UNLEN + 1; ::GetUserName(username, &username_len); MessageBox(NULL, username, NULL, 1); return 1; } GetUserName() performs as expected in administrator accounts, meaning print the real user name. However, when run as administrator in a non-administrator account , I get the administrator name

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

安稳与你 提交于 2019-11-26 07:33:24
问题 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

Get SSID of the wireless network I am connected to with C# .Net on Windows Vista

ε祈祈猫儿з 提交于 2019-11-26 06:37:19
问题 I\'d like to know if there is any .Net class that allows me to know the SSID of the wireless network I\'m connected to. So far I only found the library linked below. Is the best I can get or should I use something else? Managed WiFi (http://www.codeplex.com/managedwifi) The method that exploits WMI works for Windows XP but is it not working anymore with Windows Vista. 回答1: I resolved using the library. It resulted to be quite easy to work with the classes provided: First I had to create a

How to request administrator permissions when the program starts?

℡╲_俬逩灬. 提交于 2019-11-26 06:27:18
问题 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? 回答1: Add the following to your manifest file:

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

冷暖自知 提交于 2019-11-26 06:06:44
问题 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# 回答1: WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent()); bool hasAdministrativeRight = pricipal.IsInRole(WindowsBuiltInRole.Administrator); if (!hasAdministrativeRight) { RunElevated(Application.ExecutablePath); this.Close(); Application

Does Windows 7 restrict folder access as Vista does?

南笙酒味 提交于 2019-11-26 05:56:39
问题 I noticed that in my application, most compatibility problems were caused by \'access denied\' for some folders, such as: Application Data [C:\\ProgramData] Desktop [C:\\Users\\Public\\Desktop] Documents [C:\\Users\\Public\\Documents] Favorites [C:\\Users\\Public\\Favorites] Start Menu [C:\\ProgramData\\Microsoft\\Windows\\Start Menu] Templates [C:\\ProgramData\\Microsoft\\Windows\\Templates] Does Windows 7 have the same problem as Vista? With help from the members of Stack Overflow, I know

How to run NOT elevated in Vista (.NET)

China☆狼群 提交于 2019-11-26 04:51:52
问题 I have an application that I have to run as Administrator. One small part of that application is to start other applications with Process.Start The started applications will also be run as administrators, but I\'d rather see them run as the \'normal\' user. How do I accomplish that? /johan/ 回答1: The WinSafer API's allow a process to be launched as a limited, normal, or elevated user. Sample Usage: CreateSaferProcess(@"calc.exe", "", SaferLevel.NormalUser); Source code: //http://odetocode.com