How do I make a shortcut run an program in "current directory"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi -

I have been asked to package something that will easily run a batch file to
be distributed to over a thousand end users potentially. This needs to run
on both XP and Vista. These are personally owned computers so we don't
manage them.

Without getting into detail, it involves a shortcut that needs to point to
the batch file in the same directory. From a KB article prior to Vista, I
understand that leaving the Start In field blank is supposed to make the
shortcut work on the current directory. In my testing I have found this to
be the case with XP, but not Vista. When I ran the exact same thing on
Vista, it tried to use the exact path in the Shortcut field and failed. From
what I can see, there is no way to enter just the name of the target
application with no path in the Target field.

If I use %UserProfile%\Desktop\<FolderName> in the Target field, this should
work, but this will force the user to follow specific instructions to unzip
the files to the Desktop by using the optional Browse button, rather than the
Upzip button. This is probably not acceptible since lots of people would
fail to follow the directions closely.

Does anyone know of a way I can get this to work in Vista?

Thanks.
 
Hello,

I tried as you said and created a batch in a folder, and a shortcut to the
batch. Then, I deleted the path from the "Start in" field. When I copied the
two files anywhere, it still started (even after deleting the original
files).
Have you tried this option already? Or do you mean something else?

Greetings,
P. Di Stolfo
 
Hi There,

Thank you for your post.

We are not sure about the exact scenario you're referring to. Please
describe it more explicitly.

Please let us know the following details.

1. Which KB article you are referring to? Please give me the ID of this
article.

2. When you double click the shortcut, the batch file will be run in the
directory where the shortcut locates instead of in the directory that is
specified in the Target line of the shortcut properties. Is this what you
want to achieve?

Thanks.

Sincerely,

Alex Xie
Microsoft Online Support Professional
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
================================================
When responding to posts, please "Reply to Group"
via your newsreader so that others may learn and benefit from your issue.
================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: How do I make a shortcut run an program in "current
directory"
| thread-index: AcgWuxhtxNJVboCCQM635G5+NSEBEg==
| X-WBNR-Posting-Host: 207.46.192.207
| From: =?Utf-8?B?QmFib29u?= <[email protected]>
| Subject: How do I make a shortcut run an program in "current directory"
| Date: Wed, 24 Oct 2007 20:57:00 -0700
| Lines: 25
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
| Newsgroups:
microsoft.public.windows.vista.administration_accounts_passwords
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.administration_accounts_passwords:6281
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG:
microsoft.public.windows.vista.administration_accounts_passwords
|
| Hi -
|
| I have been asked to package something that will easily run a batch file
to
| be distributed to over a thousand end users potentially. This needs to
run
| on both XP and Vista. These are personally owned computers so we don't
| manage them.
|
| Without getting into detail, it involves a shortcut that needs to point
to
| the batch file in the same directory. From a KB article prior to Vista,
I
| understand that leaving the Start In field blank is supposed to make the
| shortcut work on the current directory. In my testing I have found this
to
| be the case with XP, but not Vista. When I ran the exact same thing on
| Vista, it tried to use the exact path in the Shortcut field and failed.
From
| what I can see, there is no way to enter just the name of the target
| application with no path in the Target field.
|
| If I use %UserProfile%\Desktop\<FolderName> in the Target field, this
should
| work, but this will force the user to follow specific instructions to
unzip
| the files to the Desktop by using the optional Browse button, rather than
the
| Upzip button. This is probably not acceptible since lots of people would
| fail to follow the directions closely.
|
| Does anyone know of a way I can get this to work in Vista?
|
| Thanks.
|
 
Thanks very much for trying this.

Yes, you got it exactly correct. I just want to confirm that you tried this
on Vista. It sounds like you are certain that the files referenced in the
Target field no longer existed, so that shouldn't be a factor. (In testing I
apparently made the mistake of trying it on a machine that DID still have the
files referenced in the Target, which led me to falsely believe it was OK.)

