PDA

View Full Version : Total Winbloze Newb Question



guice
11-17-2002, 11:39 AM
Gawd I hate asking this, but when it comes to Winbloze bat files, I'm amiss.

How can I get my bat file to run a command and "background" it or let it go so it can run another command?

Ie:

I'm trying to create a bat file that will run the dll and then run magelo which in turns starts up EQ.

:confused:

Mr. Suspicious
11-17-2002, 06:49 PM
http://www.google.com -> "How to make .bat file" <click discussiongroup"s> -> http://groups.google.com/groups?hl=nl&ie=UTF-8&oe=UTF-8&q=how+to+make+.bat+file&sa=N&tab=wg&lr=

It's also a basic Dos thing, so we seach for "dos guide" aswell on the internet (again using http://www.google.com ) and we find as 2nd result:

http://www.animatedsoftware.com/faqs/learndos.htm

LordCrush
11-18-2002, 02:08 AM
You mean



rundll32.exe ....
magelo.exe
eqgame.exe


or did i get you wrong ?

woooooooooooot transformed to Guardian Wurm :p

guice
11-18-2002, 09:17 AM
rundll32.exe ....
magelo.exe
eqgame.exe


Ya got it wrong. ;)

Magelo won't run until rundll32.exe is closed. For some reason while in a bat file rundll doesn't return to prompt like it does while on cmd line. /shrug

And eqgame.exe won't start until magelo.exe exits.
(exactly like you forgetting to put a & after your mozilla cmd on a linux box)

I did a search on google and I found a reference page on .bat files, but nothing mentioning starting multiple applications on the cmd line. Shoot, I even searched for .bat files on my windows box looking for an example.

They all seem to wait for the current process to finish before starting the next one.

Ratt
11-18-2002, 09:23 AM
Sorry to dissapoint you... batch files are linear in nature. They are essentially an automated method of using the command line.

I don't recall of any way to put something as a background process, because batch files were developed in the DOS days, and are inheriently a DOS legacy function. Due to this, task switching/multi-tasking was not a consideration or option back then.

There MAY be a way to accompilsh what you want with cmd.exe and some PIF files, though.

guice
11-18-2002, 09:29 AM
Ah bugger .. I guess expected to much from the Windows cmd line. :D

Thanks Ratt.

There MAY be a way to accompilsh what you want with cmd.exe and some PIF files, though.

Any sources handy? Or I can just search for PIF on Google.

Thanks again ...

Ataal
11-18-2002, 11:13 AM
I stole this from google/groups so I can't take the credit it this helps you out any:

I use a VBScript to run batch files (or any program) hidden.

Syntax: RunHidden.VBS "cmd /c C:\MyBatch.bat"

============== BEGIN RunHidden.VBS ==============
Dim sCMD, i, WshShell
Set WshShell = CreateObject("WScript.Shell")
For i = 0 to WScript.Arguments.Count -1
sCMD = sCMD & " " & WScript.Arguments(i)
Next
WshShell.Run Trim(sCMD), SW_HIDE, False
Set WshShell = Nothing
============== END RunHidden.VBS ================


Running the batch file as a service will also run it hidden if you
want to go that route.

Ataal
11-18-2002, 11:16 AM
Also, as a quick reference instead of having to type 'cmd /?':

Starts a new instance of the Windows XP command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]

/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains
/S Modifies the treatment of string after /C or /K (see below)
/Q Turns echo off
/D Disable execution of AutoRun commands from registry (see below)
/A Causes the output of internal commands to a pipe or file to be ANSI
/U Causes the output of internal commands to a pipe or file to be
Unicode
/T:fg Sets the foreground/background colors (see COLOR /? for more info)
/E:ON Enable command extensions (see below)
/E:OFF Disable command extensions (see below)
/F:ON Enable file and directory name completion characters (see below)
/F:OFF Disable file and directory name completion characters (see below)
/V:ON Enable delayed environment variable expansion using ! as the
delimiter. For example, /V:ON would allow !var! to expand the
variable var at execution time. The var syntax expands variables
at input time, which is quite a different thing when inside of a FOR
loop.
/V:OFF Disable delayed environment expansion.

Note that multiple commands separated by the command separator '&&'
are accepted for string if surrounded by quotes. Also, for compatibility
reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the
same as /C. Any other switches are ignored.

