OK, heres my (sad) story: I installed one Program on Windows 7 (whitch name I will not mention, because its irrelevant in current story’s scope). I’ts otherwise a great program but it’s installer has a small bug. It’s a java program. Installer makes wrong assumption of java location according to directory where you will install the Program.
Ie. when you install destination is C:\Program Files\Program it assumes, JAVA location is C:\Program Files\jre.
If you install, say, D:\ Program Files\Program (whitch was exactly my case) it assumes that JAVA is located D:\Program Files\jre. And so on.
I installed Program to D:\ Program Files\Program but my JAVA was located in C:\Program Files\jre. So, the installer made all the shortcuts wrong. When I first started the program, I got “file not found” error (“The name specified in target box blah-blah-blah, is not valid, blah blah blah.”).
OK, one may think, this is such a small problem, let’s fix the shortcut and go on. Then the fun started.
I located the shortcut in start menu, [properties], fix path, OK, fire program and… “The name specified in target box blah-blah-blah, is not valid, blah blah blah.”
OK, maybe I missed something, [properties], it somehow shows D:\Program Files\jre again, like I hasn’t changed it second ago. Fix again, check full command line, check “working directory”. Everything points to right place. [OK]. Fire.
“The name specified in target box blah-blah-blah, is not valid, blah blah blah.”
#@$#$%! @#$#$%#!
OK, maybe something with permissions. [Properties], [Security]… “The name specified in target box blah-blah-blah, is not valid, blah blah blah.”
“Thank you, Captain Obvious, I already know that the path is wrong. #@$#$%! @#$#$%#!”
OK, fix path, [Apply], [Security]…
Generally, I spent good 20 minutes to messing with security, take ownership, break inheritance, remove all “suspicious” account (like SYSTEM) from permissions etc. etc. But no avail.
“The name specified in target box blah-blah-blah, is not valid, blah blah blah.”
One last try to get this #@$#$%! @#$#$%#! shortcut fixed: I started explorer process with “Run as Administrator” navigated to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Program and tried to fix it. I removed the goddamn shortcut temporarily from the folder, whitch, I tought, may be somehow “special” like Microsoft loves to do sometimes.
All to just get good ol’ “The name specified in target box blah-blah-blah, is not valid, blah blah blah.”
Finally I just deleted the bugger and re-created it right. Copied to the folder and Voila! Finally the Program works.
I wasted nearly 45 minutes and almost forgot what I needed the Program firsthand. Thank you, Microsoft.
For pure curiosity I tried to change the self-created shortcut path to something valid and… GUESS WHAT, I’t says that this procedure needs an Administrator rights and after pressing “yes” changed the shortcut successfully!!!
This rises some odd questions:
What’s so “special” in shortcut, when Installer creates it?
Why it’s so important that nobody can change it? Even Administrator?
And FINALLY
What the hell was in minds of those people, who designed this totally brain-dead approach to skip changes altogether without ANY feedback to user at all. No warning! No error! Just quietly drop the changes? Seriously, people out there in Redmond. What you were thinking?
P.S. Some time in my fight against that shortcut I also searched Windows 7 forums. Usually those are great help when you meet another Win 7 dumbness, but not this time. I found some SIMILAR cases, usually with the ProgramData directory involved, but not my exact case.