やじゅ@アプリケーション・ラボ わんくま支局

目次

Blog 利用状況

ニュース

プロフィール

MSMVP

相対パスのショートカット生成ツール

これは、Visual Basic Advent Calendar 2015の23日目の記事です。
22日目の記事はmasaru_b_cさんの「oo4oを倒した話」でした。


お仕事で、お客様のサーバーの共有フォルダにシステム導入用ファイル群を置いた際、分かりやすいように実行ファイルのショートカットを作成しておいたのです。
次の日の通勤中の車の中で、システム導入用ファイル群はローカルフォルダにコピーしてから使用するので、ショートカットでは絶対パスになっているから意味がないことに気がついたのです。出社するやいなや、ショートカットを実行しないように連絡しました。

そもそも相対パスのショートカットって出来るのかと、早速ネットで検索し「ショートカットで指定するパスを相対パスで指定する方法」を見つけました。
中身は下記となります。
[Windows Script Programming]ショートカットに相対パスを指定する。(その2)
%windir%\system32\rundll32.exe url.dll,FileProtocolHandler "相対パス"
引数を指定する場合
%windir%\system32\cmd.exe /c start "%cd%" "相対パス" [引数...]
[Windows Script Programming]ショートカットに相対パスを指定する。(その3)
作業フォルダーは空白にする。

これならば、絶対パスのショートカットをドラッグ&ドロップしたら、相対パスのショートカットにするツールをWSH(VBScript)で作成すれば便利かも知れないと思って作り始めました。

ここで作成したツールを公開する予定でいたのですが、残念ながら間に合いませんでした。
よって後日、
作成したらソース公開とツールの使用方法を追記します。


【追記 2016/08/20】
【WSH】相対パスのショートカット生成ツール

投稿日時 : 2015年12月23日 23:11

コメントを追加

# What a information of un-ambiguity and preserveness of valuable experience regarding unexpected emotions. 2019/05/02 18:13 What a information of un-ambiguity and preservenes

What a information of un-ambiguity and preserveness of valuable experience regarding unexpected emotions.

# Hi! Do you know if they make any plugins to help with Search Engine Optimization? I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very good gains. If you know of any please share. Many thanks! 2019/05/10 6:00 Hi! Do you know if they make any plugins to help w

Hi! Do you know if they make any plugins to help with Search Engine Optimization? I'm trying to get
my blog to rank for some targeted keywords but I'm not seeing very good
gains. If you know of any please share. Many thanks!

# You ought to be a part of a contest for one of the greatest sites online. I am going to recommend this blog! 2019/05/11 4:53 You ought to be a part of a contest for one of the

You ought to be a part of a contest for one of the greatest sites online.
I am going to recommend this blog!

# Wonderful post however I was wanting to know if you could write a litte more on this topic? I'd be very thankful if you could elaborate a little bit further. Appreciate it! 2019/05/13 1:04 Wonderful post however I was wanting to know if yo

Wonderful post however I was wanting to
know if you could write a litte more on this topic? I'd be very thankful if you could elaborate a
little bit further. Appreciate it!

# Remarkable! Its really remarkable piece of writing, I have got much clear idea regarding from this paragraph. 2019/05/13 22:21 Remarkable! Its really remarkable piece of writing

Remarkable! Its really remarkable piece of writing, I have got much
clear idea regarding from this paragraph.

# Wow, amazing weblog structure! How long have you ever been blogging for? you make running a blog look easy. The full look of your website is magnificent, let alone the content material! 2019/06/03 22:18 Wow, amazing weblog structure! How long have you e

Wow, amazing weblog structure! How long have you
ever been blogging for? you make running a blog look easy.
The full look of your website is magnificent, let alone the content material!

# Amazing issues here. I am very happy to look your article. Thanks a lot and I am looking forward to touch you. Will you kindly drop me a e-mail? 2019/06/05 1:49 Amazing issues here. I am very happy to look your

Amazing issues here. I am very happy to look your
article. Thanks a lot and I am looking forward to touch you.
Will you kindly drop me a e-mail?

# Usually I do not read post on blogs, but I would like to say that this write-up very compelled me to try and do so! Your writing style has been surprised me. Thanks, very great article. 2019/06/07 3:57 Usually I do not read post on blogs, but I would

Usually I do not read post on blogs, but I would like to say that this write-up very compelled me to
try and do so! Your writing style has been surprised me.
Thanks, very great article.

# Wonderful article! We will be linking to this particularly great content on our website. Keep up the great writing. 2019/06/08 14:22 Wonderful article! We will be linking to this part

Wonderful article! We will be linking to this particularly great content on our website.
Keep up the great writing.

# Hi, i think that i saw you visited my web site so i came to “return the favor”.I am trying to find things to enhance my website!I suppose its ok to use a few of your ideas!! 2019/06/12 9:19 Hi, i think that i saw you visited my web site so

Hi, i think that i saw you visited my web
site so i came to “return the favor”.I am trying
to find things to enhance my website!I suppose its ok to use
a few of your ideas!!

# Hello, after reading this remarkable paragraph i am as well happy to share my familiarity here with colleagues. 2019/07/31 21:10 Hello, after reading this remarkable paragraph i a

Hello, after reading this remarkable paragraph i am as well happy to share my familiarity here with colleagues.

# Hello, after reading this remarkable paragraph i am as well happy to share my familiarity here with colleagues. 2019/07/31 21:11 Hello, after reading this remarkable paragraph i a

Hello, after reading this remarkable paragraph i am as well happy to share my familiarity here with colleagues.

# Hello, after reading this remarkable paragraph i am as well happy to share my familiarity here with colleagues. 2019/07/31 21:12 Hello, after reading this remarkable paragraph i a

Hello, after reading this remarkable paragraph i am as well happy to share my familiarity here with colleagues.

# Hello, after reading this remarkable paragraph i am as well happy to share my familiarity here with colleagues. 2019/07/31 21:13 Hello, after reading this remarkable paragraph i a

Hello, after reading this remarkable paragraph i am as well happy to share my familiarity here with colleagues.

# What's up, yeah this article is in fact fastidious and I have learned lot of things from it on the topic of blogging. thanks. 2019/10/08 23:54 What's up, yeah this article is in fact fastidious

What's up, yeah this article is in fact fastidious and
I have learned lot of things from it on the topic of blogging.
thanks.

タイトル  
名前  
URL
コメント