Minimize a window when running a .bat

Solved
Hello, I created a .bat file that opens a music file, I managed to set the execution of the .bat file to minimized mode but the music still opens in the player and the window opens fully on the screen.
Is there a way to minimize a window with a command in Batch?
There are many forums on this subject but I can't find anything that I can understand!
I'm not very good at Batch.

Thank you in advance for your answers.

3 answers

  • Votes
  • Date
  • Descending date
  1. Hello,

    If you no longer need the back window, put exit after starting your music.
    1. That's not the problem; I would like the music player's window to minimize to the taskbar after it launches.
      But thanks anyway for your response.
    2. Contributor
      @Ancor17It's not possible, there is no internal command to do that.

      You have to rig things to achieve the desired result.
  2. Contributor
    Hello,

    Which reader is it about?

    --

    “Artificial intelligence is defined as the opposite of natural stupidity.”
    1. Which drive???

      The .bat file is on a USB stick but I don't understand how that can help me...
    2. Contributor
      @Ancor17It's not because you don't understand that it can't help you.

      I'll start again: which music player?
    3. Ah! the music player! Excuse me...
      Otherwise, the music player would be Windows Media Player
    4. And I forgot to mention that I cannot modify the computer's settings, everything that needs to be done must be done through the .bat file.


  3. There is an execution error, I checked that the executable in the VLC folder is indeed named VLCPortable.exe.
    1. Contributor


      @echo off
      setlocal enableextensions

      cd /d %~dp0 || exit /B 1

      if not exist "%cd%VLCPortable\VLCPortable.exe" (echo. & echo Please install VLC Portable on your USB drive)

      set musique=%cd%MUS\MUS.mp3

      start /D "%cd%VLCPortable" VLCPortable.exe --qt-start-minimized "%musique%"

      exit /B
    2. Great! It's working really well now!
      Thank you so much barnabe0057!