• XSS.stack #1 – первый литературный журнал от юзеров форума

Мануал/Книга Editting a .lnk file using c#

NIGHTHAWK

floppy-диск
Пользователь
Регистрация
09.02.2022
Сообщения
2
Реакции
2
C#:
using IWshRuntimeLibrary;

string filePath = @"C:\Users\UserName\Desktop\Shortcut.lnk";

WshShell shell = new WshShell();
IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(filePath);

shortcut.TargetPath = @"C:\Windows\System32\notepad.exe";
shortcut.Description = "My shortcut description";
shortcut.IconLocation = @"C:\Windows\System32\notepad.exe, 0";
shortcut.Save();
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх