/    Sign up×
Community /Pin to ProfileBookmark

%systemdrive% in a shortcut oddity

Assume I have an html file in the root drive.

If I want to make a shortcut load the file regardless of knowing the user’s System Drive (C, D or E etc.), I can write the target like this:

[CODE]“%SYSTEMDRIVE%myfile.html”[/CODE]

…and it works.

If I want to make a shortcut load the html file in IE only, I can do it like this:

[CODE]%PROGRAMFILES%Internet Exploreriexplore.exe” “C:myfile.html”[/CODE]

…and it also works.

But if I combine the two ideas, it fails. Why is this?

[CODE]%PROGRAMFILES%Internet Exploreriexplore.exe” “%SYSTEMDRIVE%myfile.html”[/CODE]

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@tpeckauthorJan 13.2010 — Mmm. Weirder. It doesn't fail now. But it did before many times. So closing IE and reopening might have done the trick.

Sorry.
Copy linkTweet thisAlerts:
@tpeckauthorJan 13.2010 — This is getting beyond a joke! If I double click the shortcut it fails. If I right-click and OPEN it loads.

I thought those two actions were identical.
×

Success!

Help @tpeck spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...