windows

File permission issue with Mac/Windows when using git

I ran the following code to pull files from windows git repository. git pull /Volumes/sucho/Desktop/git/setup And I connect the Windows directory as follows. tell application "Finder" mount volume "cifs://WINDOWS/c$/Users/sucho" as user name "USR" with password "PW" end tell It works well, but the problem is the pulled files fr...

Is there a way to directly query the file system device driver for listing out the files in a directory ?

Hi, I'm currently using FindFirstFile, FindNextFile API to recursively iterate through directories for searching files based on a given criteria. I noticed that "dir /s" command gives better performance than my program. I'm tried checking out the events in process monitor and it looks like cmd.exe/dir command is directly querying the di...

How to setup PC and Mac for using git.

I use git both for Mac and PC. When pulling Mac's git from PC, it's easy as I can use ssh. git clone smcho@prosseek:~/smcho/setup The problem happens the other way round : to pull from Mac. I guess there are two ways to go. Method 1 : Connect to server By using 'connect to server' in Mac, I can make PC's directory like that of Mac....

Git clients over a network drive

If I have a network drive with a git repo checkout, for example, samba drive on a windows machine (A) connected to Linux machine (B) where the local checkout is. Is there a way for clients on A - who can see the drive - to do git operations through the the ssh access defined on B? ...

.bat Merging header.txt to all *.txt files

I have a file called header.txt I want this file to be prepended (first line) to all *.txt files in the same directory. How could I achieve this? Thanks in advance, Joe ...

How to find out swap space usage on windows

I want to monitore swap space usage on windows 2003 server. If the usage is over 80% for 10 minutes, an alarm will be generated. There are lot of tools for RAM, but how about swap usage? How do I simulate that condition and do the test? ...

Extract a Table from an HTML File with PowerShell or VBS

I have a two part problem that needs fixing. I'll try my best to describe it then break down what I "think" the steps are. I am trying to get a specific table in a webpage and email it to myself. At the moment what I am trying is to use GNU\Win32 wget.exe (I'd rather use PowerShell natively but for some reason I couldn't, perhaps becau...

Where should I put third-party libraries?

I contribute to a decent-sized C++ project with a number of dependencies. The problem is, the project contains the source of all of its dependencies (e.g. pcre, zlib, etc.). I want to trim the project down to just what's relevant to the program itself. Is there some relatively standard way to compile these libraries and put them somewher...

Can a Java class impersonate another Windows user?

I've a Java servlet class which is accessing a NetApp folder for files. The class is running on Tomcat 6.0 on Windows 2003 and uses Active Directory authenication (LDAP) to authenticate the webapp users. Tomcat (and thus also the webapp with the Java servlet classes) itself is running with account xyz, which is a service account. The Ne...

how can I intercept and modify program read/writes?

Say firefox writes to it's own history file, and I'd like to modify what it does when it does it. How can I do that? Similarly, say a program sends audio to the speakers/headphones. How could I intercept that signal, process it, and send it back to where it was headed? Certainly the Master Volume does something like that. Thanks. ...

How Can I Get My File Association to Open Multiple Files in a Single Program Instance?

I have set up a file extension in the Registry for my program as Windows requires. In the Registry, under shell/open/command, I've got: "C:\MyProgramPath\MyProgram.exe" "%1" This works fine for me. When someone clicks on one or more files associated with my application, my application correctly opens the file(s) but each one is ope...

UMDH Logs (Memory Leak on Windows)

Hi, I am using UMDH tool to analyze the memory leaks of my application. The top leaks observed by UMDH logs are as follows: 237856226 ( 241016812 - 3160586) 3704833 allocs BackTraceE9 3685198 ( 3704833 - 19635) BackTraceE9 allocations ntdll!RtlIpv4StringToAddressExW+00011866 ntdll!RtlSubAuthorityCount...

Timestamping data through multiple machines - times are off?

Hi, I working on some applications that route tcp and upd traffic through multiple machines and I'm trying to timestamp (millisecond resolution) the packets on every node to receive a full picture of latency through each node. Before the tests I made sure that all windows machines are NTP synced, however my issue seems to be that the t...

How to make for loop in windows batch file run in name order

I have a windows batch file that does this: for %%s in (*.sql) do call It loops through all the sql script in a folder. In the folder the file names are like: s4.06.01.sql s4.07.01.sql s4.08.01.sql s4.10.01.sql s5.01.sql But the for loop goes through the files randomly (not in the name order), it first run s5.01, then s4.06, then s4...

Error message ( event id 5805) in event log of windows 2003 Domain Controller

When I check error messages in Event Log of my Windows 2003 Domain Controller I get error message ( event id 5805) in event log: The session setup from the computer VM-WIN2K3APP failed to authenticate. The following error occurred: Access is denied. Any assistance is kindly appreciated Thanks. John ...

Structure/Reading of IE cache index.dat

Is there any example on reading IE cache file (index.dat and friends found in Temporary Internet Files folder)? I'm fine with example in almost any (sane) programming language. ...

Uninstall and Install Programs in windows using python script

Possible Duplicate: Add/remove programs in Windows XP with Python script I am a newbie in python and basically do windows sysadmin tasks and sometimes write batch script. However i am trying to learn python by implementing the scripts in windows tasks. The actual task i want to do is a follows: To remove acrobat reader or acro...

IMMLoad vs. LoadIMM

To workaround a VLC related bug (see http://forum.videolan.org/viewtopic.php?f=14&t=58516) I have to set IMMLoad parameter (placed in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IMM) to zero. I have two questions concerning this fact: On some machines I saw IMMLoad on other - LoadIMM. What is the difference? On ...

Leaving Windows Console windows open after process termination

Is there an OS or user-account level modification for windows 7 that I can use to leave the console window of terminated processes open? Background: I like to use console programs for simple tests. These things tend to need debugging and analysis, and the easiest way to do that is to use printf or equivalent - that's available in prett...

How correctly show hidden transparent window when contents changed

I have a layered (semi-transparent window) created with WS_EX_LAYERED and adjusted with SetLayeredWindowAttributes(... LWA_ALPHA). I have to show and hide it from time to time, but since last hide there are cases when the image is going to be changed significally. But SetWindowPos and ShowWindow at first shows the previous image (possibl...