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


I love YaBB 1G - SP1!

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

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
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
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:
Code:
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.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1