windows

Python - query network interface setting

Hi, My dream is to query the network card setting on WIN using python. What I need is to query if the NIC is set to full duplex and if it is set to 1000Mb full. WMI class named Win32_NetworkAdapterConfiguration doesn't provide these info.Alternatively a cmd command line sulution can be insteresting as well (via calling from python). Th...

How can I use _stprintf in my programs, with and without UNICODE support?

Microsoft's <tchar.h> defines _stprintf as 'swprintf' if _UNICODE is defined, and 'sprintf' if not. But these functions take different arguments! In swprintf, the second argument is the buffer size, but sprintf doesn't have this. Did somebody goof? If so, this is a big one. How can I use _stprintf in my programs, and have them work with...

C# Running a winform program as someone other than the logged on user.

I need my winform program to run as another user (it will run under task scheduler) and not the logged on user. I suspect the trouble is my app is gui based and not command line based (does this make a difference) so the gui needs to load do its thing and then close. Is this possibly under XP or Vista? Thanks ...

Switching to Linux for Windows development, bad idea?

I was contemplating switching to Linux for C++ development, coming from a Windows environment. Is this a bad idea? My workplace uses Windows and Visual Studio for our projects (some C# and java too, but right now I'm only developing in C++). If they decide to put me on a C# project, would development still possible (mono?)? What are the...

Can SVN handle case sensitivity issues?

Is there a way to force SVN to be case insensitive? We have an issue where a user commits from a linux environment with files say "file.ext" and "File.ext". Works just fine. The problem, however, is when a user on a MAC OSX or Windows attempts an update/checkout. The two files are considered the same and the action fails in error. ...

CreateProcessWithLogonW() problems - Need to launch sub-processes with the same user

I have a Windows executable that is launched from within a service by calling CreateProcessWithLogonW() with a set of specfied user details. This works fine and the process starts as expected. However, when this process tries to launch other processes itself, currently just using CreateProcess() these start then die straight away - they...

Better way to bind generic List to DomainUpDown control (text spin control)

I have been trying to find out how to bind data to a System.Windows.Forms.DomainUpDown() control. Currently I have only come up with: private void Init() { List<string> list = new List<string>(); list = get4000Strings(); //4000 items foreach (string item in list) { ...

How to render narrow non-breaking spaces in HTML for Windows?

In French, typography requires that we use narrow non-breaking space (U+202F) at various places (“Comme ça !”). Apparently every browser on windows fails to support that and they all display a weird character instead. This works on most browsers on Mac OS X as well as Linux. Does anyone know how to make Windows browsers render it corre...

Is there a lightweight portable windows web server?

I'm looking for a lightweight portable web server for windows capable of serving arbitrary folders in the file system and supporting at least one scripting language. It shouldn't need to setup htdocs folder and config files. For test purposes. ...

How to prevent a control from changing Z order ?

I have user control in .Net where I use a hit test in WndProc to allow resizing it in runtime with the mouse. The problem is that after the hit test succedes (mouse press, drag to resize, mouse release) the control jumps upwards in the Z order and ruins it position in the form. I need the hit test since it's a very customized control. ...

Software Testing against multiple versions of SQL Server

I'm currently working on a test plan and ran into a possible problem and I was wondering if anyone had any suggestions. The application uses SQL Server and it can connect between the different versions for compatibility (2000, 2005, 2008). Well i'm trying to set up some test machines and was wondering how I should set things up. Shoul...

Normally should it be ok to install 1.86 with the one-click installer and then overwrite the install directory with 1.9? Or should I not have done that?

I used the one-click installer to install 1.86 a while back. I wanted to upgrade to 1.9 but since there's no one-click installer for 1.9 I just downloaded the 1.91 binary and overwrote my 1.86 install. Didn't work so well. I got errors all over the place afterwards. What's the proper way to upgrade (for a dummy, i.e. me)? The downloa...

What Windows API to look into for building a scheduling application?

Why not use the Windows scheduler? I have several applications that have to run at certain times according to business rules not the typical every weekday at 1pm. I also need a way for the applications to provide feedback of their progress so that I can have rules that notify me when the applications are running slow or aren't even run...

Creating a Windows checkbox in a VBScript that will be executed by cscript.exe

If I have a VBScript like... inputControl1 = InputBox("Hello World") WScript.Quit How can a check box be created in there rather then the InputBox? I know VBScript itself does not have a checkbox control like the InputBox, but is there some library I can use to do something like the following? inputControl1 = CreateObject("library.c...

How to screen capture my program?

Duplicate: Best way to take screenshots of a window with c++ (windows) I have a Windows (2000/XP/Vista/W7) C++ desktop application that would like to save a screen capture of itself. It is an MFC dialog application. Can someone pass me a pointer that would get me on the road to implementing this feature? ...

API to Login Windows user

I would like to programmatically login another windows user in interactive mode. I've created new Windows user account and would like to switch system to that account without of user interaction. Could you please point me to some API commands or MSDN pages? Thanks ...

Getting the symbols with xperf

I read through the docs and used the commands outlined however for some reason I dont seem to be getting any symbols, just a series of "unknowns" in the function column of the summary table for everything except the topmost set of the app I was trying to debug.... I set the enviromental variable to the microsoft server and the direcories...

How to determine a windows executables DLL dependencies programatically?

Anybody know how to determine what DLL's a binary depends on using programmatic methods? To be clear, I am not trying to determine the DLL dependencies of the running exec, but of any arbitrary exec (that may be missing a required DLL). I'm looking for a solution to implement in a C/C++ application. This is something that needs to be ...

How to convert between timezones with win32 API?

I have date strings such as 2009-02-28 15:40:05 AEDST and want to convert it into SYSTEMTIME structure. So far I have: SYSTEMTIME st; FILETIME ft; SecureZeroMemory(&st, sizeof(st)); sscanf_s(contents, "%u-%u-%u %u:%u:%u", &st.wYear, &st.wMonth, &st.wDay, &st.wHour, &st.wMinute, &st.wSecond); // Timezone correctio...

How do I create a windows service with Python

This is a duplicate of this question. Please close. I really need my python program to run as a windows service. How can I do this? ...