windows-vista

programmatically run cmd.exe as administrator in vista, C#

点点圈 提交于 2019-12-30 06:39:45
问题 I have a visual studio setup and deployment project. I've added a .cmd script in it. The script would need administrator privileges 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 my console application which contains the following code. ProcessStartInfo p1 = new ProcessStartInfo(); p1.UseShellExecute = true; p1.Verb = "runas"; p1

programmatically run cmd.exe as administrator in vista, C#

三世轮回 提交于 2019-12-30 06:39:13
问题 I have a visual studio setup and deployment project. I've added a .cmd script in it. The script would need administrator privileges 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 my console application which contains the following code. ProcessStartInfo p1 = new ProcessStartInfo(); p1.UseShellExecute = true; p1.Verb = "runas"; p1

Sending and receiving data over USB port

点点圈 提交于 2019-12-30 05:10:10
问题 I'd like to send/receive data over a USB port to a device (from my vista pc). Is there a free/cheap library out there that can do this, and how involved would this project be (not taking into account what's being sent or received) ? 回答1: You don't specify what's going on here. Does the device already exist? Is it already a USB device? If you already have a USB device, then the manufacturer should be able to help. If you are building the device, then you might want to look at something like a

How do I add my application in the Default Programs list of Windows Vista/7?

僤鯓⒐⒋嵵緔 提交于 2019-12-30 02:20:14
问题 So many programs feature a list of possible extensions and protocols under the "Default Programs" control panel applet. "Set Default PRograms", more precisely. (Vista & 7) I wish to add my programs in that list and set some extensions that it can handle. One more thing. My program supports addons for opening more files, so that list should be dynamic (I can add more extensions or even protocols at any time) By the way, yes, I know, this is not exactly a programming question. It'd be my humble

Programmatically disable/enable network interface

a 夏天 提交于 2019-12-29 03:28:06
问题 I'm trying to come up with a solution to programmatically enable/disable the network card - I've done a ton of research and nothing seems to be a workable solution in both XP and Vista environments. What I'm talking about is if you went into the Control Panel 'Network Connections', right clicked on one and picked either enable or disable. Ideally I'd like to use a library, but if worse comes to worse I supposed I could call out to a commandline app, but that's absolute worst case. Here's what

How to code a new Windows Shell? [closed]

醉酒当歌 提交于 2019-12-28 12:43:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . How would I go about coding a new Windows Vista Shell? 回答1: Everything you need to do as shell has never been documented, so there are some issues with file change notifications etc. The basics are: SystemParametersInfo(SPI_SETMINIMIZEDMETRICS,...MINIMIZEDMETRICS) with

File creation fails in standard account (Vista)

ε祈祈猫儿з 提交于 2019-12-25 04:39:14
问题 I have created C# application, which creates a image file on Desktop. It works fine on XP and Vista (admin account) but it fails to create image file on Desktop in Vista (standard account). Whether i have to include manifest file to the application to work properly? If i add manifest, will it work on XP without any problems? Sorry if it is lame question. Thanks in advance. 回答1: Make sure you're using the System.Environment.SpecialFolder class to tell you where your user's Desktop really is.

Where is `USERPROFILE` on Vista32?

故事扮演 提交于 2019-12-25 00:43:22
问题 This is a follow-up question to Where are my environment variables set?. In that post it's mentioned how one can find environment variables using the Windows GUI or RegEdit. What's strange to me is that SET from the command line displays a USERPROFILE=C:\Users\brianjd but it doesn't show up using the Windows GUI or RegEdit methods. Q: Where is USERPROFILE ? Why does it show up using SET but doesn't show up using Windows GUI or RegEdit? 回答1: I think you may find what you need in HKLM\SOFTWARE

Usb Driver on 64bit Windows

混江龙づ霸主 提交于 2019-12-24 16:24:25
问题 I have a pretty generic 64bit driver based on bulkusb.sys in WDK. It's been working for years with an embedded program, but now it is needed to work on Vista 64. From all the documentation I've tried to look through there doesn't seem to be anything affecting it, except compiling it for the 64bit environment, and yet when I compile it with the AMD64 build environment, I get "driver not intended for this platform" error message when it's trying to open the sys. What could be the solution for

ALT+TAB in Vista activates main window instead of previously active child window

蓝咒 提交于 2019-12-24 16:16:11
问题 My app (written in C++) uses Win32 (not MFC) to create a couple of windows with CreateWindowEx. The main window gets the desktop as parent, the child windows get the main window as parent. my problem: my app has an active child window I switch to another app (per click, ALT+TAB or other, doesn't matter) I switch back to my app with ALT+TAB Now the main window of my app is activate, not the child window anymore. If I switch back clicking the taskbar entry, the child window remains active. This