desktop-shortcut

How to use a button click event in c# to activate run a desktop shortcut to open a program

删除回忆录丶 提交于 2021-02-10 05:42:14
问题 I have many shortcuts on the desktop and some work on the newer windows store apps that reside in the windowsapps folder, that cannot be run by clicking the exe file. so I want to use a button in my c#.net winforms app so when I click on it, it is the same as if I double clicked the icon on the desktop. I do not know enough about shell execute to know if that can do it. Any help would be greatly appreciated 回答1: Have you tried System.Diagnostics.Process.Start(fullPath) in your button click

Inno Setup - How to change the icon of the shortcut of uninstaller without separate icon file?

这一生的挚爱 提交于 2021-02-07 10:30:13
问题 Is it possible to change the icon of the uninstaller shortcut in the Start menu without storing a separate icon file (to the app folder)? I see this: Using Resource Hacker for changing the icon after the build, but I cannot implement it. My code: [Icons] Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe} 回答1: An icon of a Windows shell shortcut can be set by an external icon file (what you do not want) or by the file the shortcut points to. So you have to modify the

Inno Setup - How to change the icon of the shortcut of uninstaller without separate icon file?

℡╲_俬逩灬. 提交于 2021-02-07 10:29:59
问题 Is it possible to change the icon of the uninstaller shortcut in the Start menu without storing a separate icon file (to the app folder)? I see this: Using Resource Hacker for changing the icon after the build, but I cannot implement it. My code: [Icons] Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe} 回答1: An icon of a Windows shell shortcut can be set by an external icon file (what you do not want) or by the file the shortcut points to. So you have to modify the

How to follow a symbolic/soft link in cmd or PowerShell?

痴心易碎 提交于 2020-02-02 12:31:10
问题 My searches have only shown me how to create symbolic links using mklink in cmd. I have seen some things saying to use readlink , but PowerShell and cmd don't know what readlink is, and cd obviously doesn't work. So how do I follow one? 回答1: For your question i made this batch file: mkdir truedir dir > truedir\fileone.txt mklink /d symdir truedir cd symdir dir And i have found no problem to get the content of the symblic link to a directory from command prompt. No problem also with powershell

How to create a shortcut of an app on a SPECIFIC launcher app?

喜你入骨 提交于 2020-01-25 10:54:28
问题 Background I already know how to put a shortcut to an app globally: Intent shortcutIntent=new Intent(); shortcutIntent.setComponent(new ComponentName(packageName,fullPathToActivity)); final Intent putShortCutIntent=new Intent(); putShortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT,shortcutIntent); //... <=preparing putShortcutIntent with some customizations (title, icon,...) putShortcutIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT"); context.sendBroadcast(putShortcutIntent

Wrong desktop shortcut icon on Windows 7 (Inno Setup)

孤人 提交于 2020-01-09 12:55:42
问题 I have created an installer with Inno Setup. The icon used for the desktop shortcut and start menu is embeded in the application executable. When the installer was initially created, I didn't have the final product icon from the design team. I used a temporary icon instead as I completed the installer. Everything worked as it should until I changed the icon for the final one. Now the desktop shortcut and start menu icons always display the old icon even though everywhere else the icon is

Wrong desktop shortcut icon on Windows 7 (Inno Setup)

混江龙づ霸主 提交于 2020-01-09 12:54:52
问题 I have created an installer with Inno Setup. The icon used for the desktop shortcut and start menu is embeded in the application executable. When the installer was initially created, I didn't have the final product icon from the design team. I used a temporary icon instead as I completed the installer. Everything worked as it should until I changed the icon for the final one. Now the desktop shortcut and start menu icons always display the old icon even though everywhere else the icon is

How to create a shortcut using PowerShell

微笑、不失礼 提交于 2020-01-08 17:06:25
问题 I want to create a shortcut with PowerShell for this executable: C:\Program Files (x86)\ColorPix\ColorPix.exe How can this be done? 回答1: I don't know any native cmdlet in powershell but you can use com object instead: $WshShell = New-Object -comObject WScript.Shell $Shortcut = $WshShell.CreateShortcut("$Home\Desktop\ColorPix.lnk") $Shortcut.TargetPath = "C:\Program Files (x86)\ColorPix\ColorPix.exe" $Shortcut.Save() you can create a powershell script save as set-shortcut.ps1 in your $pwd

How I can use Shell32.dll in Silverlight OOB

 ̄綄美尐妖づ 提交于 2020-01-05 05:50:50
问题 I'd like to get the target information from a shortcut file using my silverlight OOB app, so I'm going to make the following code to work in my silverlight OOB. It seems I have to used P/Invoke to use Shell32.dll, but I'm not sure how I can use Folder, FolderItem, and ShellLinkObject? Most references explain how I can use the functions in the .dll using P/invoke:( Please give me any comments or sample code/links:) public string GetShortcutTargetFile(string shortcutFilename) { string pathOnly