windows-7

Registry ReadString method is not working in Windows 7 in Delphi 7

The following code sample used to return me windows id before, but now it doesn't work, and returns empty string, dunno why. function GetWindowsID: string; var Registry: TRegistry; str:string; begin Registry := TRegistry.Create(KEY_WRITE); try Registry.Lazywrite := false; Registry.RootKey := HKEY_LOCAL_...

.NET Framework 4.0 and drawing on Aero Glass issue

In my application I have a form which I tweak by using the DWM API's method DwmExtendFrameIntoClientArea to extend the height of the Aero Glass Title Bar so that part of my form client area is drawn on the Aero frame. To achieve this effect, I also draw a black rectangle on the part of the client area which is 'over' the glass frame so t...

Proper Install Order For Visual Studio 2010 with SQL Server 2008 and Office 2007?

I want to create a Windows 7 64-bit (Ultimate) virtual machine with: Visual Studio 2010 (Ultimate) Office 2007 Enterprise (with Visio 2007) SQL Server 2008 (with SSIS and SSRS) but I am not sure if there is a correct order to install those items such that there will not be a loss of "awareness" of one application from another on tha...

How can I detect when the .NET Framework feature is "turned off" in Windows 7 / Vista?

My application requires the .NET Framework version 3.5. I recently ran into a customer that had the .NET Framework installed but turned off on Windows Vista (also applies to Windows 7). In this case, my installer (InstallShield 2009) does not prompt the user to install the Framework (because it is already installed) and when my applica...

Entity Framework not loading in Windows 7

I had to get a new machine recently. It is Windows 7, loaded with Studio 2008, with Framework 3.5 sp1. When I load pre-existing projects that use the Entity Framework, the projects don't recognize the .edmx files. Any ideas? I'm fully patched and running as administrator doesn't make a difference. Opening as XML and saving I have ma...

Calling IPrincipal.IsInRole on Windows 7

We use NTLM auth in our application to determine whether a user can perform certain operations. We use the IPrincipal of their current Windows login (in WinForms applications), calling IsInRole to check for specific group memberships. To check that a user is a local administrator on the machine, we use: AppDomain.CurrentDomain.SetPrinc...

How do I get the Virtual Machines folder on Win7?

I'm writing a tool called XP-More, which should help manage Windows 7 Virtual Machines. The first thing the tool has to do when launched is find the VM folder. However, turns out that folder is not listed as a Windows Special Folder. I use a workaround, but it's unreliable. Ideally, Environment.GetFolderPath(Environment.SpecialFolder.VM...

Watir::IE.attach(:title,/x/) not working correctly on Win 7 IE8

System: Window 7 Internet Explorer 8 Ruby 1.8 Watir 1.6.5 If I manually open a browser window and then visit a site that causes a second browser window to open and then use the Watir::IE.attach method to find the second browser window everything work fine. The problem is when I open the first Internet Explorer window with the command...

How to force user to user Administrator account in WinForms

I have simple WinForms application where modifying Windows Registry. The problem is that in Vista / Windows 7 I need to force user to switch to administrator. I do not want to force user to Run as Administrator form start of the application. I want him to do it when there is necessity to write to registry. Best case scenario would be ...

Service reference error when moving dev. environment from XP to W7

Hi, I am building an application and I am using web services for getting data from a server. It was working fine when I was developing on my XP machine but had to switch to Windows 7. On the new machine I grabbed the latest version of the code using sourcesafe. However, when I try to add a service reference in the solution or update an...

Windows 7 application taskbar icons, font size and shortcuts

We have come across some behaviour involving the taskbar icons that Windows 7 displays for different applications. I'm wondering whether anybody could shed some light on this: Windows 7 is set with font-size = 110%. Two MFC dialog applications A.exe and B.exe have exactly the same .ico resource embedded in them. A.exe has a shortcut as...

Windows7 explorer context strip hook?

Hy everybody, I'm wondering if it's possible to add a new button via C++ or C# to windows 7 explorer "context strip"(don't know if this is correct name) - like on picture below. My reason for this is because a lot of times I'm switching on&off "Show hidden files, folders and drives" functionality under Tools->Folder option->View. There...

How to check code is compatible with Windows 7

Hello, We are developing using Visual C# 2008 Express a program based on WPF under Windows XP machines (32 bits). The thing is that we have tried to run the program in two Windows 7 machines, one is 32 bits Windows 7 and the other is 64 bits Windows 7. Under Windows XP everything is fine. In Windows 7 machine, it launches in the 32 bi...

Memory randomization as application security enhancement?

I recently came upon a Microsoft article that touted new "defensive enhancements" of Windows 7. Specifically: Address space layout randomization (ASLR) Heap randomization Stack randomization The article went on to say that "...some of these defenses are in the core operating system, and the Microsoft Visual C++ compiler offers o...

WPF Application Hang

Hi, I'm using Windows 7 Professional (x64) and having installed .NET 4.0 RTM on my machine. Since 2 days I'm noticing that every WPF application that I'm trying to run hangs and becomes non responsive (a not responding text is appended to it's title bar) and it's painted white. There is no info regarding any exception, no error messag...

showing error message of missing VB dll

On Windows 7 (32 bits), i have downloaded and installed the windows desktop java application using windows installer of that application. When i re-open application it complains about a missing VB dll. What may be reason complains for missing VB dll and how can i resolved? Any help will be appreciated. FYI: The installer is build us...

Windows 7 64 / Visual Studio 2008 / OpenCV2.1 error: "The application was unable to start correctly (0xhex).."

Hey all, I'm building OpenCV2.1 from top of branch in 64 bit mode, when I link the libraries against my code (that works in 32 bit mode on XP), I get the dialog: "The application was unable to start correctly (0xc0150002) Click OK to close the application" When I start the application. The event viewer is pointing at one of the OpenC...

Confusing permissions for FOLDERID_PublicDocuments and FOLDERID_ProgramData

In trying to answer a question regarding a folder that a program can write to on any version of windows by limited users, i suggested FOLDERID_ProgramData and FOLDERID_PublicDocuments. However, it would seem that not everyone has access to this folder, despite their purpose (ostensibly) being to allow anything to write to them. Why? ...

What is the equivalent "aspnet_regiis -lk" on Windows 7?

Or: how do I find the IIS metabase paths in Windows 7? I used to just run aspnet_regiis -lk, but this is "Not supported in Windows Vista" according to aspnet_regiis help... ...

Windows 7 UAC elevation

I have a single thread that I'd like to run as an administrator in my application. The rest of the application I can happily run as the default user level (asInvoker). Is this possible? I notice there is an "ImpersonateLoggedOnUser" function. Can I somehow use this to log the administrator on and then get the thread to impersonate th...