Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Administration > How do I make a shortcut run an program in "current directory"

Reply
Thread Tools Display Modes

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

 
 
Baboon
Guest
Posts: n/a

 
      10-25-2007
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.
 
Reply With Quote
 
 
 
 
P. Di Stolfo
Guest
Posts: n/a

 
      10-25-2007
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
--
////////////////////////////
http://blog.lysorp.com - Small Windows blog in German language
///////////////////////////

"Baboon" <> schrieb im Newsbeitrag
news:A2B0A861-CBFA-4C14-AAC3-...
> 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.


 
Reply With Quote
 
Alex XIe [MSFT]
Guest
Posts: n/a

 
      10-25-2007
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?= <>
| 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: <A2B0A861-CBFA-4C14-AAC3->
| 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_acco unts_passwords
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.administration_acco unts_passwords:6281
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG:
microsoft.public.windows.vista.administration_acco unts_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.
|

 
Reply With Quote
 
Baboon
Guest
Posts: n/a

 
      10-25-2007
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.

"P. Di Stolfo" wrote:

> 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
> --
> ////////////////////////////
> http://blog.lysorp.com - Small Windows blog in German language
> ///////////////////////////
>
> "Baboon" <> schrieb im Newsbeitrag
> news:A2B0A861-CBFA-4C14-AAC3-...
> > 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.

>
>

 
Reply With Quote
 
Baboon
Guest
Posts: n/a

 
      10-25-2007
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?= <>
> | 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: <A2B0A861-CBFA-4C14-AAC3->
> | 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_acco unts_passwords
> | Path: TK2MSFTNGHUB02.phx.gbl
> | Xref: TK2MSFTNGHUB02.phx.gbl
> microsoft.public.windows.vista.administration_acco unts_passwords:6281
> | NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
> | X-Tomcat-NG:
> microsoft.public.windows.vista.administration_acco unts_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.
> |
>
>

 
Reply With Quote
 
Baboon
Guest
Posts: n/a

 
      10-26-2007
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?= <>
> > | 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: <A2B0A861-CBFA-4C14-AAC3->
> > | 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_acco unts_passwords
> > | Path: TK2MSFTNGHUB02.phx.gbl
> > | Xref: TK2MSFTNGHUB02.phx.gbl
> > microsoft.public.windows.vista.administration_acco unts_passwords:6281
> > | NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
> > | X-Tomcat-NG:
> > microsoft.public.windows.vista.administration_acco unts_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.
> > |
> >
> >

 
Reply With Quote
 
Alex Xie [MSFT]
Guest
Posts: n/a

 
      10-29-2007
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?= <>
| References: <A2B0A861-CBFA-4C14-AAC3->
<>
<03F8577B-D333-4BC5-88AA->
| 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: <0531C00D-0714-4B97-9B6F->
| 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_acco unts_passwords
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.administration_acco unts_passwords:6320
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG:
microsoft.public.windows.vista.administration_acco unts_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?= <>
| > > | 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: <A2B0A861-CBFA-4C14-AAC3->
| > > | 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_acco unts_passwords
| > > | Path: TK2MSFTNGHUB02.phx.gbl
| > > | Xref: TK2MSFTNGHUB02.phx.gbl
| > > microsoft.public.windows.vista.administration_acco unts_passwords:6281
| > > | NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| > > | X-Tomcat-NG:
| > > microsoft.public.windows.vista.administration_acco unts_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.
| > > |
| > >
| > >
|

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista & Office 2007 Error: "not been installed for the current user" vernonedavis@gmail.com Windows Vista General Discussion 52 04-19-2010 06:07 AM
Any way to make a shortcut to "show windows side by side"... David Windows Vista General Discussion 5 04-04-2008 02:37 PM
3xQ - "New Folder" button?, "- Shortcut" suffix, Preview bug? Julian Windows Vista File Management 7 06-26-2007 12:32 PM
"Program Files" directory problem - probably virtualisation issue cheater_ Windows Vista General Discussion 0 03-02-2007 12:46 PM
"Recently Opened Programs" list and "Search for program" fail Jelle Kooi Windows Vista Installation 0 02-13-2007 11:10 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59