Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How can I write a batch file that opens a file in a program?

02 Jun 2014   #11
GTVic

Windows 7 Enterprise x64
 
 

The command window is waiting for vlc to finish so it can't close.

You can get a windowless VBS script to do the same thing. Make a text file containing the following and call it RunVLCNoTaskbar.vbs or something similar and associate with your video files.
Code:
Set oWSH = CreateObject("WScript.Shell")

s = ""
for a = 0 to WScript.Arguments.Count - 1
  s = s & " " & WScript.Arguments(a)
next

Call RunWait("C:\Users\xxxxxx\Documents\HideTaskbar\HideTaskbar.exe")
Call RunWait("""C:\Program Files (x86)\VideoLANold\VLC\vlc.exe"" " & s)
Call RunWait("C:\Users\xxxxxx\Documents\HideTaskbar\ShowTaskbar.exe")

WScript.Quit

' ***
' *** Function Definitions
' ***

Sub RunWait (sTestEXE)
    Dim oExec
    Set oExec = oWSH.Exec(sTestEXE)
    Do While oExec.Status = 0
        WScript.Sleep 100
    Loop
End Sub



My System SpecsSystem Spec
.
03 Jun 2014   #12
dperecky

win7 64bit Ult. using: XP Mode, in English or Español, SUA, Bitlocker
 
 

Quote   Quote: Originally Posted by Ztruker View Post
Add %* after the call to VLC. That will pass all parameters given to the bat fil onto VLC>
Pretty cool trick....
My System SpecsSystem Spec
Reply

 How can I write a batch file that opens a file in a program?




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Serial read/write in batch file?
Hello all. I'm trying to write a request to COM2 and capture the answer. My device is 19200 baud 8/1 non parity. Using a freeware terminal called termite I can send the hex instruction and receive the answer, as verified in HHD serial monitor. My batch file looks like this: MODE COM2:...
General Discussion
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
How do I write batch file to delete thousands of files
Was infected by the matsnu1 virus recently which encrypes and locks all your data files. Got all my files back by running matsnu1decryp.exe You need an original clean file before the virus struck for it to work out how to decrypt all your other files does does save the day. Down side is that you...
Software
batch file open file for program in the startup folder
I have a computer that is a drone specifically for an outside LED sign. This computer is designed to never shut off and doesn't have any other program on it besides Operating System and the sign software. I need to create a batch file that I can place in the "start-up" folder that will open the...
General Discussion
I want to write a batch file to get the DNS numbers behind a router.
I do a lot of internet troubleshooting and would like to put a simple batch file in customers computers that will let me see their DNS numbers when they are using a router. I currently do this from a command prompt for Comast: nslookup set type=ns comcast.net It's been years since I...
Network & Sharing


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 03:37.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App