Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
Create URL shortcut on Client desktop
my devel
Sep 17 2010 12:16 PM
4.9k
Reply
Hi there,
do you know how can i create shortcut with my desire picture on client desktop, currently I can create a shortcut on the desktop when the visitor click on the Button but it's created by the default icon, not my icon.
I google it and found this code, but as i mentioned it does not create my picture.
Thanks in advanced
using IWshRuntimeLibrary;
private void urlShortcutToDesktop(string linkName, string linkUrl)
{
string deskDir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
using (StreamWriter writer = new StreamWriter(deskDir + "\\" + linkName + ".url"))
{
writer.WriteLine("[InternetShortcut]");
writer.WriteLine("URL=" + linkUrl);
writer.Flush();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
urlShortcutToDesktop("Shortcut_Name", "http://www.yourdomian.com");
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Question for easier design instead of using if/then statements
Button's size with splitter movement