Is there a working code that does this ? I found few examples but they don't seem to work . I'd prefer not to use any COM Interop .
Thanks
Printable View
Is there a working code that does this ? I found few examples but they don't seem to work . I'd prefer not to use any COM Interop .
Thanks
Got it !
It would be nice if you could post the code, for future searchers!
For future reference a .url file is just an ini file
Code:[InternetShortcut]
URL=http://www.vbforums.com
Sure , it's easy like this :
Code:private string ParseURL (string URLFile)
{
string url="";
if (File.Exists(URLFile))
{
StreamReader sr=new StreamReader(URLFile);
while (sr.Peek() != -1)
{
if (sr.ReadLine().StartsWith("[InternetShortcut]"))
url=sr.ReadLine();
}
sr.Close();
}
return url;
}