Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Running a .bat file over network problem
New Posts  All Forums:Forum Nav:

Running a .bat file over network problem

post #1 of 2
Thread Starter 
I log into a server from many different computers and need to be able to open a batch file. Now i can navigate to the file and double click, but i actually am trying to make a .hta file open a .bat file over the network. This is where i am...










It says:
\\Server\Techtools
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.

could someone lend a hand / brain?
    
CPUMotherboardGraphicsRAM
Intel Corei5 2500k @ 5ghz - 1.52v ASRock Fatal1ty P67 Professional 2x XFX 6970 2GB XFire and 1x Nvidia EVGA GT430 G.Skill Ripjaw 8gb (2x4gb) 1600mhz DDR3 
Hard DriveOptical DriveOSMonitor
Samsung 840 Pro 512GB Lite-On DVD /CD Burner & Lite-On Blu-Ray Windows 7 Home Premium - 64 Bit 27" 3D Samsung S27A950D + 24" Samsung 2493HM 
KeyboardPowerCaseMouse
Ducky 1087 (w/ WASD blank white keycaps) PC Power and Cooling Silencer Mk II 950W Silverstone Raven-02 Razer Mamba 
Mouse PadAudioAudio
Ratpadz GS HiFiMan HE-300 Headphones HiFiMan HE-300 Headphones 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel Corei5 2500k @ 5ghz - 1.52v ASRock Fatal1ty P67 Professional 2x XFX 6970 2GB XFire and 1x Nvidia EVGA GT430 G.Skill Ripjaw 8gb (2x4gb) 1600mhz DDR3 
Hard DriveOptical DriveOSMonitor
Samsung 840 Pro 512GB Lite-On DVD /CD Burner & Lite-On Blu-Ray Windows 7 Home Premium - 64 Bit 27" 3D Samsung S27A950D + 24" Samsung 2493HM 
KeyboardPowerCaseMouse
Ducky 1087 (w/ WASD blank white keycaps) PC Power and Cooling Silencer Mk II 950W Silverstone Raven-02 Razer Mamba 
Mouse PadAudioAudio
Ratpadz GS HiFiMan HE-300 Headphones HiFiMan HE-300 Headphones 
  hide details  
Reply
post #2 of 2
You can't make batch to run from UNC, ever.

Use the following command as the first statement in your batch file:
Code:
pushd %~dp0

Which will push the home directory of the batch file as the last unallocated drive letter, and make that the current drive.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Running a .bat file over network problem