how can i use a program from command promp?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
sold,v-vv
Posts: 10
Joined: 04 Jan 2014 04:53

how can i use a program from command promp?

#1 Post by sold,v-vv » 04 Jan 2014 08:05

im new..

i have windows xp

i dont want only open the program

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: how can i use a program from command promp?

#2 Post by foxidrive » 04 Jan 2014 08:10

Explain further... which program do you need help with?

sold,v-vv
Posts: 10
Joined: 04 Jan 2014 04:53

Re: how can i use a program from command promp?

#3 Post by sold,v-vv » 04 Jan 2014 08:14

start+r
cmd
and i open command prompt

how can i scan of issues with ccleaner(example) from command prompt??can i?

ShadowThief
Expert
Posts: 1167
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: how can i use a program from command promp?

#4 Post by ShadowThief » 04 Jan 2014 08:16

sold,v-vv wrote:start+r
cmd
and i open command prompt

how can i scan of issues with ccleaner(example) from command prompt??can i?

http://www.piriform.com/docs/ccleaner/a ... parameters

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: how can i use a program from command promp?

#5 Post by foxidrive » 04 Jan 2014 08:20

sold,v-vv wrote:start+r
cmd
and i open command prompt

how can i scan of issues with ccleaner(example) from command prompt??can i?


If ccleaner is just an example, then what is the real task that you need to do?

sold,v-vv
Posts: 10
Joined: 04 Jan 2014 04:53

Re: how can i use a program from command promp?

#6 Post by sold,v-vv » 04 Jan 2014 08:21

sorry for my bad english, now i learning:

my general purpose is, i create bat files, because i want to do anything is algorithm with 2 clicks
-------------
i understand something, i must find the commands for program
--------------
my special purpose is, i write the commands to bat file for:

run fasttracker2 into the dosbox
---

but for general i want to learn how can i create bat files with commands for algorithms

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: how can i use a program from command promp?

#7 Post by foxidrive » 04 Jan 2014 08:45

I assume you want to load dosbox by clicking on the icon and then have fastracker2 start automatically.

In dosbox-x.xx.conf at the bottom is a section starting with [autoexec]

After that you can mount the folder on your hard drive where fasttracker is and then launch it - something like this should work, assuming that the executable is called ft2.exe and the folder is where it shows below:

Code: Select all

[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
mount c "c:\Program Files\MSDOS\fasttrk2\" 
c:
ft2.exe

sold,v-vv
Posts: 10
Joined: 04 Jan 2014 04:53

Re: how can i use a program from command promp?

#8 Post by sold,v-vv » 04 Jan 2014 08:52

no


i want to create .bat file and if i press 2 clicks, the fasttracker runs into the dosbox.only with 2 clicks.who is the algorithm and commands for this??

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: how can i use a program from command promp?

#9 Post by foxidrive » 04 Jan 2014 08:59

That should start dosbox and load fasttracker2 inside it.

What is it that you need to do?

sold,v-vv
Posts: 10
Joined: 04 Jan 2014 04:53

Re: how can i use a program from command promp?

#10 Post by sold,v-vv » 04 Jan 2014 09:20

foxidrive wrote:That should start dosbox and load fasttracker2 inside it.

What is it that you need to do?

yes but how can i do it, without clicks??my start is command prompt windows, no dosbox. i want to write correctly the total of commands for:

open the dosbox
use(with commands from command prompt windows) the dosbox for running the ft2 inside.

at last i want to write the commands to .bat, for i do it all this with only 2 clicks(use the .dat)

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: how can i use a program from command promp?

#11 Post by foxidrive » 04 Jan 2014 09:24

The answer I gave you starts fasttracker in dosbox automatically.

To start dosbox from the command line then you need another batch file with the following - but change the path to where you have dosbox installed.

Code: Select all

@echo off
start "" "c:\Program Files\DOSBox\dosbox.exe"

sold,v-vv
Posts: 10
Joined: 04 Jan 2014 04:53

Re: how can i use a program from command promp?

#12 Post by sold,v-vv » 04 Jan 2014 10:20

i did it
but i want to do, without i change the notepad for your setting
without your setting when i open dosbox, the ft2 running inside if i write:

Code: Select all

mount c c:/
c:/
cd c:/ft2
ft2.exe


ok until here.
i know how to open from windows cmd the dosbox
but i want from windows cmd do the usage of above code.
so, first i use

Code: Select all

@echo off
start "" "c:\Program Files\DOSBox\dosbox.exe"

and second what can i do from cmd windows, fοr i do the usage of

Code: Select all

mount c c:/
c:/
cd c:/ft2
ft2.exe

?

im very descriptive, because i dont speak very good
my question is not practical problem, but is theoritical for programming

aGerman
Expert
Posts: 4743
Joined: 22 Jan 2010 18:01
Location: Germany

Re: how can i use a program from command promp?

#13 Post by aGerman » 04 Jan 2014 10:45

You need to define that either in the default .conf file (as foxidrive already mentioned) or you have to create a new .conf file.
untested:

Code: Select all

@echo off &setlocal
set "conffile=%temp%\ft2.conf"
>"%conffile%" (
  echo([autoexec]
  echo(mount c c:/
  echo(c:/
  echo(cd c:/ft2
  echo(ft2.exe
)
start "" "c:\Program Files\DOSBox\dosbox.exe" -conf "%conffile%"
>nul timeout /t 5 /nobreak
del "%conffile%"


Regards
aGerman

sold,v-vv
Posts: 10
Joined: 04 Jan 2014 04:53

Re: how can i use a program from command promp?

#14 Post by sold,v-vv » 04 Jan 2014 10:53

aGerman wrote:You need to define that either in the default .conf file (as foxidrive already mentioned) or you have to create a new .conf file.
untested:

Code: Select all

@echo off &setlocal
set "conffile=%temp%\ft2.conf"
>"%conffile%" (
  echo([autoexec]
  echo(mount c c:/
  echo(c:/
  echo(cd c:/ft2
  echo(ft2.exe
)
start "" "c:\Program Files\DOSBox\dosbox.exe" -conf "%conffile%"
>nul timeout /t 5 /nobreak
del "%conffile%"


Regards
aGerman


oh my god, what is this??i trying...yesterday i start my programming course

aGerman
Expert
Posts: 4743
Joined: 22 Jan 2010 18:01
Location: Germany

Re: how can i use a program from command promp?

#15 Post by aGerman » 04 Jan 2014 16:05

You have to clearly divide Windows Batch (cmd.exe) from DosBox. Even if both are running in the black console window and commands seem to be the same they behave differently. DosBox emulates x86 DOS and some commands of the command.com interpreter.

Regards
aGerman

Post Reply