I developed the same program on
windows XP sp2 x86 using VS2005 and then tested it on
Windows 7 x64. But it worked fine for me. Try this and reply if this is working for you.
private void btnChangeShortcut_Click(object sender, EventArgs e)
{
UpdateTarget(shortCutPathFile, textBox2.Text);
}
public void UpdateTarget(string shortCutPathFile, string newTargetPathFile)
{
WshShell shell = new WshShell();
FileInfo LinkFile = new FileInfo(shortCutPathFile);
if (LinkFile.Exists)
{
IWshShortcut link = (IWshShortcut)shell.CreateShortcut(LinkFile.FullName);
string targetPath = link.TargetPath;
link.TargetPath = newTargetPathFile;
link.Description = "Start App";
link.Save();
}
}