vMix Forums
»
General
»
General Discussion
»
Launching a batch file from script
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 84 Location: Chicago Thanks: 8 times Was thanked: 3 time(s) in 2 post(s)
|
Tried this (based upon AI built code):
' Create a WshShell object Set objShell = CreateObject("WScript.Shell")
' Specify the path to your batch file batchFilePath = "C:\path\to\your\batch\file.bat"
' Run the batch file objShell.Run batchFilePath, 1, True
Will not let me save, gives error that set and let are no longer supported. How can I accomplish this?
Thanks in advance for suggestions.
Fritz Golman iHeartMedia
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 84 Location: Chicago Thanks: 8 times Was thanked: 3 time(s) in 2 post(s)
|
UPDATE
This alternative script worked!
Dim psi As New ProcessStartInfo("c:\test.bat") psi.RedirectStandardError = True psi.RedirectStandardOutput = True psi.CreateNoWindow = False psi.WindowStyle = ProcessWindowStyle.Hidden psi.UseShellExecute = False
Dim process As Process = Process.Start(psi)
Not quite as simple but effective!
Fritz Golman iHeartMedia
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,209 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: fgolman UPDATE
This alternative script worked!
Dim psi As New ProcessStartInfo("c:\test.bat") psi.RedirectStandardError = True psi.RedirectStandardOutput = True psi.CreateNoWindow = False psi.WindowStyle = ProcessWindowStyle.Hidden psi.UseShellExecute = False
Dim process As Process = Process.Start(psi)
Not quite as simple but effective!
Fritz Golman iHeartMedia
Could it be a forum search would have been quicker ans simpler then AI ? https://forums.vmix.com/...ng-for-Dummies#post88357https://forums.vmix.com/...ng-for-Dummies#post93904
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 84 Location: Chicago Thanks: 8 times Was thanked: 3 time(s) in 2 post(s)
|
I did search but but for whatever reason was unsuccessful.
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Launching a batch file from script
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close