windows

How to set Windows Services permissions from Powershell?

I need to grant a specific account SERVICE_START permissions for a given Windows service. There seems to be some methods for doing so here, but would prefer a method that's native to PowerShell and doesn't require external tools, for ex. by using Get/Set-ACL cmdlets, or calling some .NET API. Does someone know how to do it in that fash...

How to overcome full-screen app if I want to show my app

There are cases when one needs to start a process based on some events not involving activity of the mouse of keyboard (from hardware or time-based). It works with ShellExecute and ShellExecuteEx generally, but if there's a full-screen app (the one, created borderless with exactly the dimensions of the screen), this launched application ...

Windows phone 7 config / appSettings?

Is there a way to add a config file for WP7 apps like there is for Windows apps and web apps? I just need an easy way to save a few settings I'd rather not create my own object and have to serialize/deserialize an xml file. There doesn't seem to by any kind of item template that I can add to my project so just wondering if anyone has don...

Programatically restart USB device in Windows.

Some software I am developing requires the presence of a USB device (which I interact with as a SerialPort, with a USB-to-UART bridge). Sometimes, after a computer is being restarted from hibernation, the device is not being detected, and I can no longer write to, or read from, the device through its serial port. Having read/write acces...

Invoke a MOUSE CLICK on a certain coordinate outside of my application

Hi all, I am using an application (a game actually) that requires me to join a "ROOM" to start a game. The application is a C++ application (I suppose) running on Windows. When a room is full, you need to wait 5 seconds to join again. I would like to automate this by writing a C# application that will invoke a MOUSE CLICK on a certain ...

where can i get this msvcrt_x64_vc8.lib ?

I am facing some linker error while compling the application(.exe) for 64 bit version.error says "libcmt.lib(wincrt0.obj) : error LNK2019: unresolved external symbol WinMain referenced in function __tmainCRTStartup". So i came to know that i need to link the msvcrt_x64_vc8.lib . can you suggest me,where can i get this lib? ...

Using curb gem and libcurl on Windows

I am trying to install the curb gem, which is libcurl bindings for Ruby, and of course I need to have "A working (lib)curl installation, with development stuff" installed on my computer. So, I went to the cURL Download Wizard and downloaded this package. But adding the bin into my PATH does not produce improvement and I still get an er...

Programmatically power off the windows machine immediately

Can I create a simple program to power off the windows machine immediately? I would like the behavior to be like pressing PWR OFF/RESET button. So the power is cut off immediately. Is there any way to send a software interrupt to motherboard to make this happen? ...

How do I separate inline images and attaches using MAPI?

My program uses MAPI for working with Exchange mailboxes. The problem is if a user fires up Outlook, adds a file as an attachment and also opens Paint, selects a region there, copies it into clipboard and pastes into the message body the resulting message showns two attachments. More specifically, the program calls IMAPIMessage::GetAtta...

Is allowing unauthenticated RPC calls okay for servers behind a corporate firewall?

Our distributes application uses Microsoft RPC for interprocess communications. Starting with Windows XP SP2 and Windows 2003 SP1 Microsoft tightened the bolts so now the programs on two different computers can't communicate that easily. Either they both must be running under suitable user accounts so that uathentication succeeds or the...

Special exception in CoUninitialize

What could be the possible causes of exception in calling CoUninitialize(). Our product is using COM and some of WER crash reports are pointing to CoUnInitialize(). WER systems name it as Special Exception. Any pointers? ...

Supporting 64bit OS which currently works in 32 bit OS.

I have an application which has many services and one UI module. All these are developed in VC++ 6.0. The total KLOC would be 560 KLOC. It uses Mutltithreading,MFC and all datatypes like word,int, long. Now we need to support 64bit OS. What would be the changes we would need to make to the product. By support i mean both like running...

Adding unicode support to a library for Windows

I would like to add Unicode support to a C library I am maintaining. Currently it expects all strings to be passed in utf8 encoded. Based on feedback it seems windows usually provides 3 function versions. fooA() ANSI encoded strings fooW() Unicode encoded strings foo() string encoding depends on the UNICODE define Is there an easy w...

Please recommend an alternative to Microsoft HPC

We aim to implement a distributed system on a cluster, which will perform resource-consuming image-based computing with heavy storage I/O, having following characteristics: There is a dedicated manager computer node and up to 100 compute nodes. The cluster must be easily expandable. It is built around job-task concept. A job may have o...

Detect DVD Burners in Windows

Is there anyway to dectect available DVD burners in a windows system using c++? I know how to detect all available drives but I would like to be able to detect which ones have the ability to burn DVD media. ...

Killing a process with taskkill /F returning code 0

Hi, I need to kill a windows process (java.exe). I'm currently using: taskkill.exe /F /IM java.exe I need to use the /F option since is a critical process,but in this way I get a return code 1 instead I need a return code 0 (returned when I don't use /F for killing other not critical processes) how could I fix this problem? Many tha...

Albacore: including only certain files/folders in a zip

Hi everyone, I'm trying to zip up the artifacts of a rake build, using Albacore's ZipTask. The solution I'm building has three projects that have artifacts that need to be zipped up individually, but only the ASP.NET MVC project will be mentioned here. Here's the directory structure of the solution: rakefile.rb solution.sln src/ (...

Installing Rails ERROR on Windows XP: could not find rails locally or in a repository

I see a similar question here. However, that is related to installing on non-windows platform. I followed the instructions here and get error when I execute the following:- gem install rails The error is following:- ERROR: http://gems.rubyforge.org/ does not appear to be a repository ERROR: could not find gem rails locally or in a ...

Why isn't this thread reading all data from the pipe consistently?

Anything wrong with this in general? CallingFunction() { CreatePipe() CreateMutex() CreateThread( ThreadFunction ) while(there is data left to send) { WriteFile(send data in 256 byte chunks) } WaitForSingleobject() //don't return until ReadThread is done return 0; } ThreadFunction() { WaitForSinglOb...

How can I test my website in Safari 4 for Windows?

Ok, so the marketing guy that I deal with for our website has reported that things aren't displaying right in Safari... And of course, it works fine in Safari 5. Are there any tools out there that will let you simulate browsing with Safari 4, for example? Or even better, does anybody have an install for Safari 4 for Windows floating ar...