<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vmi</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vmi"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Vmi/"/>
	<updated>2026-11-04T19:23:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=VLC_HowTo/Shut_down_the_computer_at_the_end_of_the_playlist&amp;diff=17136</id>
		<title>VLC HowTo/Shut down the computer at the end of the playlist</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=VLC_HowTo/Shut_down_the_computer_at_the_end_of_the_playlist&amp;diff=17136"/>
		<updated>2010-09-26T15:56:16Z</updated>

		<summary type="html">&lt;p&gt;Vmi: /* Bat File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{howto|Switch off your computer automatically, when VLC has finished playing a file}}&lt;br /&gt;
&lt;br /&gt;
= General idea =&lt;br /&gt;
It is not a feature included in {{VLC}} but small scripts can do it for you.&lt;br /&gt;
&lt;br /&gt;
= Quit VLC =&lt;br /&gt;
&lt;br /&gt;
You can quit {{VLC}} after playback is finished, by adding &lt;br /&gt;
&amp;lt;pre&amp;gt;vlc://quit&amp;lt;/pre&amp;gt; to the playlist.&lt;br /&gt;
&lt;br /&gt;
= Shutdown =&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
=== Bat File ===&lt;br /&gt;
1.) Create a new file with extension .BAT [use notepad] and paste in the contents from below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;START /WAIT C:\&amp;quot;Program Files&amp;quot;\VideoLAN\VLC\vlc.exe %1 vlc://quit&lt;br /&gt;
shutdown -s -t 60&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.) Use VLC to create/save playlist with desired content.&lt;br /&gt;
&lt;br /&gt;
3.) Drag saved playlist icon on top of .bat file&lt;br /&gt;
&lt;br /&gt;
The batch file will launch VLC and load the playlist.  &lt;br /&gt;
It will wait for the playlist to finish playing&lt;br /&gt;
VLC will quit&lt;br /&gt;
Batch will continue processing and system will be shutdown in 60 sec.&#039;s.&lt;br /&gt;
&lt;br /&gt;
=== VBScript ===&lt;br /&gt;
Make a .vbs file, copy in the code below and save. Drag and drop files onto the script file or double click the script to start it up. Supports avi, mp4, mov, wmv and 3gp files.&lt;br /&gt;
&lt;br /&gt;
Note: Change line 6 to TRUE to force quit all other applications.&lt;br /&gt;
&lt;br /&gt;
[[File:VLC Auto Shutdown.PNG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&#039;By eyehawk78, posted on http://forum.videolan.org/viewtopic.php?f=16&amp;amp;t=70391&lt;br /&gt;
&lt;br /&gt;
Dim oShell, FSO, FileData, vlc_path, video_dir, user, programs&lt;br /&gt;
Dim files, seconds&lt;br /&gt;
&lt;br /&gt;
force_shutdown = FALSE &#039;Set to true to force quit all other applications set to false otherwise&lt;br /&gt;
&lt;br /&gt;
Function SelectFile()&lt;br /&gt;
   Set file = CreateObject(&amp;quot;UserAccounts.CommonDialog&amp;quot;)&lt;br /&gt;
   file.Filter = &amp;quot;Video Files (avi, mp4, mov, wmv, 3gp)|*.avi;*.mp4;*.mov;*.wmv;*.3gp;&amp;quot;&lt;br /&gt;
   file.FilterIndex = 1&lt;br /&gt;
   file.InitialDir = video_dir&lt;br /&gt;
   InitFSO = file.ShowOpen&lt;br /&gt;
   &lt;br /&gt;
   If InitFSO = True Then   &lt;br /&gt;
      SelectFile = file.FileName&lt;br /&gt;
   Else&lt;br /&gt;
      WScript.Quit&lt;br /&gt;
   End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
Sub InputError(ErrorString)&lt;br /&gt;
   Wscript.Echo ErrorString&lt;br /&gt;
   Wscript.Quit&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
files = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Set FSO = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
Set oShell = CreateObject(&amp;quot;WScript.Shell&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
If Wscript.Arguments.Count &amp;gt; 0 Then&lt;br /&gt;
   For Each FileData In Wscript.Arguments   &lt;br /&gt;
      Set FileInfo = FSO.GetFile(FileData)&lt;br /&gt;
      If InStr(FileInfo.Type, &amp;quot;.avi&amp;quot;) or InStr(FileInfo.Type, &amp;quot;.mp4&amp;quot;) or InStr(FileInfo.Type, &amp;quot;.mov&amp;quot;) or InStr(FileInfo.Type, &amp;quot;.wmv&amp;quot;) or InStr(FileInfo.Type, &amp;quot;.3gp&amp;quot;) Then&lt;br /&gt;
         files = files &amp;amp; &amp;quot; &amp;quot; &amp;amp; CHR(34) &amp;amp; FileData &amp;amp; CHR(34)&lt;br /&gt;
      Else&lt;br /&gt;
         InputError(&amp;quot;File &amp;quot; &amp;amp; CHR(34) &amp;amp; FileInfo.Name &amp;amp; CHR(34) &amp;amp; &amp;quot; has an unrecognised file type - Must be of type .avi, .mp4, .mov, .wmv or .3gp&amp;quot;)&lt;br /&gt;
      End If&lt;br /&gt;
   Next&lt;br /&gt;
Else&lt;br /&gt;
   user = oShell.ExpandEnvironmentStrings(&amp;quot;%USERPROFILE%&amp;quot;)&lt;br /&gt;
   video_dir = oShell.ExpandEnvironmentStrings(&amp;quot;%VLC_SHUTDOWN_VIDEOS_DIRECTORY%&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
   &#039;If this if first run, we must save where the default video directory is&lt;br /&gt;
&lt;br /&gt;
   If video_dir = &amp;quot;%VLC_SHUTDOWN_VIDEOS_DIRECTORY%&amp;quot; Then&lt;br /&gt;
      video_dir = InputBox(&amp;quot;Please input the directory where your Videos are kept.&amp;quot; &amp;amp; vbcrlf &amp;amp; vbNewLine &amp;amp; &amp;quot;E.g. C:\Documents and Settings\User Name\My Documents\My Videos&amp;quot;, &amp;quot;First Run&amp;quot;, user)&lt;br /&gt;
      If video_dir &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
         strComputer = &amp;quot;.&amp;quot;&lt;br /&gt;
         Set objWMIService = GetObject(&amp;quot;winmgmts:\\&amp;quot; &amp;amp; strComputer &amp;amp; &amp;quot;\root\cimv2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
         Set objVariable = objWMIService.Get(&amp;quot;Win32_Environment&amp;quot;).SpawnInstance_&lt;br /&gt;
&lt;br /&gt;
         objVariable.Name = &amp;quot;VLC_SHUTDOWN_VIDEOS_DIRECTORY&amp;quot;&lt;br /&gt;
         objVariable.UserName = &amp;quot;&amp;lt;System&amp;gt;&amp;quot;&lt;br /&gt;
         objVariable.VariableValue = video_dir&lt;br /&gt;
         objVariable.Put_   &lt;br /&gt;
      Else&lt;br /&gt;
         WScript.Quit&lt;br /&gt;
      End If&lt;br /&gt;
   End If   &lt;br /&gt;
   &lt;br /&gt;
   answer = 6&lt;br /&gt;
&lt;br /&gt;
   &#039;Loop while user wishes to add more files to playlist&lt;br /&gt;
&lt;br /&gt;
   Do While answer = 6&lt;br /&gt;
      files = files &amp;amp; &amp;quot; &amp;quot; &amp;amp; CHR(34) &amp;amp; SelectFile() &amp;amp; CHR(34)&lt;br /&gt;
      answer = MsgBox(&amp;quot;Would you like to add another file to the playlist?&amp;quot;, 3, &amp;quot;Continue?&amp;quot;)&lt;br /&gt;
   Loop&lt;br /&gt;
&lt;br /&gt;
   If answer = 2 Then&lt;br /&gt;
      WScript.Quit&lt;br /&gt;
   End If&lt;br /&gt;
   &lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039;If this if first run, we must save where the default VLC directory is&lt;br /&gt;
&lt;br /&gt;
programs = oShell.ExpandEnvironmentStrings(&amp;quot;%PROGRAMFILES%&amp;quot;)&lt;br /&gt;
vlc_path = oShell.ExpandEnvironmentStrings(&amp;quot;%VLC_SHUTDOWN_VLC_LOCATION%&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
If vlc_path = &amp;quot;%VLC_SHUTDOWN_VLC_LOCATION%&amp;quot; Then&lt;br /&gt;
   vlc_path = InputBox(&amp;quot;Please input the directory where VLC program file is kept.&amp;quot; &amp;amp; vbcrlf &amp;amp; vbNewLine &amp;amp; &amp;quot;E.g. C:\Program Files\VideoLAN\VLC&amp;quot;, &amp;quot;First Run&amp;quot;, programs)&lt;br /&gt;
   &lt;br /&gt;
   If vlc_path &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
      strComputer = &amp;quot;.&amp;quot;&lt;br /&gt;
      Set objWMIService = GetObject(&amp;quot;winmgmts:\\&amp;quot; &amp;amp; strComputer &amp;amp; &amp;quot;\root\cimv2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
      Set objVariable = objWMIService.Get(&amp;quot;Win32_Environment&amp;quot;).SpawnInstance_&lt;br /&gt;
&lt;br /&gt;
      objVariable.Name = &amp;quot;VLC_SHUTDOWN_VLC_LOCATION&amp;quot;&lt;br /&gt;
      objVariable.UserName = &amp;quot;&amp;lt;System&amp;gt;&amp;quot;&lt;br /&gt;
      objVariable.VariableValue = vlc_path&lt;br /&gt;
      objVariable.Put_&lt;br /&gt;
   Else&lt;br /&gt;
      WScript.Quit&lt;br /&gt;
   End If&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
vlc_path = CHR(34) &amp;amp; vlc_path &amp;amp; &amp;quot;\vlc.exe&amp;quot; &amp;amp; CHR(34) &#039;VLC directory location&lt;br /&gt;
&lt;br /&gt;
seconds = InputBox(&amp;quot;Please enter the number of seconds the system should delay before commencing shutdown&amp;quot;, &amp;quot;Enter Number of Seconds&amp;quot;, &amp;quot;5&amp;quot;)&lt;br /&gt;
If seconds &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
   If IsNumeric(seconds) And seconds &amp;gt; 0 Then&lt;br /&gt;
&lt;br /&gt;
      oShell.Run vlc_path &amp;amp; &amp;quot; &amp;quot; &amp;amp; files &amp;amp; &amp;quot; vlc://quit&amp;quot;, 1, TRUE&lt;br /&gt;
      &#039;Execute shutdown command&lt;br /&gt;
      If force_shutdown Then&lt;br /&gt;
         oShell.Run &amp;quot;shutdown -s -f -t &amp;quot; &amp;amp; Round(seconds) &amp;amp; &amp;quot; -c &amp;quot; &amp;amp; CHR(34) &amp;amp; &amp;quot;Automatic Shutdown: Playlist Complete&amp;quot; &amp;amp; CHR(34)&lt;br /&gt;
      Else&lt;br /&gt;
         oShell.Run &amp;quot;shutdown -s -t &amp;quot; &amp;amp; Round(seconds) &amp;amp; &amp;quot; -c &amp;quot; &amp;amp; CHR(34) &amp;amp; &amp;quot;Automatic Shutdown: Playlist Complete&amp;quot; &amp;amp; CHR(34)&lt;br /&gt;
      End If&lt;br /&gt;
   Else&lt;br /&gt;
      InputError(&amp;quot;Input not a number or negative&amp;quot;)&lt;br /&gt;
   End If&lt;br /&gt;
End If&lt;br /&gt;
Wscript.Quit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
Make a .sh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
&lt;br /&gt;
vlc &amp;amp;&amp;amp; shutdown -h now&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vmi</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Talk:VLC_HowTo/Shut_down_the_computer_at_the_end_of_the_playlist&amp;diff=17135</id>
		<title>Talk:VLC HowTo/Shut down the computer at the end of the playlist</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Talk:VLC_HowTo/Shut_down_the_computer_at_the_end_of_the_playlist&amp;diff=17135"/>
		<updated>2010-09-26T15:54:31Z</updated>

		<summary type="html">&lt;p&gt;Vmi: /* WinXP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial is very unclear for people that had never anything to do with .bat files.&lt;br /&gt;
&lt;br /&gt;
Can you explain step by step what have to be done to make such script?&lt;br /&gt;
&lt;br /&gt;
tia.&lt;br /&gt;
&lt;br /&gt;
== WinXP ==&lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t work on WinXP (at least), because the second application (shutdown, in this case) is not startet after VLC&#039;s quit, but instantly.&lt;br /&gt;
&lt;br /&gt;
Anyway, if this worked, you could also add the quit.m3u to the startVLCcommand.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Updated batch file instructions are easier to follow and implement and should also prove compatible with most Windows based OS&#039;s.&lt;/div&gt;</summary>
		<author><name>Vmi</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=VLC_HowTo/Shut_down_the_computer_at_the_end_of_the_playlist&amp;diff=17134</id>
		<title>VLC HowTo/Shut down the computer at the end of the playlist</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=VLC_HowTo/Shut_down_the_computer_at_the_end_of_the_playlist&amp;diff=17134"/>
		<updated>2010-09-26T15:51:23Z</updated>

		<summary type="html">&lt;p&gt;Vmi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{howto|Switch off your computer automatically, when VLC has finished playing a file}}&lt;br /&gt;
&lt;br /&gt;
= General idea =&lt;br /&gt;
It is not a feature included in {{VLC}} but small scripts can do it for you.&lt;br /&gt;
&lt;br /&gt;
= Quit VLC =&lt;br /&gt;
&lt;br /&gt;
You can quit {{VLC}} after playback is finished, by adding &lt;br /&gt;
&amp;lt;pre&amp;gt;vlc://quit&amp;lt;/pre&amp;gt; to the playlist.&lt;br /&gt;
&lt;br /&gt;
= Shutdown =&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
=== Bat File ===&lt;br /&gt;
1.) Create a new file with extension .BAT [use notepad] and paste in the contents from below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;START /WAIT /MIN C:\&amp;quot;Program Files&amp;quot;\VideoLAN\VLC\vlc.exe %1 vlc://quit&lt;br /&gt;
shutdown -s -t 60&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.) Use VLC to create/save playlist with desired content.&lt;br /&gt;
&lt;br /&gt;
3.) Drag saved playlist icon on top of .bat file&lt;br /&gt;
&lt;br /&gt;
The batch file will launch VLC and load the playlist.  &lt;br /&gt;
It will wait for the playlist to finish playing&lt;br /&gt;
VLC will quit&lt;br /&gt;
Batch will continue processing and system will be shutdown in 60 sec.&#039;s. &lt;br /&gt;
&lt;br /&gt;
=== VBScript ===&lt;br /&gt;
Make a .vbs file, copy in the code below and save. Drag and drop files onto the script file or double click the script to start it up. Supports avi, mp4, mov, wmv and 3gp files.&lt;br /&gt;
&lt;br /&gt;
Note: Change line 6 to TRUE to force quit all other applications.&lt;br /&gt;
&lt;br /&gt;
[[File:VLC Auto Shutdown.PNG]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&#039;By eyehawk78, posted on http://forum.videolan.org/viewtopic.php?f=16&amp;amp;t=70391&lt;br /&gt;
&lt;br /&gt;
Dim oShell, FSO, FileData, vlc_path, video_dir, user, programs&lt;br /&gt;
Dim files, seconds&lt;br /&gt;
&lt;br /&gt;
force_shutdown = FALSE &#039;Set to true to force quit all other applications set to false otherwise&lt;br /&gt;
&lt;br /&gt;
Function SelectFile()&lt;br /&gt;
   Set file = CreateObject(&amp;quot;UserAccounts.CommonDialog&amp;quot;)&lt;br /&gt;
   file.Filter = &amp;quot;Video Files (avi, mp4, mov, wmv, 3gp)|*.avi;*.mp4;*.mov;*.wmv;*.3gp;&amp;quot;&lt;br /&gt;
   file.FilterIndex = 1&lt;br /&gt;
   file.InitialDir = video_dir&lt;br /&gt;
   InitFSO = file.ShowOpen&lt;br /&gt;
   &lt;br /&gt;
   If InitFSO = True Then   &lt;br /&gt;
      SelectFile = file.FileName&lt;br /&gt;
   Else&lt;br /&gt;
      WScript.Quit&lt;br /&gt;
   End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
Sub InputError(ErrorString)&lt;br /&gt;
   Wscript.Echo ErrorString&lt;br /&gt;
   Wscript.Quit&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
files = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Set FSO = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
Set oShell = CreateObject(&amp;quot;WScript.Shell&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
If Wscript.Arguments.Count &amp;gt; 0 Then&lt;br /&gt;
   For Each FileData In Wscript.Arguments   &lt;br /&gt;
      Set FileInfo = FSO.GetFile(FileData)&lt;br /&gt;
      If InStr(FileInfo.Type, &amp;quot;.avi&amp;quot;) or InStr(FileInfo.Type, &amp;quot;.mp4&amp;quot;) or InStr(FileInfo.Type, &amp;quot;.mov&amp;quot;) or InStr(FileInfo.Type, &amp;quot;.wmv&amp;quot;) or InStr(FileInfo.Type, &amp;quot;.3gp&amp;quot;) Then&lt;br /&gt;
         files = files &amp;amp; &amp;quot; &amp;quot; &amp;amp; CHR(34) &amp;amp; FileData &amp;amp; CHR(34)&lt;br /&gt;
      Else&lt;br /&gt;
         InputError(&amp;quot;File &amp;quot; &amp;amp; CHR(34) &amp;amp; FileInfo.Name &amp;amp; CHR(34) &amp;amp; &amp;quot; has an unrecognised file type - Must be of type .avi, .mp4, .mov, .wmv or .3gp&amp;quot;)&lt;br /&gt;
      End If&lt;br /&gt;
   Next&lt;br /&gt;
Else&lt;br /&gt;
   user = oShell.ExpandEnvironmentStrings(&amp;quot;%USERPROFILE%&amp;quot;)&lt;br /&gt;
   video_dir = oShell.ExpandEnvironmentStrings(&amp;quot;%VLC_SHUTDOWN_VIDEOS_DIRECTORY%&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
   &#039;If this if first run, we must save where the default video directory is&lt;br /&gt;
&lt;br /&gt;
   If video_dir = &amp;quot;%VLC_SHUTDOWN_VIDEOS_DIRECTORY%&amp;quot; Then&lt;br /&gt;
      video_dir = InputBox(&amp;quot;Please input the directory where your Videos are kept.&amp;quot; &amp;amp; vbcrlf &amp;amp; vbNewLine &amp;amp; &amp;quot;E.g. C:\Documents and Settings\User Name\My Documents\My Videos&amp;quot;, &amp;quot;First Run&amp;quot;, user)&lt;br /&gt;
      If video_dir &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
         strComputer = &amp;quot;.&amp;quot;&lt;br /&gt;
         Set objWMIService = GetObject(&amp;quot;winmgmts:\\&amp;quot; &amp;amp; strComputer &amp;amp; &amp;quot;\root\cimv2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
         Set objVariable = objWMIService.Get(&amp;quot;Win32_Environment&amp;quot;).SpawnInstance_&lt;br /&gt;
&lt;br /&gt;
         objVariable.Name = &amp;quot;VLC_SHUTDOWN_VIDEOS_DIRECTORY&amp;quot;&lt;br /&gt;
         objVariable.UserName = &amp;quot;&amp;lt;System&amp;gt;&amp;quot;&lt;br /&gt;
         objVariable.VariableValue = video_dir&lt;br /&gt;
         objVariable.Put_   &lt;br /&gt;
      Else&lt;br /&gt;
         WScript.Quit&lt;br /&gt;
      End If&lt;br /&gt;
   End If   &lt;br /&gt;
   &lt;br /&gt;
   answer = 6&lt;br /&gt;
&lt;br /&gt;
   &#039;Loop while user wishes to add more files to playlist&lt;br /&gt;
&lt;br /&gt;
   Do While answer = 6&lt;br /&gt;
      files = files &amp;amp; &amp;quot; &amp;quot; &amp;amp; CHR(34) &amp;amp; SelectFile() &amp;amp; CHR(34)&lt;br /&gt;
      answer = MsgBox(&amp;quot;Would you like to add another file to the playlist?&amp;quot;, 3, &amp;quot;Continue?&amp;quot;)&lt;br /&gt;
   Loop&lt;br /&gt;
&lt;br /&gt;
   If answer = 2 Then&lt;br /&gt;
      WScript.Quit&lt;br /&gt;
   End If&lt;br /&gt;
   &lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#039;If this if first run, we must save where the default VLC directory is&lt;br /&gt;
&lt;br /&gt;
programs = oShell.ExpandEnvironmentStrings(&amp;quot;%PROGRAMFILES%&amp;quot;)&lt;br /&gt;
vlc_path = oShell.ExpandEnvironmentStrings(&amp;quot;%VLC_SHUTDOWN_VLC_LOCATION%&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
If vlc_path = &amp;quot;%VLC_SHUTDOWN_VLC_LOCATION%&amp;quot; Then&lt;br /&gt;
   vlc_path = InputBox(&amp;quot;Please input the directory where VLC program file is kept.&amp;quot; &amp;amp; vbcrlf &amp;amp; vbNewLine &amp;amp; &amp;quot;E.g. C:\Program Files\VideoLAN\VLC&amp;quot;, &amp;quot;First Run&amp;quot;, programs)&lt;br /&gt;
   &lt;br /&gt;
   If vlc_path &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
      strComputer = &amp;quot;.&amp;quot;&lt;br /&gt;
      Set objWMIService = GetObject(&amp;quot;winmgmts:\\&amp;quot; &amp;amp; strComputer &amp;amp; &amp;quot;\root\cimv2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
      Set objVariable = objWMIService.Get(&amp;quot;Win32_Environment&amp;quot;).SpawnInstance_&lt;br /&gt;
&lt;br /&gt;
      objVariable.Name = &amp;quot;VLC_SHUTDOWN_VLC_LOCATION&amp;quot;&lt;br /&gt;
      objVariable.UserName = &amp;quot;&amp;lt;System&amp;gt;&amp;quot;&lt;br /&gt;
      objVariable.VariableValue = vlc_path&lt;br /&gt;
      objVariable.Put_&lt;br /&gt;
   Else&lt;br /&gt;
      WScript.Quit&lt;br /&gt;
   End If&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
vlc_path = CHR(34) &amp;amp; vlc_path &amp;amp; &amp;quot;\vlc.exe&amp;quot; &amp;amp; CHR(34) &#039;VLC directory location&lt;br /&gt;
&lt;br /&gt;
seconds = InputBox(&amp;quot;Please enter the number of seconds the system should delay before commencing shutdown&amp;quot;, &amp;quot;Enter Number of Seconds&amp;quot;, &amp;quot;5&amp;quot;)&lt;br /&gt;
If seconds &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
   If IsNumeric(seconds) And seconds &amp;gt; 0 Then&lt;br /&gt;
&lt;br /&gt;
      oShell.Run vlc_path &amp;amp; &amp;quot; &amp;quot; &amp;amp; files &amp;amp; &amp;quot; vlc://quit&amp;quot;, 1, TRUE&lt;br /&gt;
      &#039;Execute shutdown command&lt;br /&gt;
      If force_shutdown Then&lt;br /&gt;
         oShell.Run &amp;quot;shutdown -s -f -t &amp;quot; &amp;amp; Round(seconds) &amp;amp; &amp;quot; -c &amp;quot; &amp;amp; CHR(34) &amp;amp; &amp;quot;Automatic Shutdown: Playlist Complete&amp;quot; &amp;amp; CHR(34)&lt;br /&gt;
      Else&lt;br /&gt;
         oShell.Run &amp;quot;shutdown -s -t &amp;quot; &amp;amp; Round(seconds) &amp;amp; &amp;quot; -c &amp;quot; &amp;amp; CHR(34) &amp;amp; &amp;quot;Automatic Shutdown: Playlist Complete&amp;quot; &amp;amp; CHR(34)&lt;br /&gt;
      End If&lt;br /&gt;
   Else&lt;br /&gt;
      InputError(&amp;quot;Input not a number or negative&amp;quot;)&lt;br /&gt;
   End If&lt;br /&gt;
End If&lt;br /&gt;
Wscript.Quit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
Make a .sh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
&lt;br /&gt;
vlc &amp;amp;&amp;amp; shutdown -h now&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vmi</name></author>
	</entry>
</feed>