windows

Using subprocess to run Python script on Windows

Is there a simple way to run a Python script on Windows/Linux/OS X? On the latter two, subprocess.Popen("/the/script.py") works, but on Windows I get the following error: Traceback (most recent call last): File "test_functional.py", line 91, in test_functional log = tvnamerifiy(tmp) File "test_functional.py", line 49, in tvname...

Is there an equivalent to XKB geometry on Windows and OS X?

I am displaying an on-screen keyboard overlay, and ideally I would like to display something resembling the user's actual keyboard, which I do under X with XkbGetGeometry, much like xkbprint. I was wondering if there was something comparable on OS X and Windows. ...

Interact with other desktop-applications in windows using C# winforms

I was wondering if its possible to interact with other programs someone with my program. For example clicking a button on another program etc. etc. I'm not sure if this is even possible but if it is could someone provide a little sample code in C#. Thanks ...

Use Ruby to permanently (ie, in the registry) set environment variables?

On Windows, how can I use Ruby to permanently set an environment variable? I know I need to change the registry (through the win32ole module?) but I am a novice with regard to scripting the registry. I understand that I can say ENV['FOO'] = "c:\bar\baz" to set the environment variable FOO for the session. However, I am instead interes...

Screenshot taken by the Application is blank on Vista

Hi, We have a C# application which captures a screenshot of desktop. It works well on windows XP but on vista the screenshot picture is blank. Why so ?? Any solution to this ? ...

Bash shell for Windows?

Is there anything like bash shell in Windows with at least basic set of frequently used commands like ls, pwd, tail, etc? ...

How do I get a registry value in Inno Setup when the value only uses the default name?

I'm trying to get the install directory of an application from the Windows Registry (Google Sketchup in this case) with Inno Setup's Pascal scripting so I can install a plugin there. The registry key doesn't have a name, it just has "(Default)" in Regedit. I tried this: RegQueryStringValue( HKLM, 'SOFTWARE\Google\Google Sketchup 6', ...

Why do I have problems constructing a complicated GUI using Perl-Tk on Windows?

I have a Perl-Tk GUI with about 50 sub-windows. In each sub-window there are about 50 buttons and 50 menus (each menu has about 4 options). When I run it on UNIX/Linux/Solaris, it runs smoothly. When I run it on Windows, the GUI freezes in the middle of loading so I see only some of the buttons, or the GUI doesn't show at all it seem...

Is it possible for a library consumer to override C++ exceptions handling?

I have a C++ DLL with code like this: LogMessage( "Hello world" ); try { throw new int; } catch( int* e ) { LogMessage( "Caught exception" ); delete e; } LogMessage( "Done" ); This DLL is loaded by some third-party application and the code above is invoked. The problem is only the first LogMessage is invoked - even though ...

How to port USB RNDIS device driver?

Firstly: I am totally a newbie for this kind of work. I have a USB rndis device driver for some hardware only working in XP/2000/Vista. But I want to port this to CE or Linux, and vendor also says that developer should do that. In summary, I have XP drivers and Interface/End point configurations the driver has. And I have two questions...

Looking for Microsoft Index Server ASP.NET samples

i am not a programmer, but i can frankenstein code snippets with sufficient proficiency that if, by the grace of a few good souls, i could come across some sample ASP code that acts as a GUI to the ms index server, i could certainly make it work and look good. if anyone can offer any help, i would do a backflip. but i won't put it on yo...

Is Microsoft ressurecting Managed DirectX?

Today I saw that Microsoft announced 0.85 version of: "Windows® API Code Pack for Microsoft® .NET Framework" This pack is targeted for Windows7 OS, although most features is supposed to work under Vista. One of this pack's features is support for DirectX 11. Knowing that few years ago Microsoft stopped development of Managed DirectX,...

Is it possible to roll my own Amazon Machine Image with a pre-Windows 2003 OS?

I've been researching EC2 over at Amazon Web Services and the website notes: "You are also empowered to use our bundling tools to upload your own operating systems." Now I've been trying to find out if the only Windows version that is supported is Windows Server 2003 or if I would be able to virtualize an older version of Win...

WxPython differences between Windows and Linux

The tutorials I've found on WxPython all use examples from Linux, but there seem to be differences in some details. For example, in Windows a Panel behind the widgets is mandatory to show the background properly. Additionally, some examples that look fine in the tutorials don't work in my computer. So, do you know what important differ...

Permission in Report Builder 2.0

How do you set up permissions for ReportBuilder 2.0 if you arent using Windows Authentication? ...

Using floats in Windows DLL function parameters.

I am writing an unmanaged DLL in C++. Is using float as a function parameter in a Windows DLL a good idea? I'd like my DLL to be usable from as many languages as possible (VB6, .NET, etc). To this end, I've used STDCALL and avoided C++ types. Will most languages handle float correctly? If not, what should I use? ...

IMovieControl::Run fails on Windows XP?

Actually, it only fails the second time it's called. I'm using a windowless control to play video content, where the video being played could change while the control is still on screen. Once the graph is built the first time, we switch media by stopping playback, replacing the SOURCE filter, and running the graph again. This works fine ...

Can autoplay and WIA be programatically reset to the default of "Ask me?"?

I have code that ads both Autoplay and WIA handlers for reading images files from memory cards and digital cameras, respectively, and it works fine. However, I'd like to reset the Autoplay and WIA handlers to the default of "Ask me what to do every time" the first time my application is run. Why? Because if the user has the handlers s...

Changing the Total Number of Recent Files

I'd like the user to be able to edit the number of recent files shown in the File menu of my MFC application. I've used two very good references: http://www.codeproject.com/KB/menus/changemru.aspx http://www.microsoft.com/msj/0899/c/c0899.aspx It involves deleting and recreating the CRecentFileList object stored in CWinApp::m_pRecen...

Redirect batch stderr to file

I have a batch file that executes a java application. I'm trying to modify it so that whenever an exception occurs, it'll write the STDERR out to a file. It looks something like this: start java something.jar method %1 %2 2>> log.txt Is there a way I can write the arguments %1 and %2 to the log.txt file as well? I don't want to wri...