diff --git a/src/Jackett.Server/Jackett.Server.csproj b/src/Jackett.Server/Jackett.Server.csproj
index d2471b26f..706f93d97 100644
--- a/src/Jackett.Server/Jackett.Server.csproj
+++ b/src/Jackett.Server/Jackett.Server.csproj
@@ -37,6 +37,7 @@
+
diff --git a/src/Jackett.Tray/Jackett.Tray.csproj b/src/Jackett.Tray/Jackett.Tray.csproj
index 309a2e49b..15c2ee7e7 100644
--- a/src/Jackett.Tray/Jackett.Tray.csproj
+++ b/src/Jackett.Tray/Jackett.Tray.csproj
@@ -12,17 +12,6 @@
-
-
- f935dc20-1cf0-11d0-adb9-00c04fd58a0b
- 1
- 0
- tlbimp
- 0
- false
-
-
-
diff --git a/src/Jackett.Tray/Main.cs b/src/Jackett.Tray/Main.cs
index 421fafe9c..5383dabac 100644
--- a/src/Jackett.Tray/Main.cs
+++ b/src/Jackett.Tray/Main.cs
@@ -139,7 +139,14 @@ namespace Jackett.Tray
{
get
{
- return File.Exists(ShortcutPath);
+ if (File.Exists(ShortcutPath) || File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "Jackett.lnk")))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
set
{
@@ -158,7 +165,7 @@ namespace Jackett.Tray
{
get
{
- return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "Jackett.lnk");
+ return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "Jackett.url");
}
}
@@ -166,12 +173,15 @@ namespace Jackett.Tray
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
- var appPath = Assembly.GetExecutingAssembly().Location;
- var shell = new IWshRuntimeLibrary.WshShell();
- var shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(ShortcutPath);
- shortcut.Description = Assembly.GetExecutingAssembly().GetName().Name;
- shortcut.TargetPath = appPath;
- shortcut.Save();
+ using (StreamWriter writer = new StreamWriter(ShortcutPath))
+ {
+ var appPath = Assembly.GetExecutingAssembly().Location;
+ writer.WriteLine("[InternetShortcut]");
+ writer.WriteLine("URL=file:///" + appPath);
+ writer.WriteLine("IconIndex=0");
+ string icon = appPath.Replace('\\', '/');
+ writer.WriteLine("IconFile=" + icon);
+ }
}
}
diff --git a/src/Jackett.Updater/Jackett.Updater.csproj b/src/Jackett.Updater/Jackett.Updater.csproj
index a77fbd8c9..88d558902 100644
--- a/src/Jackett.Updater/Jackett.Updater.csproj
+++ b/src/Jackett.Updater/Jackett.Updater.csproj
@@ -9,6 +9,11 @@
false
+
+
+
+
+