From the error I guess that, you are running JBoss AS at Windows OS and you are not running run.bat at the right location.
From which path you are executing the run.bat file?
Which version of JBoss AS you are using?
If you have installed JBoss AS in the location C:\jboss-4.0.4.GA then you should go into that location from the command prompt.
Let assume the location as JBOSS_HOME=C:\jboss-4.0.4.GA
at command prompt,
Go into the <JBOSS_HOME>/bin directory,
And run the file run.bat.
For more details, see the following link.