aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/Native/Autorun.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-04-16 15:26:00 -0400
committerLuke <luke.pulverenti@gmail.com>2016-04-16 15:26:00 -0400
commit18dbdb194b6db75c1acb5457e9797d8b37150c07 (patch)
treef23d3d169ba1d6befcee6b0262133e778e815323 /MediaBrowser.ServerApplication/Native/Autorun.cs
parent007f4e193af99036b250a8323f92b753a9b74797 (diff)
parented6d8ae87f95acecc4636004574b551e3dc5b0fe (diff)
Merge pull request #1653 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.ServerApplication/Native/Autorun.cs')
-rw-r--r--MediaBrowser.ServerApplication/Native/Autorun.cs36
1 files changed, 0 insertions, 36 deletions
diff --git a/MediaBrowser.ServerApplication/Native/Autorun.cs b/MediaBrowser.ServerApplication/Native/Autorun.cs
deleted file mode 100644
index c384d0460..000000000
--- a/MediaBrowser.ServerApplication/Native/Autorun.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using MediaBrowser.Common.IO;
-using System;
-using System.IO;
-using CommonIO;
-
-namespace MediaBrowser.ServerApplication.Native
-{
- /// <summary>
- /// Class Autorun
- /// </summary>
- public static class Autorun
- {
- /// <summary>
- /// Configures the specified autorun.
- /// </summary>
- /// <param name="autorun">if set to <c>true</c> [autorun].</param>
- /// <param name="fileSystem">The file system.</param>
- public static void Configure(bool autorun, IFileSystem fileSystem)
- {
- var shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Emby", "Emby Server.lnk");
-
- var startupPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
-
- if (autorun)
- {
- //Copy our shortut into the startup folder for this user
- File.Copy(shortcutPath, Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "Emby Server.lnk"), true);
- }
- else
- {
- //Remove our shortcut from the startup folder for this user
- fileSystem.DeleteFile(Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "Emby Server.lnk"));
- }
- }
- }
-}