Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista - Batch-file not working: PATH-problem?

Reply
 
Old 09-09-2008   #1 (permalink)
DaniëlRie


 
 

Batch-file not working: PATH-problem?

Hello,

I wrote a Batch-file in order to use bluetooth with one click in stead of 2,
but recently it didn't work anymore.

Here is the Batch-file:
@echo off
start D:\bluetooth\BTTray.lnk
start D:\bluetooth\TosBtMng.lnk

I used .lnk-files, because I coulnd't find out how to insert spaces in a
Batch-file (like Program Files: it reads Program and the Files it ignores, so
it can't find the path. Later I found out that it could be solved by putting
the complete path between"").

The problem is:
when I run the Batch-file it opens cmd, but then just shows the path of
where the Batch-file is located: when copy the file to the C; I just get path
C: in cmd. When I use it in path D:\bluetooth it just shows that path as
starting point in Cmd.

Before it would run the files and Bluetooth would function afterwards: now:
nothing.

I did install Java SDK and had to ad the Bin-folder of Java to the PATH in
the System Variables under Environment Variables. At first I just cleared the
PATH and had only the path of the Java-bin-folder. Later I found out I had
done something wrong, so I added severall paths as shown below.

My PATH is now:
C:\windows\system32;C:\windows;C:\Windows\System32\Wbem;C:\program
files\java\jdk1.6.0_10\bin
In the user Variables there is no PATH.

Does anyone know the answer? I know it's not a major problem, but it bugs me
and keeps me "out of control".

My System SpecsSystem Spec
Old 09-09-2008   #2 (permalink)
Mark L. Ferguson


 
 

Re: Batch-file not working: PATH-problem?

@echo off
start "D:\bluetooth\BTTray.lnk" "D:\bluetooth\BTTray.lnk"
start "D:\bluetooth\TosBtMng.lnk" "D:\bluetooth\TosBtMng.lnk"

--
Please use the Communities guidelines when posting.
http://www.microsoft.com/wn3/locales...help_en-us.htm
Use the "Ratings" feature. It helps the new users.
Mark L. Ferguson MS-MVP
https://mvp.support.microsoft.com/profile/Mark.Ferguson

"DaniëlRie" <DaniëlRie@xxxxxx> wrote in message
news:8BB08669-4F93-496B-A587-8945A5E8C238@xxxxxx
Quote:

> Hello,
>
> I wrote a Batch-file in order to use bluetooth with one click in stead of
> 2,
> but recently it didn't work anymore.
>
> Here is the Batch-file:
> @echo off
> start D:\bluetooth\BTTray.lnk
> start D:\bluetooth\TosBtMng.lnk
>
> I used .lnk-files, because I coulnd't find out how to insert spaces in a
> Batch-file (like Program Files: it reads Program and the Files it ignores,
> so
> it can't find the path. Later I found out that it could be solved by
> putting
> the complete path between"").
>
> The problem is:
> when I run the Batch-file it opens cmd, but then just shows the path of
> where the Batch-file is located: when copy the file to the C; I just get
> path
> C: in cmd. When I use it in path D:\bluetooth it just shows that path as
> starting point in Cmd.
>
> Before it would run the files and Bluetooth would function afterwards:
> now:
> nothing.
>
> I did install Java SDK and had to ad the Bin-folder of Java to the PATH in
> the System Variables under Environment Variables. At first I just cleared
> the
> PATH and had only the path of the Java-bin-folder. Later I found out I had
> done something wrong, so I added severall paths as shown below.
>
> My PATH is now:
> C:\windows\system32;C:\windows;C:\Windows\System32\Wbem;C:\program
> files\java\jdk1.6.0_10\bin
> In the user Variables there is no PATH.
>
> Does anyone know the answer? I know it's not a major problem, but it bugs
> me
> and keeps me "out of control".
My System SpecsSystem Spec
Old 09-10-2008   #3 (permalink)
DanielRie


 
 

Re: Batch-file not working: PATH-problem?

I'm affraid the problem still remains: when I open the batch-file it just
opens Cmd and dispays thepath from where I opened it. Nothing more.


"Mark L. Ferguson" wrote:
Quote:

> @echo off
> start "D:\bluetooth\BTTray.lnk" "D:\bluetooth\BTTray.lnk"
> start "D:\bluetooth\TosBtMng.lnk" "D:\bluetooth\TosBtMng.lnk"
>
> --
> Please use the Communities guidelines when posting.
> http://www.microsoft.com/wn3/locales...help_en-us.htm
> Use the "Ratings" feature. It helps the new users.
> Mark L. Ferguson MS-MVP
> https://mvp.support.microsoft.com/profile/Mark.Ferguson
My System SpecsSystem Spec
Old 09-11-2008   #4 (permalink)
Synapse Syndrome


 
 

Re: Batch-file not working: PATH-problem?

"DanielRie" <DanielRie@xxxxxx> wrote in message
news:BBDC76A5-C582-4EE7-AE20-E7B86F8839C5@xxxxxx
Quote:

> I'm affraid the problem still remains: when I open the batch-file it just
> opens Cmd and dispays thepath from where I opened it. Nothing more.

What do you mean it displays the path where you opened it?
In the prompt> ?

Run the script without echo off and paste what it says here. Paste the
script too.

See if anybody can tell you the default PATH for Vista is. I do not have a
Vista machine to hand.

ss.


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Batch file problem VB Script
vista batch file problem Vista General
batch file calling exe file problem Vista security
Vista: Batch file cannot find path of exe Vista General
Vista: Batch file cannot find path of exe Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

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