Computer Hope

Microsoft => Microsoft DOS => Topic started by: TNovelist on August 29, 2009, 04:05:07 PM

Title: Serious help with BAT?
Post by: TNovelist on August 29, 2009, 04:05:07 PM
Okay, so I'm trying to create a batch file that will run the following path:
C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\Barney's Asylum Reloaded.exe.

I tried typing Start then the path name with the spaces and got the error message:

"'C:\Program' could not be found" (or something similar, I can't remember).

Then I tried to replace the spaces with %20 and got the error message:

 "'C:\Program0Files\RaycastingGameMaker\GameBitmaps\BBits\Barney's0Asylum0Reloaded.exe' could not be found."

What code should I use? I hopelessly confused. Someone please help me!
Title: Re: Serious help with BAT?
Post by: smeezekitty on August 29, 2009, 04:07:19 PM
"C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\Barney's Asylum Reloaded.exe"
thats it
without anything before it
and remember to keep the quotes in it
Title: Re: Serious help with BAT?
Post by: Helpmeh on August 29, 2009, 04:47:43 PM
Nice try with the %20, but that won't work with batch (as you've found out), as it only works with URLs. Paths in EXPLORER are technically URLs, which is why %20 would work as a space there, but not in batch.
Title: Re: Serious help with BAT?
Post by: TNovelist on August 30, 2009, 09:00:23 AM
"C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\Barney's Asylum Reloaded.exe"
thats it
without anything before it
and remember to keep the quotes in it

Yeah, it didn't work. It flashed a prompt screen and then it disappared. The EXE didn't open. Thanks anyway, though. Also, I am trying to start my EXE, which is a game, in God Mode. Here are the instructions on how to launch the game in God Mode, according to the RayCasting Game Maker:

"To start the Game in Cheat- Mode it must be started via Command Line Parameter from
the command prompt or from a batch file:
Game.exe MyCheatCode"

Any ideas? I couldn't get it to work through DOS so I thought I'd try a batch file.
Title: Re: Serious help with BAT?
Post by: Helpmeh on August 30, 2009, 09:15:06 AM
Here this should work.

Start "your path here" cheatcode
Title: Re: Serious help with BAT?
Post by: TNovelist on August 30, 2009, 09:30:21 AM
Here this should work.

Start "your path here" cheatcode

Okay, so u mean:
START"C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\Install\Barney's Asylum Reloaded.exe" edomdog

(edomdog is my cheat code for god mode)

I got the error message: Windows cannot find the file, "edomdog." Now what should I do?
Title: Re: Serious help with BAT?
Post by: Helpmeh on August 30, 2009, 09:34:34 AM
Make sure there is a space between START and the " infront of the path.
Title: Re: Serious help with BAT?
Post by: billrich on August 30, 2009, 09:48:58 AM

C:\>cd \

C:\>dir /s  Reloaded.exe


C:\>cd \

C:\>dir /s  edomdog*.*
Title: Re: Serious help with BAT?
Post by: TNovelist on August 30, 2009, 09:53:36 AM
There was a space. When I get rid of the edomdog at the end of the command the batch file takes me to the command prompts and doesn't even open the exe.
Title: Re: Serious help with BAT?
Post by: TNovelist on August 30, 2009, 10:02:11 AM
C:\>cd \

C:\>dir /s  Reloaded.exe


C:\>cd \

C:\>dir /s  edomdog*.*

I tried this in command prompt, not really sure what to do or what would happen. It definately didn't work as a batch file. Any more ideas?
Title: Re: Serious help with BAT?
Post by: billrich on August 30, 2009, 11:06:36 AM
I tried this in command prompt, not really sure what to do or what would happen. It definately didn't work as a batch file. Any more ideas?

use dir /s filename to find correct path to file your batch file cannot find.
Title: Re: Serious help with BAT?
Post by: TNovelist on August 30, 2009, 11:50:28 AM
use dir /s filename to find correct path to file your batch file cannot find.

I typed in exactly what you wrote and got the error message: Volume i n drive C has no labels.
Title: Re: Serious help with BAT?
Post by: billrich on August 30, 2009, 12:28:07 PM
 

