37 lines
831 B
C#
37 lines
831 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Test_Verknüpfung
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void buttonCreateLink_Click(object sender, EventArgs e)
|
|
{
|
|
CreateShortcut();
|
|
}
|
|
|
|
private string CreateShortcut()
|
|
{
|
|
string text = "Test";
|
|
string source = "C:\\Users\\001142709\\Desktop\\Test.txt";
|
|
string path = "C:\\Users\\001142709\\Desktop";
|
|
|
|
Shortcut.Create(text, source, path);
|
|
|
|
return String.Concat(path, text, ".lnk");
|
|
}
|
|
}
|
|
}
|