diff options
| author | hatharry <hatharry@hotmail.com> | 2016-07-25 23:29:52 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-25 23:29:52 +1200 |
| commit | f21f9923de6291aaf985f32dbbbaddbb26d07fb1 (patch) | |
| tree | 1a313e9a1c6790a755926bcef221c5f680537eae /MediaBrowser.ServerApplication/Native/Autorun.cs | |
| parent | 6332d0b9436c511a59e2abd67ea8c24ce3d82ace (diff) | |
| parent | 8328f39834f042e1808fd8506bbc7c48151703ab (diff) | |
Merge pull request #15 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.ServerApplication/Native/Autorun.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/Native/Autorun.cs | 35 |
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")); - } - } - } -} |