All the files for you game might not be on your machine. Or your batch file is using the wrong path or file name.

Are these the two of the files that could not be found when you run the batch? :

Reloaded.exe and edomdog

If the game was not installed correctly, the two files might be in a different location on your machine or not on your machine. Install the game again?   Or try a windows's search instead of the command prompt search.

On XP Pro click start, search ( I use the search companion )
All or part of the file name: [ reload.exe ]
or
All or part of the file name: [ endomdog ]

When the file or files are found the location will be revealed.  Copy and paste the path to your batch file and run the batch again.

For a test of the command search and/or the windows  search,  search for a file you know is on the machine and see if search is working.

We are trying to find the correct path to your files.

( the no label for C drive error should not interfere with the search )
Title: Re: Serious help with BAT?
Post by: smeezekitty on August 30, 2009, 12:30:45 PM
what about
Code: [Select]
cd /D "C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\"
"Barney's Asylum Reloaded.exe" "endomdog"
Title: Re: Serious help with BAT?
Post by: Salmon Trout on August 30, 2009, 12:34:32 PM
what about
Code: [Select]
cd /D "C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\"
Barney's Asylum Reloaded.exe "endomdog"

Missing the quotes off the prog name (it has spaces)
Title: Re: Serious help with BAT?
Post by: smeezekitty on August 30, 2009, 12:35:48 PM
good catch salmon
Title: Re: Serious help with BAT?
Post by: Salmon Trout on August 30, 2009, 12:44:17 PM
good catch salmon

