Jump to content

How to create a desktop shortcut that runs a cmd line with some arguments or idk what are these but nothing is working

Go to solution Solved by Yohelpmedogimlost,

Everything good I used ICUE and made a Macro

Thanks

So I need to be able to press a shortcut and a cmd line should be executed But the line is:

C:\Program Files (x86)\Bluetooth Command Line Tools\bin>btcom -n "WH-1000XM3" -c -s110b

 

and any other answers are able to run only batch files or someting with /k and after that "my comments" but nothing works

So I need somehow to implement -n "WH-1000XM3" -c -s110b at the end and I have no idea of windows syntax

but the path has ...\bin>btcom at the end and no \ so that can be a problem

Anyway the folder bin has something in it but I cant use it to include in the path enter image description here

The command line works when using the "integrated" cmd box but it is used to type the commands

and I would like a shortcut on my desktop enter image description here

 

Any kind of help is welcome Thanks

Link to comment
Share on other sites

Link to post
Share on other sites

I don't fully understand your post but I assume you want to execute this line and have no cmd prompt appear? Heres what you want in your cmd batch script.

cd "C:\Program Files (x86)\Bluetooth Command Line Tools\bin"
start btcom -n "WH-1000XM3" -c -s110b 
Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Murasaki said:

I don't fully understand your post but I assume you want to execute this line and have no cmd prompt appear? Heres what you want in your cmd batch script.


cd "C:\Program Files (x86)\Bluetooth Command Line Tools\bin"
start btcom -n "WH-1000XM3" -c -s110b 

Thanks but should I paste it in notepad and save it as cmd or batch file?

I dont tinker with this normally, I have no idea

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Yohelpmedogimlost said:

Thanks but should I paste it in notepad and save it as cmd or batch file?

I dont tinker with this normally, I have no idea

Yeah you can save it in notepad as .cmd or .bat, doesn't matter. You can place the script anywhere you want.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Murasaki said:

Yeah you can save it in notepad as .cmd or .bat, doesn't matter. You can place the script anywhere you want.

So I think it opens something else and doesnt execute the line with success

image.png.604edcb644d860d622bc05c40d547c9e.png

 

When I open the thing manually it says something else on the top

image.png.876573c6e51ce7fc98cb157493d9d945.png

 

The manual cmd is located here so it might be useful

image.png.ec683e9e9fb14380a3b1c718606ad76e.png

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Yohelpmedogimlost said:

So I think it opens something else and doesnt execute the line with success

Change extension to .bat

As thats for batch files and .com is for binary text command files.

When i ask for more specs, don't expect me to know the answer!
I'm just helping YOU to help YOURSELF!
(The more info you give the easier it is for others to help you out!)

Not willing to capitulate to the ignorance of the masses!

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, HanZie82 said:

Change extension to .bat

As thats for batch files and .com is for binary text command files.

Yup that was .bat  and its not working

It opens the wrong thing and the line is for no use there 

Link to comment
Share on other sites

Link to post
Share on other sites

C:\Users\mariush>cmd /?
Starts a new instance of the Windows command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] string]

/C      Carries out the command specified by string and then terminates
/K      Carries out the command specified by string but remains
/S      Modifies the treatment of string after /C or /K (see below)
/Q      Turns echo off
/D      Disable execution of AutoRun commands from registry (see below)
/A      Causes the output of internal commands to a pipe or file to be ANSI
/U      Causes the output of internal commands to a pipe or file to be
        Unicode

So make a short to C:\Windows\System32\cmd.exe /C btcom -n "WH-1000XM3" -c -s110b

 and set the working folder, the folder where btcom is located after you configure the shortcut. In Windows 7, it's the Start in: text box, you can type there the path and it auto suggests so you won't make mistakes.

you can also set it to start minimized so it won't bother you and so on...

and from advanced you can set to run cmd as administrator which in turn will run that btcom as administrator if it requires administrative rights.

Again, may be a bit different under Windows 10

 

image.png.44a43f3f7e3d0c0944d3deb993f1003d.png

 

 

 

If you make batch files , you can add at the end a line saying pause, which will keep the window opened on the screen until you press a key, so you can see if there's some error. You can then remove the pause line once you're sure the batch is written properly.

you can also say something like @echo off  as first line, and that means the commands the batch file executes won't be echo-ed on the screen, you only get the output of the programs you launch.

You can say @pause or basically add @ in front of commands to prevent the command from being shown on screen.

 

Link to comment
Share on other sites

Link to post
Share on other sites

maybe I should stucture a little bit

When I open this image.png.c12f2286e4f22ecd06efb563cc59eb39.png

 

This pops out image.png.4ba89dba7122b0fba7ec4379c7d43b2c.png

 

And I need to complete it with that

image.png.4bb15040fb911bc4da01caf407cbfad1.png

 

Somehow when btcom is called with a shortcut it doesnt work so I thing I should stick to the original shortcut somehow in the other shortcut with the line added

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, mariushm said:

