mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-23 11:34:06 +02:00
Add desktop paths to MigrationManager for lnk editing
This commit is contained in:
parent
d7a0f577d6
commit
0d2681c5ba
@ -89,15 +89,25 @@ private static bool BeginMigration(MigrationDecision decision, Action<Exception>
|
|||||||
runningProcess.Close();
|
runningProcess.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the pinned taskbar lnk if exists
|
// update the lnk files wherever possible (desktop icons, pinned taskbar)
|
||||||
string linkFile = Path.Combine(Environment.ExpandEnvironmentVariables(@"%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"),"TweetDeck.lnk");
|
string[] locations = {
|
||||||
|
Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory),
|
||||||
|
Environment.GetFolderPath(Environment.SpecialFolder.CommonDesktopDirectory),
|
||||||
|
Environment.ExpandEnvironmentVariables(@"%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar")
|
||||||
|
};
|
||||||
|
|
||||||
if (File.Exists(linkFile)){
|
foreach(string location in locations){
|
||||||
LnkEditor lnk = new LnkEditor(linkFile);
|
string linkFile = Path.Combine(location,"TweetDeck.lnk");
|
||||||
lnk.SetPath(Application.ExecutablePath);
|
|
||||||
lnk.SetWorkingDirectory(Environment.CurrentDirectory);
|
if (File.Exists(linkFile)){
|
||||||
lnk.SetComment("TweetDick"); // TODO add a tagline
|
LnkEditor lnk = new LnkEditor(linkFile);
|
||||||
lnk.Save();
|
lnk.SetPath(Application.ExecutablePath);
|
||||||
|
lnk.SetWorkingDirectory(Environment.CurrentDirectory);
|
||||||
|
lnk.SetComment("TweetDick"); // TODO add a tagline
|
||||||
|
lnk.Save();
|
||||||
|
|
||||||
|
File.Move(linkFile,Path.Combine(location,"TweetDick.lnk"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// uninstall in the background
|
// uninstall in the background
|
||||||
|
Loading…
Reference in New Issue
Block a user