WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
Page Index Toggle Pages: 1
execute .vbs from .bat (Read 2507 times)
YaBB Newbies

I love YaBB 1G - SP1!

Posts: 4
execute .vbs from .bat
Nov 29th, 2004 at 8:47pm

I read your forum regarding starting apps from a .bat file and have come up with an issue.  I have two .bat files, each invokes a program that has a UI.  One works via watchdirectory 3.1 and the other does not.  The one that works, invokes a utility program via its command-line which actually launches the GUI.  The one that doesn't work, is a .bat file that invokes a vb script (.vbs) that invokes a microsoft Access 97 compiled macro.  I can execute this main.bat from a command-line without issue by hand, just not via WatchDirectory.  Any pointers?

Thank you!
Back to top
IP Logged
YaBB Administrator

Posts: 2260
The Netherlands
Re: execute .vbs from .bat
Reply #1 - Nov 30th, 2004 at 4:11am
Hard to say what is happening.

What you could do to debug this issue is create a new "wrapper" .bat file like this:
SET ORIGBAT=C:\Bin\Original.bat
SET ERRLOG=C:\Temp\log.txt
echo starting original.bat >> "%ERRLOG%"
Call "%ORIGBAT%" >> "%ERRLOG%"  2>&1

The original.bat would be your original .bat file (the one that causes troubles). Also edit your original.bat to make sure there are no "@ECHO OFF" lines in it.

If you let watchDirectory start this new wrapper.bat file, it will write all info (including possible errors) to c:\Temp\Log.txt.

I guess there is some kind of syntax error in your .bat file.

Back to top

Gert Rijs - gert (at) gdpsoftware (dot) com
End Alzheimer's:
WWW WWW GdPSoftware  
IP Logged
Page Index Toggle Pages: 1