Hi , Can any one tell how to insert batch commands in vbscript to make it useful with single click . using the follwoing code i am running bath file Set WshShell = WScript.CreateObject("WScript.Shell") obj = WshShell.Run("C:\hai\run.bat", 0) set WshShell = Nothing
it invoking bat file and run commands in that file
now i want to place those commands in the bat file in to the vbs file with out using bat file to generate every thing using vbs how can code this.
please assist me thanking you in-advance
This conversation is currently closed to new comments.
Command line batch files and VBscript are two different languages, with overlapping functionality.
In order for anyone (I'm not the right one, since I have no clue about VBscript) to be able to answer your question, you should show the code you currently have in the batch file.
Or... Hmmm. You could write a VBscript that would: 1. Search for an unused drive letter. 2. Instantiate a RAM-disk and mount it to the chosen drive letter. 3. Write the intended contents to a batch file on the RAM-disk. 4. Calls the newly written batch file. 5. Kills the RAM-disk. At second though, maybe not, after all...
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Batch Command in Vbscript
Can any one tell how to insert batch commands in vbscript to make it useful with single click .
using the follwoing code i am running bath file
Set WshShell = WScript.CreateObject("WScript.Shell")
obj = WshShell.Run("C:\hai\run.bat", 0)
set WshShell = Nothing
it invoking bat file and run commands in that file
now i want to place those commands in the bat file in to the vbs file with out using bat file to generate every thing using vbs how can code this.
please assist me thanking you in-advance