corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » .Bat script problem. Doing my head in


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author .Bat script problem. Doing my head in
Aaron
Member

Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
3rd Mar 08 at 16:31   View User's Profile U2U Member Reply With Quote

I'm trying to automate the running of an app when a user logs on. I've decided to use Batch script rather then VBScript at the moment.

The path to the app is C:\Program Files\Promissor\Administrator and the executable name is Administrator.exe

When i put the following code in a batch file and run it, i get an error saying it can't fine the specified path.


code:


C:

CD "Progra~1\Promis~1\Admini~1"
Admin~1.exe




But...


If i open a command prompt and do it all by hand, it works fine

Any ideas?

Scripting isnt really my thing tbh
Tommy L
Member

Registered: 21st Aug 06
Location: Northampton Drives: Audi wagon
User status: Offline
3rd Mar 08 at 16:34   View User's Profile U2U Member Reply With Quote

Aj. would know what to do.
Dom
Member

Registered: 13th Sep 03
User status: Offline
3rd Mar 08 at 16:50   View User's Profile U2U Member Reply With Quote

should be -

code:

CD C:\Progra~1\Promis~1\Admini~1
Admin~1.exe



should work

edit 2 - also try

code:

cd C:\Program Files\Promissor\Administrator
Administrator.exe




[Edited on 03-03-2008 by Dom]
Aaron
Member

Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
3rd Mar 08 at 16:58   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by corsa_tomtom
Aj. would know what to do.


This Aj. u talk of sounds clever. If there was such a user, i'd u2u him
Dan Lewis
Member

Registered: 31st Jan 05
Location: Leicestershire
User status: Offline
3rd Mar 08 at 16:59   View User's Profile U2U Member Reply With Quote

or you could just put the app in the startup folder
Aaron
Member

Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
3rd Mar 08 at 17:01   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Dom
should be -

code:

CD C:\Progra~1\Promis~1\Admini~1\
Admin~1.exe



should work

edit - also try and use the long named version as well, so CD C:\Program Files\Promis.... etc etc

[Edited on 03-03-2008 by Dom]




Thanks Dom

Worked a treat

[Edited on 03-03-2008 by Aaron]

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Who has a baseball bat in there car?? Mug shot General Chat 100 3006
8th Jun 12 at 10:05
by Steve
 
Baseball Bats ! Inside a Car? L33 LEG General Chat 38 405
30th Aug 03 at 18:10
by transca
 
Bat-motorsport not responding neophyterulez Help Zone, Modification and ICE Advice 3 278
23rd Dec 03 at 19:12
by neophyterulez
 
PHP and certain characters... ed Geek Day 4 178
21st Nov 06 at 19:23
by MikeLamb
 
Javascript function changing css? Rus Geek Day 1 646
22nd Jun 07 at 10:53
by Rus
 

Corsa Sport » Message Board » Off Day » Geek Day » .Bat script problem. Doing my head in 28 database queries in 0.0110641 seconds