If you are affirmative on those 2 points, then you have done exactly what I
did. In that case, I am really lost.
 
1. The article is KB283065. I want to stress that this article is correct
because it is for Windows XP and my problem only appears to happen in Vista.
Oddly, the previous poster did not seem to have the same problem as me when
he recreated my steps.

2. Yes, you are correctly understanding my objective, which is to force the
shortcut to ignore the Target field, and run the batch file that is in the
current directory.

Thanks!

"Alex XIe [MSFT]" said:
Hi There,

Thank you for your post.

We are not sure about the exact scenario you're referring to. Please
describe it more explicitly.

Please let us know the following details.

1. Which KB article you are referring to? Please give me the ID of this
article.

2. When you double click the shortcut, the batch file will be run in the
directory where the shortcut locates instead of in the directory that is
specified in the Target line of the shortcut properties. Is this what you
want to achieve?

Thanks.

Sincerely,

Alex Xie
Microsoft Online Support Professional
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
================================================
When responding to posts, please "Reply to Group"
via your newsreader so that others may learn and benefit from your issue.
================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: How do I make a shortcut run an program in "current
directory"
| thread-index: AcgWuxhtxNJVboCCQM635G5+NSEBEg==
| X-WBNR-Posting-Host: 207.46.192.207
| From: =?Utf-8?B?QmFib29u?= <[email protected]>
| Subject: How do I make a shortcut run an program in "current directory"
| Date: Wed, 24 Oct 2007 20:57:00 -0700
| Lines: 25
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
| Newsgroups:
microsoft.public.windows.vista.administration_accounts_passwords
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.administration_accounts_passwords:6281
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG:
microsoft.public.windows.vista.administration_accounts_passwords
|
| Hi -
|
| I have been asked to package something that will easily run a batch file
to
| be distributed to over a thousand end users potentially. This needs to
run
| on both XP and Vista. These are personally owned computers so we don't
| manage them.
|
| Without getting into detail, it involves a shortcut that needs to point
to
| the batch file in the same directory. From a KB article prior to Vista,
I
| understand that leaving the Start In field blank is supposed to make the
| shortcut work on the current directory. In my testing I have found this
to
| be the case with XP, but not Vista. When I ran the exact same thing on
| Vista, it tried to use the exact path in the Shortcut field and failed.
From
| what I can see, there is no way to enter just the name of the target
| application with no path in the Target field.
|
| If I use %UserProfile%\Desktop\<FolderName> in the Target field, this
should
| work, but this will force the user to follow specific instructions to
unzip
| the files to the Desktop by using the optional Browse button, rather than
the
| Upzip button. This is probably not acceptible since lots of people would
| fail to follow the directions closely.
|
| Does anyone know of a way I can get this to work in Vista?
|
| Thanks.
|
 
I found a better solution than using a shortcut.....
I got Quick Batch File Compiler:
http://www.abyssmedia.com/quickbfc/
It very easily converts a batch file to an exe and lets me choose a custom
icon for it.

This works out much better because it completely eliminates the shortcut.
Not only does that make things much easier for me, but the end user will only
see "Setup" and not "BatchFile.bat" along with "Setup".


Baboon said:
1. The article is KB283065. I want to stress that this article is correct
because it is for Windows XP and my problem only appears to happen in Vista.
Oddly, the previous poster did not seem to have the same problem as me when
he recreated my steps.

2. Yes, you are correctly understanding my objective, which is to force the
shortcut to ignore the Target field, and run the batch file that is in the
current directory.

Thanks!

"Alex XIe [MSFT]" said:
Hi There,

Thank you for your post.

We are not sure about the exact scenario you're referring to. Please
describe it more explicitly.

Please let us know the following details.

1. Which KB article you are referring to? Please give me the ID of this
article.

