windows

How to choose which port to use for a service? (windows & .net)

I'm writing a windows service which will expose an http RESTful web service for other processes on the machine. This will be deployed to lots of machines on various corporate desktops that I have little/no control over. How should I choose which port my service should listen on? I'll make it configurable, but need to know how to choose...

Testing if a file/directory is read only

okay, so I'm a bit of a C newbie. How does one test whether a file is read only on windows. I tried to get something working with the GetFileAttributes function, but to no avail. Given a file's path, what is the proper way to test if it is read only? Edit: So I'm still stuck on this one. I want to check if the user has permission to ...

Do I need special WQL queries for 64-bit apps?

I'm using the WqlObjectQuery to find out information on processes. I'm making calls such as this: Select ExecutablePath from Win32_Process where ProcessID = {0} Will this also work in 64 bit versions of windows and for 64 bit applications? Or do I need to modify my query to handle 64 bit apps? ...

is their any tricks to test ie6 tuned codes without installing ie6?

Hi there. i am on windows 7. is their any way i could test the ie6 tuned codes on my local machine without installing the browser? ...

Concurrent I/Os with same handle

Thread1 SetFileInformationByHandle(fileHandle, ...); Thread2 SetFileInformationByHandle(sameFileHandleWithThread1, ...); Thread1's function has been called first. and Thread2's function has been called in another thread. if the function's duration is 10 seconds -the device driver sleeps in the dispatch routine, will the se...

Is "IMPORT ADDRESS TABLE" of PE per dll or per exe?

Does anyone know whether the 'import address table' in the PE executable format on Windows is 'per dll' or 'per exe'? ...

Best EXE Compressors

Can you recommend the best or all of the best executable (EXE) compressors out there? It can either be free or paid. Also it can be publicly well known or even just a new compressor but seem to offer quite a punch. I'm aiming for file size as I'm asking this question. Meaning the smaller the file size it can produce, the better. Feel f...

Changing the PATH from a batch

I'm writing a dos-batch in which I need to change the PATH. I'm using the SET command. The batch is run from the command line (cmd.exe). The problem : the changes are only available for the cmd window, and I soon as this window is closed, the changes are dismissed. How can I change the PATH from a batch and make sure the change will ...

What's the fastest way to register a java-application (or maybe a bat executing the app) as a Windows service?

What's the fastest way to register a java-application (or maybe a bat executing the app) as a Windows service? Update 1: It has to be free for companies to execute :) Either by using a third party app or following a guide. ...

How do I automatically run an application when the system starts?

how to make application startup without using startup folder , is there any way instead of Windows Service ? ...

About the internal logic of "Memory Cannot be read" error in windows

We occasionally come into this error when running a EXE on windows. How does OS know if a specific memory can be read or not? ...

Hooking thread creation/termination

Is it possible to hook into thread termination on Windows? IOW, I would like to be notified if a thread inside the process (not interested in other processes and their threads) has terminated (either normally or - more important - forcefully). Alternatively, hooking into thread creation would also do. Rationale: I have a library that m...

Programmatically change Windows power settings

Is it possible to change the power-saving behaviour of a laptop computer on lid close from hibernate/standby/shutdown to Do Nothing from the .NET Framework? Edit: it would appear that by setting the value to Standby and blocking the standby from my application, the lid close event can be detected, which is what I'm really after. I foun...

Packaging JNI Libraries

I am using Java to develop an application and I have a library that I need to be able to use. The library has a jar file and a dll file. At the moment I have placed the dll file into my system folder and linked the jar with the IDE. My question is, I want to package everything into a single executable jar in which the user can run (perha...

Can we execute rightclick without using pCmdInfo->lpVerb

I am not agnaist using pCmdInfo->lpVerb but my problem is how will we handle the situation when we create the rightclick submenus dynamically. For example, I have the following scenario: if(strcmp(cRegKeyVal,"Connected")==0) { //g_bConnectStatus=TRUE; InsertMenu ( m_hSubmenu , 0, MF_BYPOSITION|MF_GRAYED, m_uCmdID++,...

how to check if scheduler backups ran successfully

on each of our remote servers a scheduler task is created that calls an .exe program that shuts down the databases at 10:00:00 everyday (it create database backups)and start it up again at a specific time.now using the delphi application i need to now how can i check if the scheduler task backups were ran successfully(database shutdown a...

Old .Net app crashed. What does this event log info mean?

A .NET application running in one of our systems 24/7 suddenly crashed without logging any errors. The only error information we were able to retrieve is in the windows events log, with this codes: faulting module msvcr80.dll, version 8.0.50727.3053, stamp 4889d619, debug? 0, fault address 0x000144dc. Has anyone experienced an i...

Sqlite with C# on Vista

I am using Sqlite as DataBase in my app. I have a table totalcount when i execute the "select hitcount from TotalCount" it is giving the default value in vista while run as administrator it is giving the correct result. Please suggest ...

Setting a system environment variable from a Windows batch file?

Is it possible to set a environment variable at the system level from a command prompt in Windows 7 (or even XP for that matter). I am running from an elevated command prompt. set name=value seems to be only valid for the session of the command prompt.. ...

How to query who shares port 80 on Windows?

Windows can share ports. For example IIS and WinRM share port 80. Is there any way to query this information? ...