1.

Solve : I need help with a bat file, to call an exe over a network?

Answer»

Hi
I have created a BAT file, which i want to run at logon, which would hopefully call a .exe file, to get info back off the machine that the USER logs on to.

the .bat file and the .exe are located at
\\ourservername\SYSVOL\Marine\scripts\


here is the edit of that .bat file it shows that i want to run the lsclient.exe file
C:\WINDOWS\SYSVOL\sysvol\Marine\scripts\LSclient.exe miinvser

running that .bat file from that machine, works , but when incorporate it into a logon, its not connecting back to the server. how or what should i change in that, to make sure it conncts back to ourserver and is run sucessfully.
any help appreciated.

Thanks
Damien
What do you have as your current code, and did you put a shortcut or the bat file under the Startup folder in your start menu?Can you not just run the .exe from the server location e.g.:

\\servername\share\lsclient.exe servername

?He WANTS it to run on start up, he can run it from there by Scheduling it, but when the server is down then he probably wants it outside of the server.Quote from: macdad- on April 23, 2009, 06:08:32 AM

He wants it to run on start up, he can run it from there by Scheduling it, but when the server is down then he probably wants it outside of the server.

That doesn't make sense to me though as he is sending the info directly to a server so if it's down, what's the point?it might be that when computer boot up and batch file is called, it's not YET FINISH connecting to network:
so try put some delay into it:

Code: [Select]::checkserver.bat
@echo off
>nul ping localhost
>nul ping 192.168.1.1 || (%0) && call yourbatch.batQuote from: BumFacer on April 23, 2009, 05:51:49 AM
Can you not just run the .exe from the server location e.g.:

\\servername\share\lsclient.exe servername

?

Hi
Thanks for that, i had tried that, but i must have had the wrong path, i tried it again with this path

\\servername\SYSVOL\Marine.ie\scripts\LSclient.exe miinvser

And its working fine now.
the .exe file is one which works with lansweeper software, which brings back information on the PC / software etc that the user logs on to, so i needed it to run at login/startup. its sorted now, thanks again.
Damien
glad you sorted it out.

you are good poster, nowadays there are rarely a poster with the polite attitude to report back.
if you have any more trouble, don't hesitate to ask.


Discussion

No Comment Found