1.

Solve : Run an existing .bat & .vbs script from a .bat or .vbs?

Answer»

Hi

I would like to be able to call/RUN a existing .bat & .vbs file from a new .bat or .vbs. hoping this would include a POP up message to confirm the action has been completed.

I can add message to .vbs script ok MsgBox ("complete"), vbInformation, "Updated"

At the moment I have to run 2 scripts (.bat & .vbs) but I want to be able to call both and run both of these.

Thanks in advance for any helpC:\>type runany.bat
Code: [Select]C:\WINDOWS\system32\cscript.exe C:\WINDOWS\system32\eventquery.vbs

C:\>type runany.bat
Code: [Select]C:\WINDOWS\system32\cscript.exe C:\WINDOWS\system32\eventquery.vbs

c:\whatis.bat

C:\>type whatis.bat

Code: [Select]@ECHO %%~f0 is %~f0
@pauseC:\>

Output from runany.bat :

information 4201 5/9/2009 8:42:16 PM Tcpip NEWBILL
warning 27 5/9/2009 7:23:09 PM e1express NEWBILL
information 7036 5/9/2009 6:48:10 PM Service Control M NEWBILL
information 7036 5/9/2009 6:43:44 PM Service Control M NEWBILL
information 4377 5/8/2009 6:09:48 PM NtServicePack NEWBILL


C:\>c:\whatis.bat
%~f0 is c:\whatis.bat
Press any key to continue . . .

C:\>Hi I have created, something like this, create a temp FOLDER, then I want the 2009v2.vbs file to run

@echo off
md c:\temp


cd "C:\\Other\2009v2.vbs"

The vbs file won't runfigured out this

cscript "C:\Other\2009v2.vbs"

However it does run, but I receive an error message on the bat...

how do I prevent the bat file from showing, or make smaller



Discussion

No Comment Found