Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have hundreds of shortcuts to websites where the target looks like this:

C:\Users\Herb\AppData\Local\Google\Chrome\Application\chrome.exe www.somesite.com/foo

I just upgraded to Windows 8, and the Chrome executable is now stored in Program Files; so to get these shortcuts to work, I have to change them to this:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" www.somesite.com/foo

Is there any way I can automate this change? I'm a programmer but haven't done much with Windows scripting.

share|improve this question
Probably too late but making them simple links/URL files to "http://www.somesite.com/foo" would work much better in the future. – Deanna Oct 29 '12 at 13:28
Are these *.url files? – William Jackson Oct 29 '12 at 14:02
No, they're not *.url files. These are shortcuts that are invoked via the Run box using the technique described here bit.ly/WVE6hs . For some reason *.url files aren't picked up - you have to make a shortcut to a browser with the URL as a command-line parameter. – Herb Caudill Oct 29 '12 at 17:15

2 Answers

up vote 3 down vote accepted

Make

C:\Users\Herb\AppData\Local\Google

a directory junction which points to

C:\Program Files (x86)\Google

using Mklink, problem solved.

share|improve this answer
Perfect, thanks! Here's the command I ended up using: mklink /D "C:\Users\Herb\AppData\Local\Google\Chrome\Application" "C:\Program Files (x86)\Google\Chrome\Application" - works like a charm. – Herb Caudill Oct 29 '12 at 14:01
@HerbCaudill: Ah, a symlink, if that ever doesn't work try /J instead as that is more low-level. – Tom Wijsman Oct 29 '12 at 14:15

This should be possible with PowerShell in Windows 8. I found some info here and here. I'm no PowerShell expert, but as you are a programmer, I'm sure you could find a way (and maybe post it as answer here for others to see).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.