windows-vista

Get HDD (and NOT Volume) Serial Number on Vista Ultimate 64 bit

醉酒当歌 提交于 2019-12-18 11:19:01
问题 I was once looking for getting the HDD serial number without using WMI, and I found it. The code I found and posted on StackOverFlow.com works very well on 32 bit Windows, both XP and Vista. The trouble only begins when I try to get the serial number on 64 bit OSs (Vista Ultimate 64, specifically). The code returns String.Empty, or a Space all the time. Anyone got an idea how to fix this? EDIT: I used the tools Dave Cluderay suggested, with interesting results: Here is the output from

Get HDD (and NOT Volume) Serial Number on Vista Ultimate 64 bit

被刻印的时光 ゝ 提交于 2019-12-18 11:18:40
问题 I was once looking for getting the HDD serial number without using WMI, and I found it. The code I found and posted on StackOverFlow.com works very well on 32 bit Windows, both XP and Vista. The trouble only begins when I try to get the serial number on 64 bit OSs (Vista Ultimate 64, specifically). The code returns String.Empty, or a Space all the time. Anyone got an idea how to fix this? EDIT: I used the tools Dave Cluderay suggested, with interesting results: Here is the output from

Function for getting localized path?

不羁岁月 提交于 2019-12-18 06:13:16
问题 Windows 7 (and probably Windows Vista) display localized folder names using the LocalizedResourceName entry in the desktop.ini file. For my Documents folder, this looks like [.ShellClassInfo] LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770 IconResource=%SystemRoot%\system32\imageres.dll,-112 IconFile=%SystemRoot%\system32\shell32.dll IconIndex=-235 (see this question) This way the explorer displays the path "C:\Users\Username\Documents" as "C:\Benutzer\Username\Dokumente" on a

Save File to Desktop in Vista/Windows 7 in .NET 2.0

社会主义新天地 提交于 2019-12-18 05:04:08
问题 I'm working on updating one of our applications. It must use .NET 2.0. One portion creates a file on the Desktop using FileStream fs = new FileStream(Environment.GetFolderPath (Environment.SpecialFolder.DesktopDirectory), FileMode.Create); But I get an UnauthorizedAccessException in Windows 7 (and Vista too, I'm assuming, though I haven't tested that yet). I looked into elevation (not for the entire program, but for a separate assembly which would create the file and perform actions on it);

Git checkout and reset on Windows occasionally shows random files have changed

六眼飞鱼酱① 提交于 2019-12-18 04:13:13
问题 Often when I do a checkout of a different branch, or a reset, I will get 'permission denied' errors from windows for one to a dozen files - but the particular files vary from run to run. Here's the output from a test I just did, with GIT_TRACE=1. The trace only added the one line before the error message: $ git checkout master trace: built-in: git 'checkout' 'master' error: git checkout-index: unable to create file dotnet/src/myfile.cs (Permission denied) D dotnet/src/myfile.cs Switched to

Vista UAC - Trouble Mapping Network Drives

冷暖自知 提交于 2019-12-18 04:12:50
问题 We have an application that programmatically maps network drives. On Vista with UAC on, we get some strange issues. Our application maps the drive non-elevated, so if the user browses explorer and double clicks to run an exe, it prompts for UAC. So when they approve it, it prompts for a username/password for the share... Strange since the credentials are saved. It turns out, an elevated process cannot access a mapped drive that was mapped from a non-elevated process. To see this issue in

Write in “ProgramData” folder (W7 and Vista) .NET

久未见 提交于 2019-12-18 03:55:17
问题 I install my app under "Program Files" directory. And I install data, under "ProgramData" directory: Environment.SpecialFolder.CommonApplicationData In programData I have created folder to save data. Example: C:\ProgramData\MyApp\MyData\here I have files and folders Under XP all runs fine. But not under Vista or W7 OS. I can read files in this directory, but I can not write files, I can not create new files, etc. The user is logged as Admin. Where I can store data without restrictions? I need

How to detect if a virusscanner and/or firewall is installed? (And a few other security-related Q's.)

人盡茶涼 提交于 2019-12-18 03:03:26
问题 I have an application and I'm trying to make sure it's running in a secure environment. First of all, I check if Windows is genuine, which makes it more likely that the user keeps it up-to-date. If not, I just pop up a message warning the user there's a possible risk because he still needs to validate Windows. Now, I want to do a bit more. I also want to check if the user has installed a virusscanner. I don't care which one, as long as he has installed one. Then the same for checking if a

C++: Get MAC address of network adapters on Vista?

此生再无相见时 提交于 2019-12-17 23:37:58
问题 We are currently using the NetBios method, and it works ok under XP. Preliminary tests under Vista show that it also works, but there are caveats - NetBIOS has to be present, for instance, and from what I've been reading, the order of the adapters is bound to change. Our alternative method - with SNMPExtensionQuery - seems to be broken under Vista. The question is: do you know of a reliable way to get a list of the local MAC addresses on a Vista machine? Backwards compatibility with XP is a

python IDLE shell appears not to handle some escapes correctly

一笑奈何 提交于 2019-12-17 21:37:02
问题 For example \b backspace prints as quad (shown as [] in example below). But \n newline is Ok. >>> print 'abc\bd' abc[]d >>> print 'abc\nd' abc d Im running under Vista (pro), python 2.7 Ive tried googling this issue generally and in SO and cant find anything relevant, which seems odd and makes me wonder if theres some setting or other may be wrong in my setup. Not sure what to look for. 回答1: What am I doing wrong or what should I be looking for? Is it reasonable to expect backspace,