Syntax error


Recommended Posts

Bruinator

I am trying to run a .bat file to start both hotspot shield and qbittorrent but i have the syntax wrong. Can someone plz help me out. This is what I have:

 

@echo

cd "C:\Programdata\microsoft\windows\start menu\programs"

Start hotspotshield.exe

 

What am I doing wrong plz?

 

TIA

Link to post
Share on other sites
Nick H.

I can't be certain, but taking a quick look at a Windows laptop next to me I can't find the Windows\Start Menu through the path you've specified. Why are you going through the start menu shortcut, anyway? Point to the .exe itself rather than the Start Menu's shortcut. Look for the .exe file under either Program Files or Program Files (x86).

 

EDIT: Also (but I could be wrong) you need to specify if echo is off or on. I would assume you want it turned off (@echo off).

  • Thanks 2
Link to post
Share on other sites
SnoopZ
18 minutes ago, Nick H. said:

I can't find the Windows\Start Menu through the path you've specified

Works fine for me.

Link to post
Share on other sites
+jnelsoninjax
On 7/25/2020 at 11:45 AM, Bruinator said:

I am trying to run a .bat file to start both hotspot shield and qbittorrent but i have the syntax wrong. Can someone plz help me out. This is what I have:

 

@echo

cd "C:\Programdata\microsoft\windows\start menu\programs"

Start hotspotshield.exe

 

What am I doing wrong plz?

 

TIA

batch file should look like this:


@echo off
C:\Program Files (x86)\TeamViewer\teamviewer.exe

You don't need the start command, and I tried to navigate with explorer to start menu\programs and windows would not let me in, it is a protected area. That is why you need to launch it from program files (x86) or program files. Also the @echo off is really not needed, that simply tells the file to not display what it is doing on the screen, and considering it will be going fast, you would not need it!

 

  • Thanks 1
Link to post
Share on other sites
Bruinator

Thx , i found the issue yesterday afternoon. Sorry about not saying so. It was the wrong path. Thx guys.

  • Facepalm 1
Link to post
Share on other sites
+jnelsoninjax
Just now, Bruinator said:

Thx , i found the issue yesterday afternoon. Sorry about not saying so. It was the wrong path. Thx guys.

That makes all the difference! :)

  • Haha 2
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.