windows

Edit .RAR file comments from python

Ok, I need to be able to edit the file comments in .rar files from python. I can already view the comments using UnRAR. However, I need to embed metadata in the files in a way that is preserved over multiple file systems (e.g. alternate datastreams are out), so I can't really think of any other alternatives. rarfile seems like it might...

Qt cross compilation

I want Qt software to be cross compiled for powerpc architecture on windows machine.on,linux machine i am able to do this task by giving the exact qmake specification for xplatform option. but i am not able to this from windows machine. i had powerpc tool chain installed on my windows machine. please tell me in detail how i can cross ...

Will we ever be able to delete an open file in Windows?

Disclaimer: I am mainly a linux/web developer. Windows has this "nice" feature where it denies permission to delete any file that is held open by any process. So if an antivirus hits the wrong file at the wrong time, some random program might misbehave and possibly crash. Am I right? Are there plans to fix this? Do any of you find thi...

How to simulate a reboot in Win7 for testing application cold-start time

In order to measure application' cold-start time, I have to reboot my machine every time, which is really time-consuming. I understand it is mission impossible to simulate a real reboot, but what I want is something rough, ex, put out cache in standby list as many as possible so the warm start won't be so warm anymore. Any ideas on this...

Is is possible to hold an anonymous pipe open forever?

I hava a Java programm that communicates with a C# console app through a pipe. In my dev environment it works like a charm but I am wondering if this is still reliable if the java app is running work days and weeks (It's for a POS Terminal). What I basically do is: write one line -> read one line. The C# Code is pretty simple static v...

How to attach a datafile to a windows app installation

I'm writing a windows application in c#,FW3.5 & Visual Studio 2008. I need to attach one or more datafiles to the installation. The requirement is that when the end user installs the application, a folder will be created and the datafile will be put in this folder. Is there a way to do this by amending the publish settings in Visual St...

Does the following java code guarantee and exclusive lock on an unopened file in Windows?

Does the following java code guarantee and exclusive lock on an unopened file in Windows? import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; public class Test { public static void main(String[] args) { File file = new File("mylog.log"); try { ...

What is the best way to learn Windows ecosystem?

I spend last decade in *BSD environment (mostly Linux, some MacOS). I mostly work in Python, but also know some C, Java and Ruby and a bit of C++ and Erlang. Whole .NET idea seems to be interesting to me and C# seems to evolved in nice language. However, I am completely lost in how Windows works now. What is the best way to learn the w...

Force browser not to show print dialog

Hi, i want to print a document from browser using window.print(). I want browser not to show standart print dialog on current machine. I have all access to system registry and settings on it. Is there way to tweak the system in this way? ps. Excuse me for my english. ...

Users management on remote Windows server using C# System.DirectoryServices

Hello stackoverflow, I've written a program which opens a connection to a remote Windows server in order to manage local accounts (not Active directory). The program executes the following steps: User Creation Add the user to a group Both methods use System.DirectoryServices.AccountManagement, here the two functions: public void C...

Importing .sql file on windows to postgresql

I have a .sql file that was created by postgresql a while back. I now want to import this file onto a windows machine running postgresql. How do I do this. The file is about 1.5gb. ...

Getting physical sector of a filesystem directory entry

Is there a way to know the sector/cluster number a directory entry in Window? If there's a separate or absent solution for NTFS/FAT32, it's ok, I can live with it. Thanks, Max ...

GetPrivateProfileInt on network file on freshly booted machine

After intensive searching why certain workstations wouldn't perform a certain action when just being started up in the morning (...) I've discovered that GetPrivateProfileInt just returns the default value and doesn't bother to set GetLastError to something non-zero when the network-subsystem hasn't activated yet (e.g. because the DHCP c...

Maximum Length of Command Line String

In Windows, what is the maximum length of a command line string? Meaning if I specify a program which takes arguments on the command line such as abc.exe -name=abc A simple console application I wrote takes parameters via command line and I want to know what is the maximum allowable amount. ...

What is the best way of packaging Java software for running on Windows?

What's the best way to package Java software for running on Windows? Is there a standard for writing .BAT files which can discover the latest installed JRE on the machine? Are there any Maven plugins for this? What's the deal with executable Jar files? ...

Next question about russian encoding, mssql and python.

Next question about russian encoding, mssql and python. I have this simple code: import pymssql import codecs conn=pymssql.connect(host='localhost:1433', user='sa', password='password', database='TvPgms') cur = conn.cursor() cur.execute('SELECT TOP 5 CAST( Name AS nvarchar(400) ), CONVERT(nvarchar(400), idProgram) FROM dbo.Programs') ...

Same simple source code, different binaries on Windows

Hi all, I have a question about the source-code binary on Windows. #include <stdio.h> int main() { printf("Hello, world!\n"); return 0; } The same source code, I compiled twice on Windows (VS 2008 Cmmand Prompt: "CL"), but I got different binaries. cl new.cpp Can you guys tell me why, and how to avoid that? Thanks. Pet...

How to make two batch file variables echo into a single line?

I am trying to create backup script for my ESXi server and I am running in a bit of an issue. I need to loop these 2 commands and then write them to a text file I call backup.list. It will contain all of the VM IDs and VM names I need to back. When I have the two loop commands run against the server they only return the last value, I k...

Delphi TOpenDialog hangs in windows 2008 when run as remote desktop application

I have a Delphi 2010 exe that launches a second exe. In the second exe, there is a dialog that calls openDialog.execute. When this runs under Windows 2008 Enterprise R2 under a remote desktop, it runs as expected, but when run as a remote application, as soon as the file dialog pops up, the application hangs, turning all of the applica...

Have winsock's send function block?

Is it possible to have winsock's send function block until the packet being sent is received at the other end? My end goal is to be able to send 5-20mb files while still being able to send small 1kb packets on the same connection. So I was thinking I would have it block until the receiver receives the packet. That way if another small p...