x86 application shelling application on x64 vb.net

Associate
Joined
7 Aug 2012
Posts
948
Hi all,

Having a bit of a head bashing issue atm with trying to shell an application.

I wrote an application which is 32bit and I'm trying to run it on a 64bit machine.

There's an application for server 2008r2 (x64) called dnscmd.exe (dns command line tool) and it's located in c:\windows\system32 however when I try and shell this from my application it says it can't find the file. From what I can gather, even though I've hard coded the paths in, Windows is actually trying to look in the c:\windows\syswow64 directory for dnscmd, this is done by design for x64.

If i copy dnscmd into syswow64 it works fine, however this application is going to be used by various people so I don't really want them to be copying files about. I can't script the copy either as it still can't find the file.

Has anyone had any experience of this weird windows x64bit issue before?

Any help would be appreciated as I'm.tearing my hair out!

Cheers

Swain90
 
Associate
OP
Joined
7 Aug 2012
Posts
948
The application i wrote is originally in .net 2.0 as the first set of servers we were using it on only had .net 2.0 installed.

Ideally I'd like this to be able to work with Server 2003 (x86) and Server 2008R2 (x64)

The line of code it just;

Shell("C:\Windows\System32\dnscmd.exe")
 
Associate
OP
Joined
7 Aug 2012
Posts
948
Managed to get it work;

When using 64bit windows and a 32bit application, to get the 32bit application to see system32 you have to use this path;

C:\Windows\Sysnative
 
Back
Top Bottom