2. When you double click the shortcut, the batch file will be run in the
directory where the shortcut locates instead of in the directory that is
specified in the Target line of the shortcut properties. Is this what you
want to achieve?

Thanks.

Sincerely,

Alex Xie
Microsoft Online Support Professional
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
================================================
When responding to posts, please "Reply to Group"
via your newsreader so that others may learn and benefit from your issue.
================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: How do I make a shortcut run an program in "current
directory"
| thread-index: AcgWuxhtxNJVboCCQM635G5+NSEBEg==
| X-WBNR-Posting-Host: 207.46.192.207
| From: =?Utf-8?B?QmFib29u?= <[email protected]>
| Subject: How do I make a shortcut run an program in "current directory"
| Date: Wed, 24 Oct 2007 20:57:00 -0700
| Lines: 25
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
| Newsgroups:
microsoft.public.windows.vista.administration_accounts_passwords
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.administration_accounts_passwords:6281
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG:
microsoft.public.windows.vista.administration_accounts_passwords
|
| Hi -
|
| I have been asked to package something that will easily run a batch file
to
| be distributed to over a thousand end users potentially. This needs to
run
| on both XP and Vista. These are personally owned computers so we don't
| manage them.
|
| Without getting into detail, it involves a shortcut that needs to point
to
| the batch file in the same directory. From a KB article prior to Vista,
I
| understand that leaving the Start In field blank is supposed to make the
| shortcut work on the current directory. In my testing I have found this
to
| be the case with XP, but not Vista. When I ran the exact same thing on
| Vista, it tried to use the exact path in the Shortcut field and failed.
From
| what I can see, there is no way to enter just the name of the target
| application with no path in the Target field.
|
| If I use %UserProfile%\Desktop\<FolderName> in the Target field, this
should
| work, but this will force the user to follow specific instructions to
unzip
| the files to the Desktop by using the optional Browse button, rather than
the
| Upzip button. This is probably not acceptible since lots of people would
| fail to follow the directions closely.
|
| Does anyone know of a way I can get this to work in Vista?
|
| Thanks.
|
 
Hi Baboon,

I'm glad to learn that you have found a better solution.

Here I'd like to appreciate your efforts and time put into this issue. If
you have any other questions or concerns in the future, please feel free to
post here.

Have a nice day!

Sincerely,

Alex Xie
Microsoft Online Support Professional
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
================================================
When responding to posts, please "Reply to Group"
via your newsreader so that others may learn and benefit from your issue.
================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: How do I make a shortcut run an program in "current
directory"
| thread-index: AcgYF+x06NFXjSV/S7eQF88MLtJEUA==
| X-WBNR-Posting-Host: 207.46.19.197
| From: =?Utf-8?B?QmFib29u?= <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: How do I make a shortcut run an program in "current
directory"
| Date: Fri, 26 Oct 2007 14:34:01 -0700
| Lines: 123
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
| Newsgroups:
microsoft.public.windows.vista.administration_accounts_passwords
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.administration_accounts_passwords:6320
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG:
microsoft.public.windows.vista.administration_accounts_passwords
|
| I found a better solution than using a shortcut.....
| I got Quick Batch File Compiler:
| http://www.abyssmedia.com/quickbfc/
| It very easily converts a batch file to an exe and lets me choose a
custom
| icon for it.
|
| This works out much better because it completely eliminates the shortcut.