If /C or /K is specified, then the remainder of the command line after
the switch is processed as a command line, where the following logic is
used to process quote (") characters:

1. If all of the following conditions are met, then quote characters
on the command line are preserved:

- no /S switch
- exactly two quote characters
- no special characters between the two quote characters,
where special is one of: &<>()@^|
- there are one or more whitespace characters between the
the two quote characters
- the string between the two quote characters is the name
of an executable file.

2. Otherwise, old behavior is to see if the first character is
a quote character and if so, strip the leading character and
remove the last quote character on the command line, preserving
any text after the last quote character.

If /D was NOT specified on the command line, then when CMD.EXE starts, it
looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if
either or both are present, they are executed first.

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun

and/or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

Command Extensions are enabled by default. You may also disable
extensions for a particular invocation by using the /E:OFF switch. You
can enable or disable extensions for all invocations of CMD.EXE on a
machine and/or user logon session by setting either or both of the
following REG_DWORD values in the registry using REGEDT32.EXE:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions

and/or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions

to either 0x1 or 0x0. The user specific setting takes precedence over
the machine setting. The command line switches take precedence over the
registry settings.

The command extensions involve changes and/or additions to the following
commands:

DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (also includes changes to external command invocation)
ASSOC
FTYPE

To get specific details, type commandname /? to view the specifics.

Delayed environment variable expansion is NOT enabled by default. You
can enable or disable delayed environment variable expansion for a
particular invocation of CMD.EXE with the /V:ON or /V:OFF switch. You
can enable or disable completion for all invocations of CMD.EXE on a
machine and/or user logon session by setting either or both of the
following REG_DWORD values in the registry using REGEDT32.EXE:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion

and/or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion

to either 0x1 or 0x0. The user specific setting takes precedence over
the machine setting. The command line switches take precedence over the
registry settings.

If delayed environment variable expansion is enabled, then the exclamation
character can be used to substitute the value of an environment variable
at execution time.

File and Directory name completion is NOT enabled by default. You can
enable or disable file name completion for a particular invocation of
CMD.EXE with the /F:ON or /F:OFF switch. You can enable or disable
completion for all invocations of CMD.EXE on a machine and/or user logon
session by setting either or both of the following REG_DWORD values in
the registry using REGEDT32.EXE:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar

and/or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar

with the hex value of a control character to use for a particular
function (e.g. 0x4 is Ctrl-D and 0x6 is Ctrl-F). The user specific
settings take precedence over the machine settings. The command line
switches take precedence over the registry settings.

If completion is enabled with the /F:ON switch, the two control
characters used are Ctrl-D for directory name completion and Ctrl-F for
file name completion. To disable a particular completion character in
the registry, use the value for space (0x20) as it is not a valid
control character.

Completion is invoked when you type either of the two control
characters. The completion function takes the path string to the left
of the cursor appends a wild card character to it if none is already
present and builds up a list of paths that match. It then displays the
first matching path. If no paths match, it just beeps and leaves the
display alone. Thereafter, repeated pressing of the same control
character will cycle through the list of matching paths. Pressing the
Shift key with the control character will move through the list
backwards. If you edit the line in any way and press the control
character again, the saved list of matching paths is discarded and a new
one generated. The same occurs if you switch between file and directory
name completion. The only difference between the two control characters
is the file completion character matches both file and directory names,
while the directory completion character only matches directory names.
If file completion is used on any of the built in directory commands
(CD, MD or RD) then directory completion is assumed.

The completion code deals correctly with file names that contain spaces
or other special characters by placing quotes around the matching path.
Also, if you back up, then invoke completion from within a line, the
text to the right of the cursor at the point completion was invoked is
discarded.

The special characters that require quotes are:
<space>
&()[]{}^=;!'+,`~


Ok, so it's not quite Linux, but you have to admit it's come a long way.

LordCrush
11-18-2002, 01:47 PM
On 2k/XP you can use start to dispatch a program in the background like running a linux cmd with an & attached



START ["Titel"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME] | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [Befehl/Programm]
[Parameter]


Sorry have no english version here right now ...

I ll post an english description tomorrow when i am at work :p

baelang
11-18-2002, 03:08 PM
Originally posted by LordCrush

Sorry have no english version here right now ...

I ll post an english description tomorrow when i am at work :p

Τι είναι τόσο σκληρός για τη μετάφραση στα αγγλικά; σημαίνω, είναι όλα τα ελληνικά σε με.

sheesh. Το LordCrush ήταν σε μια από εκείνες τις διαθέσεις πρόσφατα. ίσως είναι εκείνος ο χρόνος του μήνα;

guice
11-18-2002, 06:51 PM
Ah sweeet is... See, forums come in handy. ;)

And here's the english version:


START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]

Start /? for even more info.

LordCrush
11-19-2002, 12:46 AM
Τι είναι τόσο σκληρός για τη μετάφραση στα αγγλικά; σημαίνω, είναι όλα τα ελληνικά σε με.

sheesh. Το LordCrush ήταν σε μια από εκείνες τις διαθέσεις πρόσφατα. ίσως είναι εκείνος ο χρόνος του μήνα;


Hmm beelang - nice :)

Ataal
11-21-2002, 03:54 PM
That almost looks like one of those anagram games in "Puzzle" magazine.

LordCrush
11-21-2002, 04:09 PM
I tried to put into word and switch through fonts (symbol, greek ...) but had no luck in decoding yet .. perhaps a "67 bit" key pffft ;) :D :D

Gjeret
11-21-2002, 04:27 PM
It's all Greek to me ;)

Τι είναι τόσο σκληρός για τη μετάφραση στα αγγλικά; σημαίνω, είναι όλα τα ελληνικά σε με.

sheesh. Το LordCrush ήταν σε μια από εκείνες τις διαθέσεις πρόσφατα. ίσως είναι εκείνος ο χρόνος του μήνα;
-------------------------------------------------------------------

What is so much hard for the translation in the English? I mean, they are all Greek in with.

sheesh. The LordCrush was in one from those disposals recently. perhaps it is that time of month?

Look ma! I can use a Search Engine :)

-Gj-

LordCrush
11-22-2002, 01:25 AM
Hehe thanx, did not really try intensively :D

baelang
11-22-2002, 02:25 PM
LOL. double translations are funny. kind of like that game where you sit in a circle and whisper a phrase from person to person and it gets all distorted. (telephone i think it is called, or perhaps gossip)

anyway, it is close enough. it's all greek to me.