aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/Native/Autorun.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-04-09 22:32:27 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-04-09 22:32:27 -0400
commit6ea48d1e7c32f159c2e8c92f73f84b09bb78ec3f (patch)
treefd907ec9c752b7c760ab764f74a15b35f6ff660d /MediaBrowser.ServerApplication/Native/Autorun.cs
parentbe4f301198fa0d1d455478eebfc960a6e61c33e9 (diff)
parent638dba51ec75f9180c44ec4e75b67f7cea774910 (diff)
Merge branch '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"));
- }
- }
- }
-}