vbscript - Running a batch (.bat) file from a VB macro (.vbs) -


I'm getting a simple batch file (open command prompt) to run from a vbs macro, I know that The questions asked a lot and I have tried several differently suggested solutions for this without success, I am using Notepad ++ to run the script / VB code for testing.

I have verified that the .bat file will execute correctly in itself, any suggestion about working properly on this will be greatly appreciated.

VB code:

  sub-callback () Digg ARG double ARG = shell. In the form of "C": \ Temp \ cmdPrompt.bat "End Sub  

Batch File:

  Start cmd.exe / k  Edit: The following is a .bat file that I intend to actually call: 

  @echo OFF Title AutoCAD DWG Duplicate Color 0A: Set Set / P. TemplateName = Please enter the template name you want to copy: set / P NumberOfCopies = Please enter the number of copies, please enter it: set pathnam E = "& lt; Filepath & gt; CD / D% path name%: for / L %% F (1,1%% NumberOfCopies%),% TemplateName% .dwg in C: \ Temp \ %% f% TemplateName%. Dwg  

You are calling a .bat file Which in turn opens a command prompt, with START , I'm not explaining why you need BAT .

  Slow Oshel set oschel = wScript.CreateObject ("WScript.Shell") oShell.run "Cmd.exe / K" set oshel = nothing  

/ k Parameter command prompt You will not be able to open it by opening the window and you do not have any parameters for START and no command is made to execute when the command prompt opens, so what should you do for it. :


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -