I have been looking all day trying to find a way to do this. I need to run a Batch file which is held on a server, the file path begins with a IP Address which DOS doesn't like. So i found the pushd command which assigns a temp drive letter from which you can run the Batch File.

If i was simply running a normal program or file i would use:

Dim proc As Process    
proc = Process.Start("c:\BatchFile.bat")   

but my file path is e.g. \\\Public\Folder\BatchFile.bat

running from a command prompt if i type

pushd \\\Public\Folder\ (Enter)

the Batch File runs fine, but i need to be able to do this from within VB.NET and the main program still needs to wait for the batch file to run and the cmd prompt to close before continuing.

Any suggestions would be excellent or if i haven't explained this well enough let me know


Re: Run Batch File using UNC 80 80

Why don't you create a local batch file, containing the pushd command and the batchfile and execute it locally?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.