1.

Solve : Running a CMD from RUN box in XP?

Answer»

Well first of all sorry my poor English

Well...I´m really newbie with MSDOS batch and CMD files...

I have this file:

C:\program\launcher.cmd (which doesnt need any Arguments)

And also these one:

C:\program\launched1.cmd(which needs Arguments)
C:\program\launched2.cmd(which needs Arguments)
C:\program\launched3.cmd(which needs Arguments)
C:\program\help.cmd (which needs Arguments)

Really the launcher.cmd isnt just a Console Launcher also sets all the Enviroment.An example:

Quote

::I open the Cmd.exe
C:\program>

::Now i Call my launcher
C:\program>launcher

::The Launcher:

**********LAUNCHER*****
Hi,these are the available Commands:
launched1->It UPDATES
launched2->It cleans
launched3->It kill process
Use them with the properly options, i.e:
launched2 all (it will clean all the folder)
launched2 logs (it will clean just the logs inside the folder)
If you want to see the COMMAND options type Help [Command]
Write your command here:

::Prompt appears:
C:\program>

::So i write the command with its argumment:
C:\program\launched2 log

::And the task begin
*********Cleaning Logs*******
Ok.All Logs Cleaned
::Prompt appears:
C:\program>

This was a small example.As you can see it has cleaned the Logs inside a folder.(This folder was configurated by launcher.cmd)(Also many other things are configurated by the Launcher.cmd)Which means: i cant to jump over it calling directly the launched cmd files (without touching a lot all the files)


Now i hope it´s a little bit more clear.

I want to Launch the launched.cmd files from the RUN Box in XP

Surfing the Web i learnt how to call my launcher:

C:\Windows\System32\cmd.exe /k "C:\program\launcher.cmd"

(I need "/k", otherwise cmd close as you know,but i learnt it yesterday)

But now... im stuck i think i have to use a Pipe | or something like that...but...i cant find any clue to do that.
Can u help me?Thanks

put launcher.cmd to system32 folder and in run box type launcherWell devcom...i think i have FAILED to expose my problem(maybe a matter of my poor english?)

I can launch the launcher.cmd without problems with the following sentence:

C:\Windows\System32\cmd.exe /k "C:\program\launcher.cmd"

But i want to launch launched2.cmd or launched1.cmd or launched3.cmd or....

I could use logically:
Quote
C:\Windows\System32\cmd.exe /k "C:\program\launched1.cmd"

But it doesnt work since launcher.cmd sets some global variables(some means about 1200) and other features which launched ones needs.

So i need... first to launch the launcher.cmd and then i.e launched1.cmd. All in one sentence...

I hope now it should be undestable enough...but if anyone have any doubt about how it works dont be worry about asking me.

Thanks anyway devcom so you can add this code in launcher.cmd

Code: [SELECT]start launched%1.cmd
and in run box type

Code: [Select]launcher "number of launched.cmd to run"
but you must copy launched.cmd to system32 like i said before
ofc all launched(1-3) must bee in system32 too or you can cd to them

ex of use
Code: [Select]luncher 1


Discussion

No Comment Found