<?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=Eyehawk78</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=Eyehawk78"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Eyehawk78/"/>
	<updated>2026-11-04T17:14:50Z</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=15272</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=15272"/>
		<updated>2010-01-10T14:40:08Z</updated>

		<summary type="html">&lt;p&gt;Eyehawk78: /* VBScript */&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;
Make a .bat file. The first command would be launching VLC, the second one is &lt;br /&gt;
&amp;lt;pre&amp;gt;SHUTDOWN -s -t 01&amp;lt;/pre&amp;gt;. &lt;br /&gt;
Add vlc://quit to leave.&lt;br /&gt;
&lt;br /&gt;
Launch {{VLC}} through the shortcut to the bat file.&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>Eyehawk78</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=File:VLC_Auto_Shutdown.PNG&amp;diff=15271</id>
		<title>File:VLC Auto Shutdown.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=File:VLC_Auto_Shutdown.PNG&amp;diff=15271"/>
		<updated>2010-01-10T14:39:44Z</updated>

		<summary type="html">&lt;p&gt;Eyehawk78: Visual description of how to operate VBS shutdown script when playlist completes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual description of how to operate VBS shutdown script when playlist completes.&lt;/div&gt;</summary>
		<author><name>Eyehawk78</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=15270</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=15270"/>
		<updated>2010-01-10T14:33:54Z</updated>

		<summary type="html">&lt;p&gt;Eyehawk78: /* VBScript */&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;
Make a .bat file. The first command would be launching VLC, the second one is &lt;br /&gt;
&amp;lt;pre&amp;gt;SHUTDOWN -s -t 01&amp;lt;/pre&amp;gt;. &lt;br /&gt;
Add vlc://quit to leave.&lt;br /&gt;
&lt;br /&gt;
Launch {{VLC}} through the shortcut to the bat file.&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;
&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>Eyehawk78</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=15269</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=15269"/>
		<updated>2010-01-10T14:31:44Z</updated>

		<summary type="html">&lt;p&gt;Eyehawk78: /* Windows - Adding my VBScript as a option */&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;
Make a .bat file. The first command would be launching VLC, the second one is &lt;br /&gt;
&amp;lt;pre&amp;gt;SHUTDOWN -s -t 01&amp;lt;/pre&amp;gt;. &lt;br /&gt;
Add vlc://quit to leave.&lt;br /&gt;
&lt;br /&gt;
Launch {{VLC}} through the shortcut to the bat file.&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.&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;
Note: Change line 6 to TRUE to force quit all other open applications.&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>Eyehawk78</name></author>
	</entry>
</feed>