| Not only does that make things much easier for me, but the end user will
only
| see "Setup" and not "BatchFile.bat" along with "Setup".
|
|
| "Baboon" wrote:
|
| > 1. The article is KB283065. I want to stress that this article is
correct
| > because it is for Windows XP and my problem only appears to happen in
Vista.
| > Oddly, the previous poster did not seem to have the same problem as me
when
| > he recreated my steps.
| >
| > 2. Yes, you are correctly understanding my objective, which is to force
the
| > shortcut to ignore the Target field, and run the batch file that is in
the
| > current directory.
| >
| > Thanks!
| >
| > ""Alex XIe [MSFT]"" wrote:
| >
| > > Hi There,
| > >
| > > Thank you for your post.
| > >
| > > We are not sure about the exact scenario you're referring to. Please
| > > describe it more explicitly.
| > >
| > > Please let us know the following details.
| > >
| > > 1. Which KB article you are referring to? Please give me the ID of
this
| > > article.
| > >
| > > 2. When you double click the shortcut, the batch file will be run in
the
| > > directory where the shortcut locates instead of in the directory that
is
| > > specified in the Target line of the shortcut properties. Is this what
you
| > > want to achieve?
| > >
| > > Thanks.
| > >
| > > Sincerely,
| > >
| > > Alex Xie
| > > Microsoft Online Support Professional
| > > Microsoft Global Technical Support Center
| > >
| > > Get Secure! - www.microsoft.com/security
| > > ================================================
| > > When responding to posts, please "Reply to Group"
| > > via your newsreader so that others may learn and benefit from your
issue.
| > > ================================================
| > > This posting is provided "AS IS" with no warranties, and confers no
rights.
| > >
| > > --------------------
| > > | Thread-Topic: How do I make a shortcut run an program in "current
| > > directory"
| > > | thread-index: AcgWuxhtxNJVboCCQM635G5+NSEBEg==
| > > | X-WBNR-Posting-Host: 207.46.192.207
| > > | From: =?Utf-8?B?QmFib29u?= <[email protected]>
| > > | Subject: How do I make a shortcut run an program in "current
directory"
| > > | Date: Wed, 24 Oct 2007 20:57:00 -0700
| > > | Lines: 25
| > > | Message-ID: <[email protected]>
| > > | MIME-Version: 1.0
| > > | Content-Type: text/plain;
| > > | charset="Utf-8"
| > > | Content-Transfer-Encoding: 7bit
| > > | X-Newsreader: Microsoft CDO for Windows 2000
| > > | Content-Class: urn:content-classes:message
| > > | Importance: normal
| > > | Priority: normal
| > > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
| > > | Newsgroups:
| > > microsoft.public.windows.vista.administration_accounts_passwords
| > > | Path: TK2MSFTNGHUB02.phx.gbl
| > > | Xref: TK2MSFTNGHUB02.phx.gbl
| > > microsoft.public.windows.vista.administration_accounts_passwords:6281
| > > | NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| > > | X-Tomcat-NG:
| > > microsoft.public.windows.vista.administration_accounts_passwords
| > > |
| > > | Hi -
| > > |
| > > | I have been asked to package something that will easily run a batch
file
| > > to
| > > | be distributed to over a thousand end users potentially. This
needs to
| > > run
| > > | on both XP and Vista. These are personally owned computers so we
don't
| > > | manage them.
| > > |
| > > | Without getting into detail, it involves a shortcut that needs to
point
| > > to
| > > | the batch file in the same directory. From a KB article prior to
Vista,
| > > I
| > > | understand that leaving the Start In field blank is supposed to
make the
| > > | shortcut work on the current directory. In my testing I have found
this
| > > to
| > > | be the case with XP, but not Vista. When I ran the exact same
thing on
| > > | Vista, it tried to use the exact path in the Shortcut field and
failed.
| > > From
| > > | what I can see, there is no way to enter just the name of the
target
| > > | application with no path in the Target field.
| > > |
| > > | If I use %UserProfile%\Desktop\<FolderName> in the Target field,
this
| > > should
| > > | work, but this will force the user to follow specific instructions
to
| > > unzip
| > > | the files to the Desktop by using the optional Browse button,
rather than
| > > the
| > > | Upzip button. This is probably not acceptible since lots of people
would
| > > | fail to follow the directions closely.
| > > |
| > > | Does anyone know of a way I can get this to work in Vista?
| > > |
| > > | Thanks.
| > > |
| > >
| > >
|
 
Back
Top