TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
my devel
NA
89
0
Create URL shortcut on Client desktop
Sep 17 2010 12:16 PM
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");
}
Reply
Answers (
0
)
Question for easier design instead of using if/then statements
Button's size with splitter movement