Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to launch a shortcut to a program (vlc.exe) and have it launch with certain attributes (it's quite a long string) and the target box will not accept enough characters. I need help finding another way to do so, I was wondering if you can launch a shortcut and attributes using a batch script? Or any other ideas?

To put it in context, I'm replacing my Firefox icon with a vlc shortcut to launch and record a 2 second snippet of who is using my computer when I'm away. The complete code I need is-

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" vlc dshow:// :dshow-vdev="Monitor Webcam" :dshow-adev="none" :dshow-size="640x480" :dshow-caching=1000 --run-time=2 -V dummy --intf=dummy --dummy-quiet :sout=#transcode{vcodec=h264,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:file{dst=C:\records\test1.ts} :sout-keep

But the target box maxes at-

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" vlc dshow:// :dshow-vdev="Monitor Webcam" :dshow-adev="none" :dshow-size="640x480" :dshow-caching=1000 --run-time=2 -V dummy --intf=dummy --dummy-quiet :sout=#transcode{vcodec=h264,vb=800,scale=1,acodec=mpga,ab=12

share|improve this question
    
"I was wondering if you can launch a shortcut and attributes using a batch script?" - Just launch VLC directly with required params from a batch file, and create a shortcut to the batch file with FF's name, icon etc. –  Karan Feb 2 '13 at 20:04
add comment

2 Answers

I'm not experienced with .bat files but I think your idea would work. I tried the following to play a playlist with windows media player:

start "C:\Program Files (x86)\Windows Media Player\wmplayer.exe" "C:\play.m3u"
share|improve this answer
add comment

There is a dozen ways to do this. IF I were you I would set the whole nasty string as a System variable. I will try to explain.

  1. Hold The "windows button" on the keyboard and press R (to open run window)
  2. Copy stuff inside quotes to the run window "rundll32 sysdm.cpl,EditEnvironmentVariables"
  3. Click on the bottom "new" button a small window "New System variable" will appear
  4. Pick A variable name say. I will use "WebCam" with out the quotes
  5. for the variable value i would put all the after the vlc.exe"
  6. click OK to both windows.
  7. For you short cut use "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" %WebCam%
  8. Then test it, with any luck it will work. It should, it might.. Well who knows GLHF

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.