Questions tagged [shortcut-file]

For questions about programmatically creating, dereferencing, or otherwise interacting with shortcut files (*.lnk and/or *.url) on Windows.

Shortcut files are often called simply "shortcuts" and are also known as "shell links".

See: https://en.wikipedia.org/wiki/Shortcut_(computing)

243 questions
128
votes
2 answers

How to create a shortcut using PowerShell

I want to create a shortcut with PowerShell for this executable: C:\Program Files (x86)\ColorPix\ColorPix.exe How can this be done?
cethint
  • 2,231
  • 8
  • 28
  • 31
40
votes
3 answers

Desktop shortcut to restart a windows service

Is it possible to create a windows desktop shortcut that will restart a windows service? I'd like a button to restart my apache service after I have made changes to the config file.
Jon Winstanley
  • 23,010
  • 22
  • 73
  • 116
33
votes
2 answers

How to create a Run As Administrator shortcut using Powershell

In my PowerShell script, I create a shortcut to a .exe (using something similar to the answer from this question): $WshShell = New-Object -comObject WScript.Shell $Shortcut =…
Michelle
  • 663
  • 1
  • 8
  • 17
25
votes
5 answers

WiX 3 driving me crazy - trying to create desktop shortcut

I have an app that is being installed with WiX 3 - most of the install works fine by now, but trying to get the desktop shortcut to work seems to cost me my mind... I have my app being installed and I already have a shortcut on the Start Menu folder…
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
23
votes
1 answer

How to remove a desktop shortcut by Innosetup

How can I remove a desktop shortcut by Innosetup? It's created by previous version and not needed anymore. I tried delete it in [InstallDelete] [InstallDelete] Type: files; Name: {userdesktop}\Shortcut Name and delete the file in "ssInstall" of…
trudger
  • 917
  • 2
  • 12
  • 20
22
votes
3 answers

Wrong desktop shortcut icon on Windows 7 (Inno Setup)

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…
swirlywonder
  • 531
  • 1
  • 4
  • 11
17
votes
1 answer

PowerShell: Using $env:userprofile in an 'IF' statement

I am using PowerShell ISE (I think 4). I am writing logon scripts to replace the old '*.BAT' files. I am trying to test for a user-profile condition before 'creating/deleting' certain directories from the desktop. Example If(($env:userprofile =…
banditFox
  • 173
  • 1
  • 1
  • 5
17
votes
6 answers

How to define the website screen shortcut icon?

I can't find how to make Android use a custom icon (e.g. the favicon or the app-touch image that iOS uses) for a website shortcut. Can you give me a hint?
Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378
16
votes
4 answers

Setting correct icon for Shortcut in VS2010 Setup Project

I have a small app with a setup project. If I create a shortcut to my Primary Output, then this gets a standard Win7 icon and not the icon specified in my exe's Application Icon? Whats the best way to make sure my desktop shortcut icon is the same…
BlueChippy
  • 5,935
  • 16
  • 81
  • 131
11
votes
1 answer

Can I Create Chrome Application Shortcuts Programmatically from a Web Page?

I've thought about using Chrome and HTML5 local storage to create a useful app and sell it. The problem I think I would have, however, is the delivery mechanism to get this installed on one's computer. Let's say the app was wikipedia.com (although…
Volomike
  • 23,743
  • 21
  • 113
  • 209
11
votes
1 answer

WiX Proper Creation of Desktop Shortcut

There are two answers on Create shortcut to desktop using WiX Both these answers lack any real explanation of what is going on. What is the difference between these two methods of creating shortcuts? The first method falls in line with WiX - Create…
teynon
  • 7,540
  • 10
  • 63
  • 106
10
votes
3 answers

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

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?
Deoxal
  • 226
  • 1
  • 2
  • 9
9
votes
9 answers

Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)

I have an application written using VS2005 in C# targeting the Compact Framework 2.0 SP2. As part of the solution, I have CAB deploy project which deploys to the device without a problem. What I can't do is create a shortcut to my application on the…
Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
8
votes
1 answer

.bashrc not read when shell script is invoked from desktop shortcut

I have a simple problem understanding a behavior in linux. In short, on linux if i invoke my sh script from a 'Desktop Shortcut' then the script cannot see the latest environment variables (set in bashrc). So i was wondering that in what scope is…
Abhishek
  • 243
  • 5
  • 11
8
votes
2 answers

How to create MyEclipse shortcuts to open multiple workspaces ?

I have two different MyEclipse workspaces containing a different set of project. I was hoping to avoid having to switch between the two by creating shortcuts which directly open the workspaces. Is this possible ?
Soumyaansh
  • 8,626
  • 7
  • 45
  • 45
1
2 3
16 17