C:\Users\mariush>cmd /?
Starts a new instance of the Windows command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] string]

/C      Carries out the command specified by string and then terminates
/K      Carries out the command specified by string but remains
/S      Modifies the treatment of string after /C or /K (see below)
/Q      Turns echo off
/D      Disable execution of AutoRun commands from registry (see below)
/A      Causes the output of internal commands to a pipe or file to be ANSI
/U      Causes the output of internal commands to a pipe or file to be
        Unicode

So make a short to C:\Windows\System32\cmd.exe /C btcom -n "WH-1000XM3" -c -s110b

 and set the working folder, the folder where btcom is located after you configure the shortcut. In Windows 7, it's the Start in: text box, you can type there the path and it auto suggests so you won't make mistakes.

you can also set it to start minimized so it won't bother you and so on...

and from advanced you can set to run cmd as administrator which in turn will run that btcom as administrator if it requires administrative rights.

Again, may be a bit different under Windows 10

 

image.png.44a43f3f7e3d0c0944d3deb993f1003d.png

 

 

ok im trying that

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, mariushm said:

C:\Users\mariush>cmd /?
Starts a new instance of the Windows command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] string]

/C      Carries out the command specified by string and then terminates
/K      Carries out the command specified by string but remains
/S      Modifies the treatment of string after /C or /K (see below)
/Q      Turns echo off
/D      Disable execution of AutoRun commands from registry (see below)
/A      Causes the output of internal commands to a pipe or file to be ANSI
/U      Causes the output of internal commands to a pipe or file to be
        Unicode

So make a short to C:\Windows\System32\cmd.exe /C btcom -n "WH-1000XM3" -c -s110b

 and set the working folder, the folder where btcom is located after you configure the shortcut. In Windows 7, it's the Start in: text box, you can type there the path and it auto suggests so you won't make mistakes.

you can also set it to start minimized so it won't bother you and so on...

and from advanced you can set to run cmd as administrator which in turn will run that btcom as administrator if it requires administrative rights.

Again, may be a bit different under Windows 10

 

image.png.44a43f3f7e3d0c0944d3deb993f1003d.png

 

 

 

If you make batch files , you can add at the end a line saying pause, which will keep the window opened on the screen until you press a key, so you can see if there's some error. You can then remove the pause line once you're sure the batch is written properly.

you can also say something like @echo off as first line, and that means the commands the batch file executes won't be echo-ed on the screen, you only get the output of the programs you launch.

You can say @pause or basically add @ in front of commands to prevent the command from being shown on screen.

 

Nah its not working

If btcom is used outside original prompt it does nothing

I think I should stick to a macro with the original shortcut and then automatic paste of the line

But that would be ugly

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, Yohelpmedogimlost said:

Nah its not working

If btcom is used outside original prompt it does nothing

I think I should stick to a macro with the original shortcut and then automatic paste of the line

But that would be ugly

How about if you copy shortcut the BTCOM executable.
Then edit that to have the parameter behind the file name in the shortcut, it might pass them trough.

 

edit;

Right click the original executable and click copy. Then on empty space in same folder right click again and click past shortcut.
Then on the new file right click and select properties.

Then after the file name put the parameters.

Somewhat similar as in picture.

Screenshot_155.png

But correctly, i made some typing errors, sorry.

When i ask for more specs, don't expect me to know the answer!
I'm just helping YOU to help YOURSELF!
(The more info you give the easier it is for others to help you out!)

Not willing to capitulate to the ignorance of the masses!

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, HanZie82 said:

How about if you copy shortcut the BTCOM executable.
Then edit that to have the parameter behind the file name in the shortcut, it might pass them trough.

 

Can u pls explain more, I didnt really understand

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Yohelpmedogimlost said:

Can u pls explain more, I didnt really understand

Edited, should be more clear now. 😉

When i ask for more specs, don't expect me to know the answer!
I'm just helping YOU to help YOURSELF!
(The more info you give the easier it is for others to help you out!)

Not willing to capitulate to the ignorance of the masses!

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, HanZie82 said:

Edited, should be more clear now. 😉

Thanks for the help but no luck

BTCOM.exe is for no help here

I also tried to use the original cmd but it doesnt work 

So should I just add my line after the '' sign ?

image.png.4d1493d6a4480e4efe827b5d0b349259.png

Or do I need smth else?

 

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Yohelpmedogimlost said:

Thanks for the help but no luck

BTCOM.exe is for no help here

I also tried to use the original cmd but it doesnt work 

So should I just add my line after the '' sign ?

image.png.4d1493d6a4480e4efe827b5d0b349259.png

Or do I need smth else?

 

You confused me to much now.
Im not informed enough to be able to help you.

When i ask for more specs, don't expect me to know the answer!
I'm just helping YOU to help YOURSELF!
(The more info you give the easier it is for others to help you out!)

Not willing to capitulate to the ignorance of the masses!

Link to comment
Share on other sites

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

×