windows

Pulling portion of file and storing in a variable within a Batch File

I have a file that contains some information about the product I work on. The information I'm specifically interested in is the version of the product. I need to read in this version and store it in a variable that I can manipulate so I can increment the version number appropriately. I'm trying to use a line like this: for /f "tokens=2...

Tab control like Google Chrome tabs?

Any help on existing tab control like Chrome tabs? I have been searching all over for mutitabs control that allows dragging each tab, with no luck. ...

How to dock a windows form in C#?

Hello everyone, I just would like to know if it is possible to dock a windows form on top of the user screen? I have been trying to do this by manually setting the position of my form to the coordinates I want. But using this method, however, allows the user to change the position of the form just by dragging it. I want to make the for...

NAnt: get task permission denied

Hi, I'm trying to use the NAnt <get> task to download some artifacts from our build server. However I'm getting permission denied to the destination folder even though the folder I'm downloading to has "Everyone" with full control. What's going on? ...

Objective C on Windows or Linux

I would like to learn objective-c, but don't have a Mac. How would I compile obj-c on Windows or Linux? I would prefer Windows, but Linux would be OK. ...

How To Stop A Process

I'm trying to build an app that when an unhandled exception occurs, it will stop and restart itself. I have the restart code working correctly, but now I can't get it to stop. Is there any windows function to stop this process? ...

run a program from a windows service

I have a program which i want to invoke from windows service. xsftp.StartInfo = New ProcessStartInfo("c:\stage\psftp.exe", "[email protected] -b c:\stage\script.bat -pw XXX") xsftp.Start() The same code works fine if i write in a console application, but from windows service it wont run, i see the psftp is being started in the task man...

Main only recieving first letters of arguments

int _tmain(int argc, char** argv) { FILE* file1=fopen(argv[1],"r"); FILE* file2=fopen(argv[2],"w"); } It seems as if only the first letter of the arguments is received... I dont get why! std::cout<<"Opening "<<strlen(argv[1])<<" and writing to "<<strlen(argv[2])<<std::endl; outputs 1 and 1 no matter wha...

How to get the position/dimensions of the open context menu on the desktop?

Hi, I have a utility that is opened from the context menu. You right-click an item in Windows Explorer and hit the "utility" button in the context menu to open the app. This brings up a little 'window' that's styled to be similar to a right click menu. Currently, it's really jarring to have that new menu open in a completely different p...

Detect when a directory or file changes

Other than reading all the files and comparing them with a previous snapshot, is there a way to detect when a directory changes in C# with Windows? I don't mind PInvoke if that's what it takes. ...

Is it better to develop on Mac or Windows ?

I have noticed a lot of developer these day developing on Macs. I have never use one for an extended period of time or to develop. I was thinking of investing in one for programming purposes but don't have sufficient knowledge in pros/cons of developing on Mac OS X or Windows. I was hoping you all could help provide guidance as to which ...

Create remote powershell session in c#?

I'm very new to PS so I think I'm missing something basic here. I can do a remote powershell session like this... $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://remote.com/Powershell -Credential "Domain\Admin" I want the equivalent in C# ...

Portable JDK, Tomcat, and Eclipse (Windows)

Does anybody know how to make a usb thumb drive with a JDK, Tomcat, and Eclipse (J2EE) (all for a Windows platform, preferably)? I saw this question, but the only answer was speculative. I know that the eclipse part would be easy -- just put it on the thumb drive. Tomcat requires a JDK as far as I know. Would there be a way to setup to...

How to apply compiler rules when resource.h or icon.ico should be included in the exe?

I am using #define and #ifndef to strip down the exe size, i noticed the resource.h and icon.ico files eat a lot of space, so i would like to not include those in my exe at all. How do i add rule for this that obeys my #define commands ? I could edit the resource.h, but every time i change it, it would get overwritten by Visual Studio. ...

How can I encapsulate a casual window (of X.org, Win32, Java Swing or SWT, etc) in web page element?

I seek to show a specific window (not a whole desktop) of an application running on a remote Windows of Linux desktop in an element on a web page. I suppose this can be done by means of some binary plugin or a Java applet (like VNC client applet show the whole desktop inside a browser). Any suggestions? ...

[c/c++] set variable to cmd.exe

Greeting earthmen, Here is my question: How can I create a program which sets variable to current session of cmd.exe e.g. c:\> set myvar Environment variable myvar not defined c:\>myexe.exe c:>set myvar myvar=myvalue The only similar topic that I've found is this - http://stackoverflow.com/questions/774047/how-can-i-change-windows...

How to take registry backup of current network properties

I want to take back up of registry of the current network settings like IP,Subnet,DNS and all that stuff, in windows xp. How can i do that? Please help. ...

Why can't OS use entire 64-bits for addressing? Why only the 48-bits?

I'm reading "Understanding Linux Kernel". Paging for 64-bit Architectures As we have seen in the previous sections, two-level paging is commonly used by 32-bit microprocessors. Two-level paging, however, is not suitable for computers that adopt a 64-bit architecture. Let's use a thought experiment to explain why: ...

Determine whether a file is in use in Perl on Windows

Hi there, I'm writing some Perl which takes TV shows recorded on Windows Media Center and moves/renames/deletes them depending on certain criteria. Since the Perl runs fairly frequently, I'd like to cleanly determine whether or not the file is in use (in other words, the show is in the process of being recorded) so I can avoid doing an...

As of July 2010, compare and contrast the various Windows Python distributions ideally with a recommendation of your favourite.

As of July 2010, compare and contrast the various Windows Python distributions ideally with a recommendation of your personal favourite. ...