windows

Debugging System.UnauthorizedAccessException help

I am trying to debug an application which was not written by myself when an event (adding a user) is fired the application throws a System.UnauthorizedAccessException. Are there an tools that you coulc recommend that would tell me what the application is trying to do?. I do know that is is most probably trying to access active directory...

How much space should I leave for my Windows 7 partition?

I'm setting up a complete .NET development environment on my Macbook Pro. I'm using Visual Studio 08 team suite, SQL server 2008, MS Office and other tools (like FinalBuilder, RegexBuddy, Beyond Compare). How big should my windows 7 (beta currently) partition be? Will 100GB be enough? NOTE: I wasn't sure if this was programming relate...

Problem debugging shell extension in Vista (IShellFolder)

Hi, I have created a Windows Shell Extension using ATL (Visual Studio 2008). It has the following modules and each module is a separate ATL Simple Object with its own .rgs file for registration:- IShellFolder/IShellView -> For a virtual drive in windows explorer IContextMenu/IShellExtInit -> For a popup menu files and folders IShellIc...

How to admin a remote Windows Server with a command line interface?

When I was a Linux admin I could do anything from the SSH command line. Now, as a Windows admin, I have to deal with the Windows Remote Desktop graphical interface, which I found to be inefective (slow) and hard to automate tasks in it. a) Can I connect to a Windows Server through SSH or any encrypted connection with command line interf...

Compress a folder using NTFS compression in .NET

I want to compress a folder using NTFS compression in .NET. I found this post, but it does not work. It throws an exception ("Invalid Parameter"). DirectoryInfo directoryInfo = new DirectoryInfo( destinationDir ); if( ( directoryInfo.Attributes & FileAttributes.Compressed ) != FileAttributes.Compressed ) { string objPath = "Win32_D...

Wait for a specified amount of objects?

Using WaitForMultipleObjects: Makes it possible, to wait for one or all of specified objects to change to a singled state Question: How can one wait for a specified amount - such as 5, for example Usage dwEvent = WaitForMultipleObjects( maxExpectedConnections, ghEventsA, TRUE,//but wait for a specified number instea...

Restarting a windows service

Hi, I want to schedule a restart of my custom services automatically using a batch file with net stop, net start. When net stop runs does it abort anything that is being done immediately? Just wondering what will happen if in the middle of processing? Malcolm ...

Using WiX to create an IIS virtual directory

I'd ask this on the WiX mailing list, but it seems to be down. I have an application which is both a desktop app and a web app which runs locally. I've created a couple of basic WiX installers, but haven't yet used the IIS extension to create a virtual directory under IIS. I haven't been able to find a simple example of how to do this. ...

Can Events be Inter-Process?

I have created an event in one process and to test, sent the event handle via a pipe to a totally separate process (not a child thread) When I fire the event in the first, WaitForSingleObject does not detect the event so I am guessing the answer is no unless I missed some trick in the SECURITY_ATTRIBUTES structure? Or perhaps I need to...

Is Java Reflection on Inherited Methods Different in Windows and Linux?

While setting up Hudson for continous integration testing (on a JeOS server), I've come across some strange behaviour I'm hoping the fine people at SO can explain to me. Our unit tests depend heavily on the use of domain objects, with lots of properties that must be set (due to null constraints in the database). In order to keep our tes...

How do I get repeatable CPU-bound benchmark runtimes on Windows?

We sometimes have to run some CPU-bound tests where we want to measure runtime. The tests last in the order of a minute. The problem is that from run to run the runtime varies by quite a lot (+/- 5%). We suspect that the variation is caused by activity from other applications/services on the system, eg: Applications doing housekeepi...

How do I invoke a Perl script on Windows?

Hello, I tried compile apache 2.2, my Visual Studio 2008 returned error on RC. After some googling, I found this explanation: What appears to have happened is that you've opened it up unsuccessfully in Visual Studio; before you convert to an .sln file + .vcproj files, it's important to invoke the perl script perl srclib\...

CMD Full Screen Visual Studio

I accidently made a command shell full screen, I managed to get it back to its original state but now when I run visual studio my screen flashes black, I assume this is the full screen command shell kickign in. Can anyone help please? If one more colleague asks do I have a virus I am going to headbut the desk. Thanks, B ...

Help me find the reg-key which is preventing me from chaning excel macro security-level?

My automatic test-framework tests a bunch of Excel sheets required by our customers with the excel plugins that my team provides. In order to test the sheet I need to call some macros, this in turn requires macro security to be set to lowest on the testing servers. (In production macro security will be on). In particular I need to supres...

What is your favourite programmer's context-menu addition for your Windows machine?

What is your favourite programmer's context-menu addition for your Windows machine? ...

Prevent AutoScrolling in C# RichTextBox

I have a readonly data logging window that I implemented using the RichTextBox control. I'd like to be able to disable the autoscrolling that happens when the user clicks in the control so that the user can select a specific log for copy/paste operations or whatever. However, as soon as the user clicks in the RichTextBox, it automatica...

Choices for native windows scripting

What is a good windows/xp or Vista scripting language that would provide basic functionality similar to what ksh or bsh does for unix? looking to do simple/quick tasks, build parameters, call executables (.exe), redirect output. Thanks. ...

Type Mismatch Error Code other than 13

Is it possible to receive an error code other than 13 (e.g. 0) for a type mismatch error? ...

unresolved external symbol _CLSID_ScenicIntentUIFramework with GUID

I'm trying to build a ribbon app in visual studio and I got that linker error. After looking through the headers, I noticed that CLSID_ScenicIntentFramework is defined as extern const CLSID. The think is, I can't seem to figure out which library I need to link to (or other header i need to import?). I'd really appreciated some help too....

How can a Perl script know its own memory footprint?

I have a long running Perl script and I'd like to let it know (and report) how much memory it is using. I'd like to have this information both on Linux and Windows and if possible on Mac OS X as well. ...