SOLVED Write a .bat file.


Joined
Mar 7, 2020
Messages
186
Reaction score
20
Can any person oblige me in writing a .bat file to open an installed program, as to having to open it manually. This would be most appreciated.
 
Ad

Advertisements

Joined
Sep 26, 2017
Messages
2,264
Reaction score
439
That question applies to any version of Windows, not just the Insider Preview [testing, BETA] versions. But knowing what the program is will help in writing a .bat file that can open it, can be a simple file like a shortcut or complicated if parameters are required to accomplish the task.
 

Trouble

Noob Whisperer
Moderator
Joined
Nov 19, 2013
Messages
13,082
Reaction score
2,225
But knowing what the program is will help in writing a .bat file that can open it
As Bighorn says.... you'll need the program's executable name and likely the path where that executable is located.
For example either of the following two lines, written in notepad and saved as a .bat file (not as a .txt file) will both accomplish the same thing and open Microsoft Word if installed on your computer
Code:
START winword
AND
Code:
START C:\"Program Files\Microsoft Office\root\Office16\WINWORD.EXE"
 
Joined
Mar 7, 2020
Messages
186
Reaction score
20
Trouble, Bighorn, my sincere thanks for your responses. I will certainly try to furnish of what you require.

Start "C:\HP Phoenix Control\Hewlett Packard\HPPhoenixCtrl.exe\"

HP Computer front bezel is fitted with coloured LEDs, sequence controlled by software HPPhoenixCtrl. What I am trying to achieve is to cut out LEDs starting up when computer is switched on. Can this be achieved? with your help.
 

Trouble

Noob Whisperer
Moderator
Joined
Nov 19, 2013
Messages
13,082
Reaction score
2,225
What I am trying to achieve is to cut out LEDs starting up when computer is switched on.
Right click the taskbar and choose Task Manager
Select "Startup" tab from menu bar along the top
See if it is listed there and if so simply right click it and choose disable.

Otherwise, IF you don't like it at all just turn it OFF
 
Joined
Mar 7, 2020
Messages
186
Reaction score
20
Trouble, No mention of it in Task Manager. LED configuring is as always set to OFF and requires X top right to be clicked. What I am trying to achieve is or if possible to save having to click the X with each computer start up. Automatic as to presently manually.
 
Ad

Advertisements

Trouble

Noob Whisperer
Moderator
Joined
Nov 19, 2013
Messages
13,082
Reaction score
2,225
OK
It sounds to me like you have it configured to "OFF" and the LED lights are no longer a problem, but....
The Program itself is still running and you have to close it by click the close button "X top right"
I believe that the program is located either at
C:\Program Files (x86)\Hewlett-Packard\HPPhoenixctrl\HPPhoenixctrl
OR AT
C:\Program Files\Hewlett-Packard\HPPhoenixctrl\HPPhoenixctrl

I typically use a program called Autoruns

Grab that, unzip / extract it, run it as Administrator
See if you can locate that program and simply uncheck it (read over the intro and usage paragraphs in the link above) it helps to hide Microsoft signed entries as well as Windows Entries so you can focus on Third Party start-ups.
The "Image Path" column of the tool should help in your search using either of the two path statement above.
There may be multiple entries so look over all the entries carefully.
Restart to test and good luck.
 
Joined
Mar 7, 2020
Messages
186
Reaction score
20
Autoruns has been saved in computer for years, and found it could be very dangerous unless used with extreme care. In answer to your response, found no reference in any category.
 

Trouble

Noob Whisperer
Moderator
Joined
Nov 19, 2013
Messages
13,082
Reaction score
2,225
IF autoruns couldn't see it, I'm at a loss.
Perhaps it is running as a service?
Try this
Right click the start button and choose run from the context menu, and....
In the run dialog box type
services.msc
hit enter or click OK
See if you can spot it among the services listed.
IF so, you can either just disable it or set it to start manually rather than automatically.
Other than that the only other place I could think to look would be in the Task Scheduler and see if it is setup as a scheduled task.
 
Joined
Mar 7, 2020
Messages
186
Reaction score
20
Thanks, I will delete "\" from the .bat file as you suggest. Thanks.
 
Ad

Advertisements

Joined
Mar 7, 2020
Messages
186
Reaction score
20
Checked thoroughly through Autoruns entries, no reference can be located. Is a bat file a none starter?
 

Trouble

Noob Whisperer
Moderator
Joined
Nov 19, 2013
Messages
13,082
Reaction score
2,225
No...
It's not if I understand what you want to do and I'm not sure I do.
Your original post requested information on how to start a program using a batch file
Can any person oblige me in writing a .bat file to open an installed program, as to having to open it manually.
AND then or perhaps now it seems you want to close the program
LED configuring is as always set to OFF and requires X top right to be clicked. What I am trying to achieve is or if possible to save having to click the X with each computer start up.
What I am trying to achieve is to cut out LEDs starting up when computer is switched on.
Whichever is your goal
START
is the command for opening a program from a command line or batch file

TASKKILL /IM /F /T
is the command for closing a program from a command line or batch file.

All you need after either is the executable name
for instance the following two lines used in two seperate batch files will open and close the Google Chrome browser
Code:
start chrome.exe
Code:
TASKKILL /IM chrome.exe /F /T
the /IM is to designate the Image Name which is the commands way of understanding what you and I think of as an Executable
the /F mean to Force the process
the /T is to terminate any child tasks or objects that were spawn by the executable.

You can test them if you have Chrome installed in its' default location.
You will have to research and determine if you can get away with just the executable name or if you are going to need a path statement included.

IF it starts complaining that it can't find something, then that's an indication that you need more
 
Joined
Mar 7, 2020
Messages
186
Reaction score
20
Trouble, the program in question is located on the Taskbar with its Icon at the moment, clicking it starts up, by showing on screen. On clicking its X top right, it then closes off the LEDs lighting. That is what is required, but how can this be done without having to do this manually as described, but preferably automatically using .bat file. If this can be done.
 
Joined
Mar 7, 2020
Messages
186
Reaction score
20
I have never activated the Bios, unable to say as to reference to LEDs being made.
 
Ad

Advertisements

Joined
Feb 22, 2014
Messages
1,479
Reaction score
295
The system BIOS is a location where many different features can be enabled and disabled.
 
Joined
Mar 7, 2020
Messages
186
Reaction score
20
That is a new avenue for me, never entered this field and what I have heard can be most dangerous place to interfere with. Appears .bat is a non-starter, leaves me to continue controlling LED as now manually.
 
Joined
Sep 26, 2017
Messages
2,264
Reaction score
439
To explain a bit about the BIOS, it stands for Basic Input Output System. It is the first thing that starts when turning on the computer then any Operating System [Windows, Linux, etc.] reads it's setup so as to know what it has to work with mostly in terms of the hardware resources available and what User settings are in use. The BIOS is stored on a CMOS/Complementary Metal Oxide Semiconductor chip on the motherboard and retained by a small non-rechargeable battery on the board.
 
Ad

Advertisements

Joined
Mar 7, 2020
Messages
186
Reaction score
20
Very interesting, thank you. In my case, at switch on, clicking the F10 keyboard key enters into the BIOS. Checking its contents bar each in turn, fails to show reference to LED settings.
When starting this topic, hoped a solution could be found, now realise it requires a person who specialise solely in BAT file writing. As said already, will have just have to keeping on pressing the X key manually, as at least it does switch the LEDs off, or perhaps a more drastic way, open the computer inners and cut the LED supply wire. Most people now appear to like a computer having flashing LEDs, personally find them most distracting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top