Log in

View Full Version : Error Message When Running .BAT File


ABOOABOO
24th May 2007, 14:06
C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU>cscript.exe "C:\program files\windows media
components\encoder\wmcmd.vbs" -input
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

C:\program files\windows media components\encoder\wmcmd.vbs(558, 2) Microsoft VB
Script runtime error: Subscript out of range: 'intIndex2'

C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU>"C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU\Audio
AndVideo.avs" -output "C:\YourMovie.wmv" -v_codec WMV9 -v_mode 2 -v_bitrate 6000
000 -v_keydist 30 -v_buffer 10000 -v_quality 100 -v_preproc 1

Thats the error message i get when i run the .bat file

Also AudioAndVideo.avs file opens in notepad!!

gzarkadas
24th May 2007, 16:12
Most probably there is a newline (a line break) after -input and thus instead of executing one big command line (breaks are from the html formatting, all this is a single line):
cscript.exe "C:\program files\windows media
components\encoder\wmcmd.vbs" -input "C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU\Audio
AndVideo.avs" -output "C:\YourMovie.wmv" -v_codec WMV9 -v_mode 2 -v_bitrate 6000
000 -v_keydist 30 -v_buffer 10000 -v_quality 100 -v_preproc 1

the bat file executes two, incorrect of course:
cscript.exe "C:\program files\windows media
components\encoder\wmcmd.vbs" -input and "C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU\Audio
AndVideo.avs" -output "C:\YourMovie.wmv" -v_codec WMV9 -v_mode 2 -v_bitrate 6000
000 -v_keydist 30 -v_buffer 10000 -v_quality 100 -v_preproc 1

The second one asks to start an .avs file, which on standard avisynth installations is associated with notepad. Thus notepad is run to open the .avs script, as you have found it to be so in your case.

If it is not the presence of a line break in your .bat file that causes the error, then you' ll need to post the .bat and .vbs files to provide us with a clue to search for the error.

Hope this will help :)

ABOOABOO
24th May 2007, 18:34
video = import("C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU\Video_Only.avs")
audio = import("C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU\Audio_Only.avs")
AudioDub(video,audio)[/SIZE]

Directshowsource("C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU\Audio_Only.GRF",audio=true,video=false)[/SIZE]

Directshowsource("C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU\Video_Only.GRF", fps=23.976, audio=false,
seekzero=false, seek=true).trim(0,165992)

cscript.exe "C:\program files\windows media components\encoder\wmcmd.vbs" -input
"C:\Movies\HD-DVD\BOURNE_SUPREMACY_EU\AudioAndVideo.avs" -output "C:\YourMovie.wmv" -v_codec WMV9 -v_mode - v_bitrate 6000000 -v_keydist 30 -v_buffer 10000 -v_quality 100 -v_preproc 1[/SIZE]

gzarkadas
24th May 2007, 19:13
The contents of the .avs file are irrevelant, only the .bat and .vbs where asked for. Anyway, from what I see from the source html of your last post there is a linebreak after the -input parameter of the command to cscript. Delete it and you 'll be ok.

ABOOABOO
24th May 2007, 20:16
i get

Invalid parameter: -inputC:\Movies\HD-DVD\BOURNE_SUPREMACY_EU\AudioAndVideo.avs
Command-line parsing completed.

gzarkadas
24th May 2007, 21:27
You must have a space between -input and the C:\... in order for the script to recognise the parameter. If this does not solve the problem it is better to attach the batch file as is to have a look at it (rename it to .txt to be able to attach it).

ABOOABOO
24th May 2007, 22:12
attached

thanks for the help