Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to use environment variable in my .lnk file so that my .lnk file and their associated icons can be portable across different Windows machines. It almost works but there is an uncomfortable point: When I double click a lnk file to launch the shortcut(a CMD window), the CMD window does not recognize my assigned icon with env-var expansion in it path, for example:


See my screen shot below:

enter image description here

Any way to cope with this problem?

share|improve this question
I don't think it is possible to set the icon on a cmd.exe window. – d3dave Jun 7 '14 at 9:40
It sure can if I assign absolute dir c:\chj instead of %CHJDIR% . – Jimm Chen Jun 8 '14 at 15:50

You must log in to answer this question.

Browse other questions tagged .