windows-vista

Open default browser as standard user (C++)

做~自己de王妃 提交于 2019-12-03 20:16:24
I'm currently using ShellExecute "open" to open a URL in the user's browser, but running into a bit of trouble in Win7 and Vista because the program runs elevated as a service. When ShellExecute opens the browser, it seems to read the "Local Admin" profile instead of the user's. So for example, if the user at the keyboard has Firefox as his default browser, it may open IE (which is the admin's default). I know that the "runas" verb can be used to elevate, but how do you do it the other way around? Is there a way to open a URL in the default browser on a standard user's desktop from a service?

Is it possible to have advertised shortcuts and ProgId for a per user MSI?

六眼飞鱼酱① 提交于 2019-12-03 20:12:25
I have a permachine MSI installer that I'm converting to a per user installer that is installing files to the LocalAppDataFolder. To get rid of ICE38 warnings I added a registry as the keypath. The problem is in one of my components I have a advertised shortcut and ProgId. I'm now getting: ICE19 - 'settings' advertises component: 'CMP_Rapid'. This component cannot be advertised because the KeyPath type disallows it ICE19 - Shortcut: 'SHC_RunConfigExe' advertises component: 'CMP_Rapid'. This component cannot be advertised because the KeyPath type disallows it. ICE50 - Component 'CMP_Rapid' has

Session 0 Isolation

狂风中的少年 提交于 2019-12-03 18:15:17
问题 Vista puts out a new security preventing Session 0 from accessing hardware like the video card, and the user no longer logs into session 0. I know this means that I cannot show the user a GUI, however, does that also mean I can't show one at all? The way my code is set up right now, it would be more work to make it command line only, however if I can use my existing code and just programmatically manage the GUI it would take a lot less code. Is this possible? The article from MSDN says this:

programmatically kill a process in vista/windows 7 in C#

可紊 提交于 2019-12-03 18:01:58
问题 I want to kill a process programmatically in vista/windows 7 (I'm not sure if there's significant problems in the implementation of the UAC between the two to make a difference). Right now, my code looks like: if(killProcess){ System.Diagnostics.Process[] process = System.Diagnostics.Process.GetProcessesByName("MyProcessName"); // Before starting the new process make sure no other MyProcessName is running. foreach (System.Diagnostics.Process p in process) { p.Kill(); } myProcess = System

chcp 65001 and a .bat file

耗尽温柔 提交于 2019-12-03 17:45:47
问题 I have a problem with chcp 65001 command in Windows shell. I need to generate a list of files in a folder. So I ran cmd.exe, typed cd folder dir /B /O:N > list_of_files.txt It worked, but I had a problem with special, non-ASCII characters which are in some file names. So I added chcp 65001 Everything worked, but when I put these commands into a .bat file, the script doesn't work. So cd folder chcp 65001 dir /B /O:N > list_of_files.txt doesn't generate the list. and cd folder chcp 65001 && dir

What is PnPUtil.exe location in 64bit systems?

送分小仙女□ 提交于 2019-12-03 16:23:08
I would like to install my USB device driver [.inf file] using PnPUtil.exe utility on both 32bit and 64bit systems for Windows Vista and Windows 7. I tested on my machine [Windows 7 32bit] and everything was fine because PnpUtil.exe is located in: C:\Windows\System32\PnPUtil.exe . But in 64bit Windows 7 the utility is not in this directory. When I tried installing driver on different Windows 7 - 64bit machine I could found PnPUtil.exe in this location: C:\WIndows\winsxs\amd64_microsoft-windows-pnputil_31bf3856ad364e35_6.1.7600.16385_none_5958b438d6388d15\pnputil.exe and the test was also fine.

How to get size and position of window caption buttons (minimise, restore, close)

那年仲夏 提交于 2019-12-03 15:34:40
Is there an API call to determine the size and position of window caption buttons? I'm trying to draw vista-style caption buttons onto an owner drawn window. I'm dealing with c/c++/mfc. Edit: Does anyone have a code example to draw the close button? Mark Ingram I've found the function required to get the position of the buttons in vista: WM_GETTITLEBARINFOEX This link also shows the system metrics required to get all the spacing correct (shame it's not a full dialog picture though). This works perfectly in Vista, and mostly in XP (in XP there is slightly too much of a gap between the buttons).

Silverlight 2 Sidebar Gadget

自古美人都是妖i 提交于 2019-12-03 13:52:30
How do you display a Silverlight 2.0 application in a Vista Sidebar gadget? Whenever I load a gadget with the standard Silverlight 2 object tag, I get the no-silverlight default content instead of the app. So, what's the trick to allowing it to run? This is how I am currently trying to pull it off: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Unicode" /> <title>Silverlight Test</title> <style type="text/css"> body { margin: 0; width: 130px; } </style> </head> <body> <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%"

Does anybody know what means ShellHook message HSHELL_RUDEAPPACTIVATED?

风格不统一 提交于 2019-12-03 13:03:53
I am writing application which establishes shell hooks to get shell events (I am using C# if it matters). I am using this example: http://msbob.spaces.live.com/blog/cns!DAFD19BC5D669D8F!132.entry Hook is working fine but I do not receive message on which I am interested: HSHELL_WINDOWACTIVATED (all other window-related events work well). Instead I am receiving message with code 32772 which should be HSHELL_RUDEAPPACTIVATED (some googling helped). But I can't understand why I am not receiving HSHELL_WINDOWACTIVATED at all and what this HSHELL_RUDEAPPACTIVATED message means. MSDN does not have

How to install Delphi 7 on Vista

房东的猫 提交于 2019-12-03 12:53:12
问题 I tried to install Delphi 7 on Vista several times and Vista prevented me from doing so by telling me that there are known problems with this application (Delphi 7). Several other people in my company experienced problems with installing D7 on Vista. This lead to the conclusion that we were at risk with our D7 application, as the company could within the lifetime of the app switch to Vista or Windows 7 and newer Delphi versions are not in the policy of the company. Therefore management