windows-vista

Forcing my MFC app to run as Administrator on Vista

I have an MFC app built using Visual Studio 2008 and it needs to run on W2K, XP, 2003 and Vista. The application writes to HKLM in the registry and will only work on Vista if you run it as Administrator. My question is: can I force the app to run as Adminstrator automatically? Does it involve creating a manifest file? At the moment I...

Enumerate all Vista/7 audio "sessions", as displayed in the Volume Mixer

In windows Vista & 7*, how would you enumerate the programs which are currently playing audio (or trying to, in the event master volume is muted)? Essentially, I need the data displayed in the Volume Mixer found in the notification area. Master volume is pretty easy: ISimpleAudioVolume::GetMasterVolume() http://msdn.microsoft.com/en-us...

programatically run cmd.exe as adminstrator in vista, c#

I have a visual studio setup and deployment project. I've added a .cmd script in it. The script would need administrator privilages to run. When user clicks on the setup.exe, UAC prompts the user for Admin permissions. So i assumed that all processes created and called within setup.exe will run in admin capacity. So i made the setup call...

Are there any way to know whether user open the UAC dialog

I have a simple video player SW, but the render window goes black or freezes after UAC message on Vista 32 or 64. Are there any way to know whether user open the UAC dialog? ...

Windows batch file starting directory when 'run as admin'

I have a batch file which is in a directory and must be run from there as well because it updates files within this directory. This works perfectly fine, except when the user runs the batch file as administrator (required on Vista). Then the starting directory is C:\Windows\System32. Is there any way to still be able to know from which d...

Where Does Windows Vista Store The Profile Image?

Hello Everyone, I was just wondering if anyone knows where vista stores the profile images for each user account. I know in XP it is stored in C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures, but when I browse the equivalent path in vista, all I have is a user.bmp and a guest.bmp. I understand that t...

How to develop using WIA 1 under Vista?

I'm using VS2008 SP1 under Vista SP1. My .Net-program uses a COM reference to WIA (Microsoft Windows Image Acquisition Library v2.0). I'm using CommonDialogClass.ShowAcquireImage to scan a document and it's working fine. One of my customers is running XP. As I understand WIA, under XP you have to use WIALib (WIA 1.0). Is it possible to d...

SecurityException when using Registry.LocalMachine.OpenSubKey

I'm developing an application that needs to write to the registry. It works fine on XP, but when I run it on Vista, from Visual Studio, I get a security exception in: Registry.LocalMachine.OpenSubKey("SOFTWARE", true); I'm trying to write a new key into that branch of the registry. What's the right way to do this, firstly so that I ca...

Local Email Test on Vista Home

What is the best way to test sending emails from a dev machine using Vista Home Basic? ...

Disabling UAC programmatically

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 ...

Vista Home Premium Joining the Domain - HOW?

I know, that by design Vista home premium cant joining the domain? But perhaps there is a workaround? I AFAIK Home Premium could be upgraded only to Ultimate and there is not a way to Upgrade to Business where Domain joining feature is allowed? ...

SysTray Icon not visible after restart for a program running as administrator.

I have a simplest form of an application, in which I am showing a SysTray Icon and adding the application in Startup items. Application is developed in C#. I want tray icon to be shown even after restart of the machine. Currently, I am facing a strange behavior while running the exe using "Run as Administrator". When I use under administ...

How to create/script complex speech shortcuts? (in vista)

has MS Vista hooks to create something like this? "I have an idea" => popup my preferred idea manager "commit $1" => open the commit window of subversion for project $1 for hot keys there is a great API from Microsoft. But I want to do such things with the speech API. Can I do this with scripts/config/program? ...

How can I get the process filename under Vista?

I have an application that aids people with disabilities. In order to work, it tracks the what window is currently in the foreground. Normally, I use this function to get process executable. bool GetWindowProcessExe2(HWND hwnd, wxString& process_exe) //LPTSTR buf, DWORD size) { DWORD result = 0; DWORD pid = 0; ...

Vista Recycle Bin Maximum Size

Does anyone know how to set the Maximum Size of the Recycle Bin via script? Whether its written in batch or vbs or just a reg file? I've been exploring this idea for the last few days, and can't get an answer. Maybe someone here knows how. I'm wanting to add it to my Vista Cleanup Script =) ...

Screen capture and event with Vista UAC

I'ved developed a c# application that captures screens using bitblt and sends keyboard and mouse events using calls to keybd_event and mouse_event. According to Microsoft I needed to modify the app.manifest with: requestedExecutionLevel level="highestAvailable" uiAccess="true" Sign the application and place it in a trusted location...

Starting exe as a current user domain in Vista

I am starting an application (EXE) through Installer( MSI). While installing the MSI in Vista, it automatically run with Administrator rights (after thorough UAC). Hence the application started also runs under system user. I want this application to run Under Current User instead. In order to run application in current user I need to ex...

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

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 ...

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

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. ...

Vista + VB.NET - Access is denied while trying to start/stop a Windows Service from within an application

I get the following error in Vista while trying to start/stop a Windows Service that I created. Cannot open ServiceName service on computer '.'. The same code works for XP. What should I do to solve this problem? ...