Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

starting an application share from command line

Status
Not open for further replies.

Xaqte

IS-IT--Management
Oct 4, 2002
971
0
0
US
Our workstations have a shortcut on the desktop to access the main application share. The target is:
\\server\share\program.exe
The start in is:
\\server\share
I know the "start" command, but I don't know if there is another command, or an addition to this command that would let me set the "start in" as above. The application won't function properly without it. Any help would be appreciated.
 
start /D\\server\share program.exe

If you do a start /? you will get all the command options.

Laters...
Dan
 
I've checked out start /? & still after numerous attempts, I can't figure out where to specify the "start in"
 
Are you saying that the "start in" portion of the shortcut does not handle the issue?
 
I may be missing something, but if you right-click the shortcut and open up the properties page, on the shortcut tab, you can specify the 'start in ' location.

Patty [ponytails2]
 
Sorry I wasn’t clear earlier. I’m looking for a command prompt alternative to a desktop shortcut. I’ve tried every method that I can come up with by looking at the “start /?” information. The program will not work unless I can specify where to start it in. Thank you for your responses, your help is appreciated.
 
This may not be quite the solution you are looking for, but it would meet your defined requirements.


Copy the text below into notepad and save as a batch file.

rem this delete lins is incase it was mapped somewhere else
net use x: /delete
net use x: \\servername\sharename
x:
start abc.exe
net use x: /delete



using a short term mapping may defete your needs, but it is a way to start and run the app in a remote dirrectory.

let me know,
Jay Mosser
jaym@optymgroup.com
 
Why can't you create a shortcut and then run the shortcut from the command line?
 
OK- hjm3857: that doesn't work because I can't specify where to start in.
coolclark: I've done that, and it does work. I was just wondering if there is just a way to do it entirely command prompt driven.

 
In the batch file when you do the X: and on the next line, you are starting the app in the x:\ directory. It is like the good old dos days, it runs in the directory you are in when you start it. I only put "start" in the batch file because I thought you needed it for one of the other switches. If you don't you would be better served with a call statement.

Jay
 
hjm3857: That sounds like a great idea. I mapped a network drive to z:\ & made a batch file like this:
@echo on
cd z:start program.exe
I am running this through xp pro command prompt & it seems that it isn't changing to directory z:Any suggestions?
 
hjm3857: That sounds like a great idea. I mapped a network drive to z:\ & made a batch file like this:
@echo on
cd z:start program.exe
I am running this through xp pro command prompt & it seems that it isn't changing to directory z:Any suggestions?
 
don't do a cd z:\ , instead specify the drive z: on a line by itself, then cd to any subdir you may need. I had to do similar stuff when I was automating FTP transfers. I had to be in a specific drive and sub dir before I started the FTP process.

Jay Mosser
 
This is the best yet, hjm3857. However, I think I'm going to seek the advice of the vendor for the software. Your recent post actually brought up the application, but when it did come up it errored out. What does it mean by parameter in the start /? command? I appreciate everyone's help, but I think I'll have to give up on the issue for now.
 
As a last question, why do you have to use the start command?

you should be able to just put a line like:

call program.exe

in the batch file unless you need some of the special funcitons provided by "start"

Jay
 
Xaqte, you use the /Dpath command line option to specify a "start in" path with Start.exe. Sorry if I didn't make that clear in my original post.

If you are going to use a batch file, you would not do a:
cd z:start program.exe

you would do a:
z:
cd\path
program.exe
 
hjm3857 & dankelt: Sounds like good ideas, I'll try them out Monday and let you know. Thanks alot!
 
Thanks guys... But I think I'm giving up on the idea. Neither of those suggestions worked. Thank you for your suggestions.
 
FYI- I finally figured it out w/ the help of my application's vendor. The application is required to run at the root of the drive so...
I mapped a network drive to \\server\c and labeled it z:
A batch file was made:
@echo off
net use \\server\c\share
z:
cd \application_dir\application_dir
start program.exe

Thanks again for all you help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top