(http://www.bfishing.com/fish_photo.jpg)
Title: Re: Serious help with BAT?
Post by: smeezekitty on August 30, 2009, 02:38:44 PM
LOL
Title: Re: Serious help with BAT?
Post by: TNovelist on August 31, 2009, 08:56:23 AM
 

All the files for you game might not be on your machine. Or your batch file is using the wrong path or file name.

Are these the two of the files that could not be found when you run the batch? :

Reloaded.exe and edomdog

If the game was not installed correctly, the two files might be in a different location on your machine or not on your machine. Install the game again?   Or try a windows's search instead of the command prompt search.

On XP Pro click start, search ( I use the search companion )
All or part of the file name: [ reload.exe ]
or
All or part of the file name: [ endomdog ]

When the file or files are found the location will be revealed.  Copy and paste the path to your batch file and run the batch again.

For a test of the command search and/or the windows  search,  search for a file you know is on the machine and see if search is working.

We are trying to find the correct path to your files.

( the no label for C drive error should not interfere with the search )

I tried the search and the only thing that came up was the batch file. I didn't install the game, either. I made the game. It only requires two files to run: a game.pak file and an exe file. I even put the batch file in the same folder as the other two files. It's still not working!
Title: Re: Serious help with BAT?
Post by: billrich on August 31, 2009, 05:33:00 PM
It seems the complete name of one your file that your batch file cannot find is :   Barney's Asylum Reloaded.exe.

The command line search or the windows search can find the file with a wildcard:  Barn*Reloaded.exe

cd \ to the root directory

C:\>dir /s Barn*Reloaded.exe.
Title: Re: Serious help with BAT?
Post by: billrich on August 31, 2009, 05:44:28 PM
Post  your batch file.


__________________________________

When you cd to where the game is, will the game run without a batch file?

Has the game ever played?   Why do you need a batch file?
Title: Re: Serious help with BAT?
Post by: TNovelist on September 01, 2009, 03:38:34 PM
I need a batch file or a command line (see earlier in the thread) in order to run the game in god mode. and yes the game has played before, just not in god mode.
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 01, 2009, 03:40:16 PM
i still think this
Code: [Select]
cd /D "C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\"
"Barney's Asylum Reloaded.exe" "endomdog"
should work
Title: Re: Serious help with BAT?
Post by: Helpmeh on September 01, 2009, 03:45:36 PM
i still think this
Code: [Select]
cd /D "C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\"
"Barney's Asylum Reloaded.exe" "endomdog"
should work
There should not be quotes around endomdog.
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 01, 2009, 03:47:44 PM
it doesnt matter because the command prompt auto filters it out
Title: Re: Serious help with BAT?
Post by: BC_Programmer on September 01, 2009, 03:48:26 PM
it doesnt matter because the command prompt auto filters it out

no it doesn't.
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 01, 2009, 03:48:47 PM
try it with and without
sorry for the double post internet acting funny
Title: Re: Serious help with BAT?
Post by: Helpmeh on September 01, 2009, 03:51:41 PM
Put this into notepad.

@echo %1

Save it. Drag the newly created script to the command prompt and add "hi" after it. See if it filters it out.
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 01, 2009, 03:57:46 PM
echo does not filter but i think it does for programs
Title: Re: Serious help with BAT?
Post by: Helpmeh on September 01, 2009, 04:02:57 PM
As said many times before "YOU THOUGHT WRONG!". I mean this in a much nicer way. Echo is a program anyway. Try running echo.exe "hi" at the command prompt.
Title: Re: Serious help with BAT?
Post by: BC_Programmer on September 01, 2009, 04:08:06 PM

The program parses the arguments passed- this is why older programs cannot understand quotes.

the C-runtime - in fact, most any runtime -  parses the command line into a array- it takes quotes into account.

batch files are run by cmd and it parses the command line appropriately.
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 01, 2009, 05:23:15 PM
Code: [Select]
[quote author=Helpmeh link=topic=90793.msg615107#msg615107 date=1251842577]
As said many times before "YOU THOUGHT WRONG!". I mean this in a much nicer way. Echo is a program anyway. Try running echo.exe "hi" at the command prompt.
[/quote]
echo isnt a program its a shell command[code]
echo.exe hello
comes out as
Code: [Select]
exe hello
[/code]
Title: Re: Serious help with BAT?
Post by: BC_Programmer on September 01, 2009, 05:25:40 PM
helpmeh.... echo isn't a program, it's an internal command...
Title: Re: Serious help with BAT?
Post by: Helpmeh on September 01, 2009, 05:28:10 PM
Well there go all my theories about how babies are made. I was really sure they are implanted as seeds through the bellybutton.
Title: Re: Serious help with BAT?
Post by: BC_Programmer on September 01, 2009, 05:28:59 PM
Well there go all my theories about how babies are made. I was really sure they are implanted as seeds through the bellybutton.

well... their implanted through seeds, but not through the belly button.  :-X


EDIT:

besides, everybody knows you allocate children.

Dim X as Baby
Set X = new Baby
X.SetParent Me,PARENT_FATHER
Baby.Burp()
Baby.Change()
If Me.AggravationLevel > Me.MaximumAggravationlevel then
     Baby.ShoveInCloset()

End If
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 01, 2009, 05:29:59 PM
Well there go all my theories about how babies are made. I was really sure they are implanted as seeds through the bellybutton.
time to get back on the topic
as i said
cd /D "C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\"
"Barney's Asylum Reloaded.exe" "endomdog"
should work perfectly because the C runtime will parse out the "s
Title: Re: Serious help with BAT?
Post by: Helpmeh on September 01, 2009, 05:35:10 PM
well... their implanted through seeds, but not through the belly button.  :-X


EDIT:

besides, everybody knows you allocate children.

Dim X as Baby
Set X = new Baby
X.SetParent Me,PARENT_FATHER
Baby.Burp()
Baby.Change()
If Me.AggravationLevel > Me.MaximumAggravationlevel then
     Baby.ShoveInCloset()

End If

Shouldn't it be
Baby.PutInGarbagebag()
in the IF?
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 01, 2009, 05:38:35 PM
Code: [Select]
int main(void){
bc_programmer.stop_fooling_around();
Helpmeh.stop_fooling_around();
return (false);
}
i am fairly sure you scared the orig poster off
Title: Re: Serious help with BAT?
Post by: BC_Programmer on September 01, 2009, 06:17:16 PM
you forgot to cast us to the common interface type before calling the abstract virtual "stop_fooling_around" function.
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 01, 2009, 06:21:10 PM
oh i see
Code: [Select]
int main(void){
((crazy_poster *)bc_programmer).stop_fooling_around();
((crazy_poster *)Helpmeh).stop_fooling_around();
return (false);
}
i am fairly sure you scared the orig poster off
Title: Re: Serious help with BAT?
Post by: Helpmeh on September 01, 2009, 06:40:46 PM
Now in batch!

If "%babystat%" EQU "crying" shake BABY
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 01, 2009, 07:28:07 PM
how about in asm
Code: [Select]
jmp start
shake_baby:
call shakebaby
start:
cmp [baby],crying
je shake_baby
Title: Re: Serious help with BAT?
Post by: BC_Programmer on September 01, 2009, 08:53:46 PM
shake_baby should be executed in a loop, to prevent race conditions with the mother object.
Title: Re: Serious help with BAT?
Post by: Salmon Trout on September 02, 2009, 12:27:01 AM
As said many times before "YOU THOUGHT WRONG!". I mean this in a much nicer way. Echo is a program anyway. Try running echo.exe "hi" at the command prompt.

Echo is not an exe. It is an internal command.

Code: [Select]
C:\>echo.exe hi
exe hi
Title: Re: Serious help with BAT?
Post by: Helpmeh on September 02, 2009, 05:13:41 AM
Lol.

If Mother.see Me.shakeBaby then CreateNew.WooshingSound
End If

I don't know what language that could be in. Vb maybe?
Title: Re: Serious help with BAT?
Post by: smeezekitty on September 02, 2009, 12:17:31 PM
Lol.

If Mother.see Me.shakeBaby then CreateNew.WooshingSound
End If

I don't know what language that could be in. Vb maybe?
or C# or C++ (classes)
Title: Re: Serious help with BAT?
Post by: TNovelist on September 10, 2009, 02:17:32 PM
time to get back on the topic
as i said
cd /D "C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\"
"Barney's Asylum Reloaded.exe" "endomdog"
should work perfectly because the C runtime will parse out the "s

Yeah, everytime i try these codes they open a command prompt briefly and then it closes and no programs open? Any more ideas????
Title: Re: Serious help with BAT?
Post by: Salmon Trout on September 10, 2009, 02:33:34 PM
Quote
everytime i try these codes they open a command prompt briefly and then it closes and no programs open

smeezekitty is such an expert, (we are all in his thrall) I'm surprised his code does that!
Title: Re: Serious help with BAT?
Post by: TNovelist on September 12, 2009, 09:15:53 AM
FINALLY! I FIGURED OUT HOW IT'S DONE!!!!!!!!!!! Okay, everyone listen close. I saved the BAT in the same folder with the game, edited the file name, and I entered into the bat:

start BAR.exe edomdog

IT WORKED! THANKS ANYWAY FOR ALL YOUR CONSIDERATION THOUGH!
Title: Re: Serious help with BAT?
Post by: Salmon Trout on September 12, 2009, 09:22:36 AM
I saved the BAT in the same folder with the game

4 pages.  ::)
Title: Re: Serious help with BAT?
Post by: TNovelist on September 12, 2009, 09:28:07 AM
4 pages.  ::)

Look, I'm sorry. I just screwed up again. I tried making a copy of the bat file and reediting the code in it to make my game run fullscreen and I changed the names of the bat. Now it says, "BAT.exe not found." when I try and run it. So I guess this forum thread isn't over.
Title: Re: Serious help with BAT?
Post by: TNovelist on September 12, 2009, 09:30:23 AM
Sorry, just fixed it again. There was a space in the file name.
Title: Re: Serious help with BAT?
Post by: elel302 on September 13, 2009, 05:24:20 AM
Okay, so u mean:
START"C:\Program Files\RaycastingGameMaker\GameBitmaps\BBits\Install\Barney's Asylum Reloaded.exe" edomdog

(edomdog is my cheat code for god mode)

I got the error message: Windows cannot find the file, "edomdog." Now what should I do?


Put edomdog inside quote marks after Barney's Asylum Reloaded.exe.

EDIT: Ooo I posted this a bit late.