<?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=Generalissimo</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=Generalissimo"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Generalissimo/"/>
	<updated>2026-11-04T23:04:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Talk:VLC_HowTo/Shut_down_the_computer_at_the_end_of_the_playlist&amp;diff=23156</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=23156"/>
		<updated>2012-09-09T19:08:00Z</updated>

		<summary type="html">&lt;p&gt;Generalissimo: Noted my changes + unsigned comments&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. [[User:Diskape|Diskape]] 12:45, 6 November 2007&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. [[User:Dan-yell|Dan-yell]] 11:14, 27 August 2008‎&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. [[User:Vmi|Vmi]] 17:54, 26 September 2010‎&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Personally, I ran into problems shutting down when setting up Lubuntu on an old laptop, and have added in my solution, and tidied up a little...&lt;br /&gt;
If anybody has a better suggestion for naming the Linux section then be my guest. [[User:Generalissimo|Generalissimo]] 21:08, 9 September 2012 (CEST)&lt;/div&gt;</summary>
		<author><name>Generalissimo</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=23155</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=23155"/>
		<updated>2012-09-09T18:37:29Z</updated>

		<summary type="html">&lt;p&gt;Generalissimo: Tidying/rewording&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 upon quitting VLC.&lt;br /&gt;
&lt;br /&gt;
= Quitting VLC =&lt;br /&gt;
&lt;br /&gt;
{{VLC}} can exit once all items have finished playing, this can done by enabling &#039;&#039;&#039;Play and exit&#039;&#039;&#039; in the Playlist section under [[Preferences]]&lt;br /&gt;
&lt;br /&gt;
[[File:Play and exit.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quit {{VLC}} after playback is finished, by adding the following to the end of the playlist:&lt;br /&gt;
&amp;lt;pre&amp;gt;vlc://quit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
for use multi select file, works in seven, may be more juste made and forget your list... :) enjoy :&lt;br /&gt;
&amp;lt;pre&amp;gt;START /WAIT C:\&amp;quot;Program Files&amp;quot;\VideoLAN\VLC\vlc.exe %* 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;
Create and execute a bash script with the following:&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;br /&gt;
With &#039;&#039;&#039;&amp;amp;&amp;amp;&#039;&#039;&#039;, figuratively speaking if it returns something other than &amp;quot;success&amp;quot; it doesn&#039;t perform the next command in the line.&lt;br /&gt;
==== Ubuntu 11.04 onwards / ConsoleKit based systems ====&lt;br /&gt;
You are able to shutdown without requiring sudo / root privileges by using dbus-send[http://askubuntu.com/questions/49553/how-to-give-shutdown-privileges-to-a-user]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
&lt;br /&gt;
vlc &amp;amp;&amp;amp; dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Older Ubuntu versions / HAL based systems ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
&lt;br /&gt;
vlc &amp;amp;&amp;amp; dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Generalissimo</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=23154</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=23154"/>
		<updated>2012-09-09T18:16:02Z</updated>

		<summary type="html">&lt;p&gt;Generalissimo: Added external link for reference.&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 upon quitting VLC.&lt;br /&gt;
&lt;br /&gt;
=== Quitting VLC ===&lt;br /&gt;
&lt;br /&gt;
{{VLC}} can exit once all items have finished playing, this can be enabled by ticking &#039;&#039;&#039;Play and exit&#039;&#039;&#039; in the Playlist section in [[Preferences]].&lt;br /&gt;
&lt;br /&gt;
[[File:Play and exit.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quit {{VLC}} after playback is finished, by adding the following to the end of the playlist:&lt;br /&gt;
&amp;lt;pre&amp;gt;vlc://quit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
for use multi select file, works in seven, may be more juste made and forget your list... :) enjoy :&lt;br /&gt;
&amp;lt;pre&amp;gt;START /WAIT C:\&amp;quot;Program Files&amp;quot;\VideoLAN\VLC\vlc.exe %* 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;br /&gt;
==== Ubuntu 11.04 onwards / ConsoleKit ====&lt;br /&gt;
You are able to shutdown without requiring sudo / root privileges by using dbus-send. [http://askubuntu.com/questions/49553/how-to-give-shutdown-privileges-to-a-user]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
&lt;br /&gt;
vlc &amp;amp;&amp;amp; dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Older Ubuntu versions / HAL ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
&lt;br /&gt;
vlc &amp;amp;&amp;amp; dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Generalissimo</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=23153</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=23153"/>
		<updated>2012-09-09T18:09:52Z</updated>

		<summary type="html">&lt;p&gt;Generalissimo: Added in an alternative way to exit, and a way to shutdown after playback&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 upon quitting VLC.&lt;br /&gt;
&lt;br /&gt;
=== Quitting VLC ===&lt;br /&gt;
&lt;br /&gt;
{{VLC}} can exit once all items have finished playing, this can be enabled by ticking &#039;&#039;&#039;Play and exit&#039;&#039;&#039; in the Playlist section in [[Preferences]].&lt;br /&gt;
&lt;br /&gt;
[[File:Play and exit.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can quit {{VLC}} after playback is finished, by adding the following to the end of the playlist:&lt;br /&gt;
&amp;lt;pre&amp;gt;vlc://quit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
for use multi select file, works in seven, may be more juste made and forget your list... :) enjoy :&lt;br /&gt;
&amp;lt;pre&amp;gt;START /WAIT C:\&amp;quot;Program Files&amp;quot;\VideoLAN\VLC\vlc.exe %* 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;br /&gt;
==== Ubuntu 11.04 onwards / ConsoleKit ====&lt;br /&gt;
You are able to shutdown without requiring sudo / root privileges by using dbus-send.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
&lt;br /&gt;
vlc &amp;amp;&amp;amp; dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Older Ubuntu versions / HAL ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /bin/sh&lt;br /&gt;
&lt;br /&gt;
vlc &amp;amp;&amp;amp; dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Generalissimo</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=File:Play_and_exit.gif&amp;diff=23152</id>
		<title>File:Play and exit.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=File:Play_and_exit.gif&amp;diff=23152"/>
		<updated>2012-09-09T17:44:51Z</updated>

		<summary type="html">&lt;p&gt;Generalissimo: Screenshot of Play and Exit option taken from Windows 7&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot of Play and Exit option taken from Windows 7&lt;/div&gt;</summary>
		<author><name>Generalissimo</name></author>
	</entry>
</feed>