aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/Native/Autorun.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-04-03 13:34:52 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-04-03 13:34:52 -0400
commit91ee2e22a82773a86832a0ce96a309403ab3bb78 (patch)
tree44570353c69a4ea0a501f43cebd6f5eab7604172 /MediaBrowser.ServerApplication/Native/Autorun.cs
parent6ba2a9ebd2cc42d83b8bbef959b8d5b71c0fee4d (diff)
update components
Diffstat (limited to 'MediaBrowser.ServerApplication/Native/Autorun.cs')
-rw-r--r--MediaBrowser.ServerApplication/Native/Autorun.cs35
1 files changed, 0 insertions, 35 deletions
diff --git a/MediaBrowser.ServerApplication/Native/Autorun.cs b/MediaBrowser.ServerApplication/Native/Autorun.cs
deleted file mode 100644
index 4d3f66b91..000000000
--- a/MediaBrowser.ServerApplication/Native/Autorun.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-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"));
- }
- }
- }
-}