running a batch file with Launchy on Windows 10

0

I am not sure where the source of this issue is: Launchy, OneDrive, or Windows 10.

On my old Windows 7 machine I had a batch file on my desktop that launched command line prompt in a specific directory:

ECHO OFF
TITLE tasker
CD C:\Users\jenglish\desktop\Gitportable\Data\home\tasker
PROMPT t$g
ECHO ON

In Launchy on my Windows 7 machine I used the Runner extension to launch cmd.exe with "/K c:\users\jenglish\desktop\starttasker.bat" as the argument.

On my new Windows 10 machine, I had to adapt to using OneDrive, which adds extra directories to my paths.

The only difference in the new batch file is the path:

CD "C:\Users\englisjo\OneDrive\OneDrive - Hewlett Packard Enterprise\Documents\GitHub\tasker"

I saved the batch file on the desktop and got this error:

'C:\Users\englisjo\OneDrive\Onedrive' is not a recognized as an internal or external command, operable program or batch file

I saved the batch file to c:\users\englisjo\starttasker.bat and updated launchy to open this version of the batch file and I get the same error, so I don't think Launchy is the issue here.

If start a command prompt and navigate to the desktop or my home directory and run the batch file it works just fine.

Josh English

Posted 2018-09-25T16:57:11.170

Reputation: 121

Answers

0

After writing all this up and trying a few things, I removed the /K switch from the Launchy argument and the thing worked.

Why it worked in Windows 7 and not Windows 10 I do not know.

Josh English

Posted 2018-09-25T16:57:11.170

Reputation: 121

0

You could also just create a shortcut file and call it from Launchy.

Thierry Dalon

Posted 2018-09-25T16:57:11.170

Reputation: 161