Hello again.
I have another problem =).
I need to change the 1.lnk "pointing" path, i can get it with the following code :
string path = @"c:\1.lnk";
FileInfo fi = new FileInfo(@path);
if (fi.FullName.EndsWith("lnk"))
{
IWshShell shell = new WshShell();
var lnk = shell.CreateShortcut(fi.FullName) as IWshShortcut;
if (lnk != null)
{
textBox1.Text = lnk.FullName;
}
}
But when i try to do the next :
IWshShell shell = new WshShell();
FileInfo fi = new FileInfo(@fixme);
var lnk = shell.CreateShortcut(fi.FullName) as IWshShortcut;
lnk.FullName = "c:\1.exe";
The compiler gives me the next error : Property or indexer 'IWshRuntimeLibrary.IWshShortcut.FullName' cannot be assigned to -- it is read only .
So how can i write to it ?
Thanks in advance.