Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




1984 posts

Uber Geek
+1 received by user: 170

Trusted

# 138597 10-Jan-2014 09:13
Send private message

It's been many years since I've created BAT files to run on Windows machines, and encountered a small problem. I have two BAT files that utilise Android and Java apps, and they both run when executed separately.  Putting them both in one BAT file (so that they execute sequentially) runs into problems ... I'm sure it's something simple but can't pin it down.

The files/lines are -

START C:\Development\adt-bundle-windows-x86-20130917\sdk\platform-tools\adb.exe shell

and

START C:\androidscreencast(1).jnlp

As I say, both work individually, but not together ... tried putting second line in same directory as first, and also a CHDIR to ensure second line points to C; drive.

Error says "Windows cannot find C:\androidscreencast(1).jnlp ... "

Any clues, suggestions would be welcomed.

R.


Create new topic
5539 posts

Uber Geek
+1 received by user: 1539

Moderator
Trusted
Lifetime subscriber

  # 964292 10-Jan-2014 09:18
Send private message

Why not create a batch that calls both other back files, rather than one batch that calls both executables, e.g:

@echo off
call \path\batch1.bat
call \path\batch2.bat

edit: bearing in mind I haven't written a batch file in 17 years :)



1984 posts

Uber Geek
+1 received by user: 170

Trusted

  # 964301 10-Jan-2014 09:24
Send private message

Hi Michael, yeah, I'm in the same boat and went up into the attic to find my copy of DOS 5 to recall basic commands .

Will try your suggestion though.

R.

 
 
 
 


2116 posts

Uber Geek
+1 received by user: 1194


  # 964305 10-Jan-2014 09:33
Send private message

Does the second one need to be run after the first has completed loading?

I thought the start command instantly moved on. Maybe add a 3 second pause

START C:\Development\adt-bundle-windows-x86-20130917\sdk\platform-tools\adb.exe shell
ping 1.1.1.1 -n 1 -w 3000 > nul
START C:\androidscreencast(1).jnlp




Location: Dunedin

 




1984 posts

Uber Geek
+1 received by user: 170

Trusted

  # 964314 10-Jan-2014 09:45
Send private message

Andrew ... a time pause may be an idea, will give it a go .

R.



1984 posts

Uber Geek
+1 received by user: 170

Trusted

  # 964541 10-Jan-2014 14:07
Send private message

UPDATE: Thanks people, the short pause was enough to allow the first executable to open and stabilise before being hit with another command ... in fact the pause need only be 1.5 seconds .

Cheers,

R.

Create new topic



Twitter and LinkedIn »



Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Xero announces new smarter tools, push into the North American market
Posted 19-Jun-2019 17:20


New report by Unisys shows New Zealanders want action by social platform companies and police to monitor social media sites
Posted 19-Jun-2019 17:09


ASB adds Google Pay option to contactless payments
Posted 19-Jun-2019 17:05


New Zealand PC Market declines on the back of high channel inventory, IDC reports
Posted 18-Jun-2019 17:35


Air New Zealand uses drones to inspect aircraft
Posted 17-Jun-2019 15:39


TCL Electronics launches its first-ever 8K TV
Posted 17-Jun-2019 15:18


E-scooter share scheme launches in Wellington
Posted 17-Jun-2019 12:34


Anyone can broadcast with Kordia Pop Up TV
Posted 13-Jun-2019 10:51


Volvo and Uber present production vehicle ready for self-driving
Posted 13-Jun-2019 10:47


100,000 customers connected to fibre broadband network through Enable
Posted 13-Jun-2019 10:35


5G uptake even faster than expected
Posted 12-Jun-2019 10:01


Xbox showcases 60 anticipated games
Posted 10-Jun-2019 20:24


Trend Micro Turns Public Hotspots into Secure Networks with WiFi Protection for Mobile Devices
Posted 5-Jun-2019 13:24


Bold UK spinoff for beauty software company Flossie
Posted 2-Jun-2019 14:10


Amazon Introduces Echo Show 5
Posted 1-Jun-2019 15:32



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.