Jump to content

Help with Batch file syntax please?


Recommended Posts

Posted

Hi all...im trying to create a batch file to open everything i need opened at once when i fly.

Im ok with the normal exe type programs but one of them is an 'App' (OpenKneeboard) and for the life of me i cant get it to work

even though i have followed the instructions online to a tee

.

If i want to run the clock app i make a batch file that says...

start explorer.exe shell:appsFolder\Microsoft.WindowsAlarms_8wekyb3d8bbwe!App

The details come from the 'Target' section of the apps shortcut and It works every time i run it

 

If i want to run the Snip and Sketch app i make a batch file that says...

start explorer.exe shell:appsFolder\Microsoft.ScreenSketch_8wekyb3d8bbwe!App

These details also come from the 'Target' section of the apps shortcut and It works every time i run it

 

But...when i try the same thing with OpenKneeboard...

start explorer.exe shell:appsFolder\FredEmmott.Self.OpenKneeboard_qvw5xrmsm8j1t!App

When i click the Bat file the This PC/Documents window opens and not the app

 

I am completely perplexed...can anybody see what i am doing wrong as its doing my head in! Cheers guys

 

PS....I have attached a zip of the three app shortcuts that i have got my 'Target' paths from and the batch file that doesnt open the OpenKneeboard app, for your perusal

 

app shortcuts and batch file.rar

AEthelraedUnraed
Posted

Why are you opening everything as some kind of app from within explorer, rather than straight from the .exe?

Posted
4 hours ago, AEthelraedUnraed said:

Why are you opening everything as some kind of app from within explorer, rather than straight from the .exe?

Are you talking about OpenKneeboard? if so its an app and not a ‘program’ as such so the procedure for opening is different as far as i am aware.

 

If it was a normal program with a normal program folder nd executable , you would put something like the following in the batch file

 

 cd C://Program files/ Program folder/ (changes directory to target)

start program.exe ( runs executable in target directory)

 

With an ‘app’ that doesnt have a Target path like a normal executable, you have to put the path as i have

put it in my original post as all apps live in that same folder. Now i got all this information by doing a heap of searches on how to

write batch files for normal exes, and also for apps, i am not a programmer. Like i said in my original post, those other two ‘apps’,

Sketch and Snip and Clock both open just fine when i follow that protocol but the OpenKneeboard, which is located in the same place

as those other two apps, does not open like the others…the BAT file with the details for the app open the ‘This PC/Documents’ folder and

does not run the app…Clearly its a very simple mistake i have made somewhere but for the life of me i cant figure it out, hence the request for help

AEthelraedUnraed
Posted

Well, an "app" also runs from a .exe, like any other program does. Except that apparently Windows Apps are hooked into various layers of the OS that make them impossible to handle ?

 

OpenKneeboard has a OpenKneeboard-v1.1.3-RemoteControl.zip file available that includes a self-contained exe file whose only job is to start the OpenKneeboard app. You can place that file (OpenKneeboard-Launch-WindowsApp.exe) wherever you want and then launch it as a normal program using cd and start. This should work for you.

 

[rant mode ON]

Honestly, the minute you need to write a separate 556kB application just to start up your main one, you'd think one'd understand that maybe, just maybe, it isn't such a good idea after all to make a Windows App the only way to install/run your program. I cannot fathom for the life of me why any self-respecting developer wouldn't just make a self-contained program, whether "plug 'n play" or with an installer, rather than get anywhere near this Microsoft Apps hell. Is the OpenKneeboard developer a severe masochist or something?

[rant mode OFF]

Posted
13 minutes ago, AEthelraedUnraed said:

Well, an "app" also runs from a .exe, like any other program does. Except that apparently Windows Apps are hooked into various layers of the OS that make them impossible to handle ?

 

OpenKneeboard has a OpenKneeboard-v1.1.3-RemoteControl.zip file available that includes a self-contained exe file whose only job is to start the OpenKneeboard app. You can place that file (OpenKneeboard-Launch-WindowsApp.exe) wherever you want and then launch it as a normal program using cd and start. This should work for you.

 

[rant mode ON]

Honestly, the minute you need to write a separate 556kB application just to start up your main one, you'd think one'd understand that maybe, just maybe, it isn't such a good idea after all to make a Windows App the only way to install/run your program. I cannot fathom for the life of me why any self-respecting developer wouldn't just make a self-contained program, whether "plug 'n play" or with an installer, rather than get anywhere near this Microsoft Apps hell. Is the OpenKneeboard developer a severe masochist or something?

[rant mode OFF]

Sorry if ive upset you, was just asking for help…wasnt aware of remote control zip file i will look into it…cheers

AEthelraedUnraed
Posted
15 minutes ago, Tonester said:

Sorry if ive upset you, was just asking for help…wasnt aware of remote control zip file i will look into it…cheers

Oh, you didn't upset me at all.

 

It upsets me that the developer of OpenKneeboard would make one of these impossible-to-use Windows Apps the *only* way to run his software. Why on earth would anyone do that? That's what my rant is targeted against, not you, and I'm sorry if it somehow seemed that way. I have no beef with you :)

Posted
17 hours ago, AEthelraedUnraed said:

Oh, you didn't upset me at all.

 

It upsets me that the developer of OpenKneeboard would make one of these impossible-to-use Windows Apps the *only* way to run his software. Why on earth would anyone do that? That's what my rant is targeted against, not you, and I'm sorry if it somehow seemed that way. I have no beef with you :)

My bad mate…misinterpreted your angst…all good

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
×
×
  • Create New...