windows

Set Windows System Variables with Java

Hi, is there a way to add a specific directory to the Windows systemvariable %PATH%? This doesn't seem to work: String[] cmd = { "cmd", "/c", "set", "PATH=\"%PATH%;c:\\test\"" }; Runtime.getRuntime().exec( cmd ); c:\test\ doesn't appear in System.getenv("PATH"); or in the output of String[] cmd = { "cmd", "/c", "echo", "%PATH%" }; ...

Do I Have to JNI Detach an Attached Thread?

I have some native thread that needs to call into Java. For that, I need to attach the thread to the VM using AttachCurrentThread. Since this callback will happen quite often, the thread should probably stay attached. Calling AttachCurrentThread multiple times is fine ("Trying to attach a thread that is already attached is a no-op.") ...

ServiceController Shutting down IIS Security Access

Hi Folks, I am using the ServiceController class to remotely shutdown IIS from a C# Assembly. I was wondering what is the least level of privlidges I need to do this over the network, in my current testing I am using Administrator and it works fine, but when I migrate thru to Production I will be using an AD group and need to give it th...

Registering a URL protocol handler in a multiple platforms.

I an wanting to create a Java application that is installed on multiple platforms (Windows,Mac OS, Linux) as a part of this install I wish to register a URL protocol handler, so that my app loads when links are clicked. i.e. I want something like this: myprotocol://example.com Is there any sort of consolidated way of doing this? Or som...

UAC status without reading the registry

There's a simple way to read the registry and get the UAC status from there. The only problem is that if you are not an administrator user or the UAC is ON then you can't read that particular key. Is there a way (API, etc) to get the UAC status accurately without having to read the registry? Sample code is always appreciated. Thanks! ...

How to export default Urls in wm Favorites?

Hi, May I plz know how to export the default urls in the wm mobile Favorites...The urls which user saves will be found in \windows\Favorites.But there i can not find default urls.... Default urls can be found in IE->Menu->Favorites.....How can i export these default urls... thanks in advance ...

Runtime Issues While Mixing Libraries from Different Versions of Visual Studio

I have encountered an unexpected Access Error while running a project I've built using two different versions of Visual Studio. My general configuration is as follows: LibA is a static lib, static runtime linkage, msvc 8.0 LibB is a static lib, static runtime linkage, msvc 9.0 My target project for integration is a msvc 9.0 COM dll,...

How to handle Form caption right click

I'd like a context menu on the caption bar right click any tips/samples pref in c# ? UPDATE - for various reasons, right click on the form won't work because the form is not empty and the form is composited dynamically so.... ...

Does a C++ Windows Forms Application require .NET Framework?

Does a C++ Windows Forms Application require .NET Framework? It seems that it does because it imports "System::Forms" but I just want be 100% sure. I tried opening it with depends and it looks like it imports the usual C++ dll's but there is nothing about the framework. ...

vc++ ipconfig cmd equivalent on Windows

Hi; How can I achieve the functionality given in ipconfig on Windows in VC++? I need to get local ip info of the machine, primary ip vs. ...

Anyone able to work with shadow copy from a .Net app running on Vista?

The background information, libraries and sample code on the Joe Lynds site is really helpful and works fine with XP. There are also other code samples around to help with XP shadow copy. Advice on using shadow copying from a .NET app running on Vista / Win7 is thinner on the ground. Joe Lynds site offers a wrapper which claims to work ...

Restricting database access to specific Windows groups in SQL Server 2008

Hi, I'm trying to restrict access to a database on my server to only allow users from a specific Windows group. I have enabled Windows authentication for the server, but it seems as if I can only allow access to specific users, not specific groups... is there any way I can do this? Most of the resources I've found contain SQL Server 2...

Remote Deskto WEB CONNECTION possible on Windows 2000 Server?

My office has a virtual Windows 2000 Server hosted by GoDaddy. They want to be able to use a Remote Desktop WEB CONNECTION in order to access specific software. Essentially, they want to go to www.whateverdomain.com and login, then see the desktop. I can successfully connect via RDC- but have NO CLUE how to setup the RDC WEB CONNECTION. ...

access violation in wglMakeCurrent

Sometimes in my OpenGL application I get an access violation in the following API call: wglMakeCurrent(NULL, NULL); The application only has one single thread, and I've checked that before that call, both the DC and HGLRC that are currently used are correct and valid. There are three different windows with OpenGL content, and they're...

How to get at TCP RTT on Windows (Linux TCP_INFO) as an user

I am porting a streaming TCP app from Linux to Windows. The app streams real-time audio data using a preexisting TCP protocol (so switching to UDP isn't an option). Further, I wish to avoid being "part of the problem" and requiring Administrator rights. The Linux code uses getsockopt(... ,SOL_TCP, TCP_INFO, ..) to get the RTT (roun...

Remote Desktop access from windows VM running on linux host + vmware server 2

I am trying to access a windows VM through RDP. I am using NAT and a linux host. I am not getting a proper answer on the web. Can anyone help /? ...

Strange error when building R packages for Windows

On one of my PCs, when I build any R package I get the following fatal error * checking for file 'forecast/DESCRIPTION' ... OK * preparing 'forecast': * checking DESCRIPTION meta-information ... OK * cleaning src * removing junk files * checking for LF line-endings in source and make files * checking for empty or unneeded directories * ...

How bind socket to device in windows?

I have same network cards in computer. All cards has identical IP. I need to bind socket to specific card. In linux I can use flag SO_BINDTODEVICE. How I can do this in windows. P.S. This needed for UDP sockets. ...

If condition in batch files

@echo off SET var1="Yes" SET var2="No" SET var3="Yes" if %var1%=="Yes" echo Var1 set if %var2%=="Yes" echo Var2 set if %var3%=="Yes" echo Var3 set If I run the above script I get the following error. Can anyone pls help? The syntax of the command is incorrect. Thanks. ...

SendMessage(HWND_BROADCAST hangs

When i use SendMessage function with HWND_BROADCAST, the application hangs up. there is no response from the application for long time. Can anyone explain why? ...