IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64, [was ďIt seems that fb2k 1.2.4 canít invoke cscript.exe + WMCmd.vbsĒ]
xxy
post Apr 5 2013, 10:58
Post #1





Group: Members
Posts: 8
Joined: 3-October 11
Member No.: 94121



2 years ago, in win7 ultimate, with foobar2000 1.1.2, I used the way below to convert to wma:
------------------------------------------------------------------------------------------------------------------------------------
Encoder file: C:\Program Files (x86)\Foobar2000\cscript.exe
Extension: wma
Paramenters: "C:\Program Files (x86)\Foobar2000\WMCmd.vbs" -silent -a_codec WMA9STD -a_mode 2 -a_setting Q98_44_2 -input %s -output %d
Format is: Lossy
Bighest BPS: 32
---------------------------------------------------------------------------------------------------------------------------------------

It had worked well for 2 years.

Recently, I reinstalled win7. Of course, I installed the latest foobar2000 version, 1.2.3. Then, I converted ape to wma with the way above, something terrible happened:
//*The information below is from the "Console" and "Convert Status Report" of foobar2000 1.2.4 original version in win2003. From 1.2.3 in win7, it is the same. I don't post it because 1.2.3 I use is CHS version.*//
--------------------------------------------------------------------------------------------------------------------------------------------
CLI encoder: C:\Program Files\Foobar2000\cscript.exe
Destination file: D:\B5-3 Allegro.wma
Encoder stream format: 44100Hz / 2ch / 16bps
Command line: "C:\Program Files\Foobar2000\cscript.exe" "C:\Program Files\Foobar2000\WMCmd.vbs" -silent -a_codec WMA9STD -a_mode 2 -a_setting Q98_44_2 -input "D:\temp-5AD9B75428B931BC1A8ECB8EA982DA2D.wav" -output "B5-3 Allegro.wma"
Working folder: D:\
Unable to execute: "C:\Program Files\Foobar2000\cscript.exe" "C:\Program Files\Foobar2000\WMCmd.vbs" -silent -a_codec WMA9STD -a_mode 2 -a_setting Q98_44_2 -input "D:\temp-5AD9B75428B931BC1A8ECB8EA982DA2D.wav" -output "B5-3 Allegro.wma"
An error occurred while finalizing the encoding process (Could not start commandline encoder) : "D:\B5-3 Allegro.wma"
Conversion failed: Could not start commandline encoder
could not enumerate tracks (Object not found) on:
D:\B5-3 Allegro.wma
Total encoding time: 0:01.547, 198.85x realtime
----------------------------------------------------------------------------------------------------------------------------------------------------
1 out of 1 tracks converted with major problems.

Source: "D:\Allegro.FLAC"
An error occurred while finalizing the encoding process (Could not start commandline encoder) : "D:\Allegro.wma"
Conversion failed: Could not start commandline encoder
------------------------------------------------------------------------------------------------------------------------------------------------------


And I also tried these:
----------------------------------------------------------------------------------------------------------------------------------------------
Encoder file: C:\Windows\System32\cscript.exe
Extension: wma
Paramenters: "E:\WMCmd.vbs" -silent -a_codec WMA9STD -a_mode 2 -a_setting Q98_44_2 -input %s -output %d
-----------------------------------------------------------------------------------------------------------------------------------------------
Encoder file: C:\Program Files (x86)\Foobar2000\WMCmd.vbs
Extension: wma
Paramenters: -silent -a_codec WMA9STD -a_mode 2 -a_setting Q98_44_2 -input %s -output %d
--------------------------------------------------------------------------------------------------------------------------------------------------
It was all the same, FAULT.

So, what is wrong?
Go to the top of the page
+Quote Post
db1989
post Apr 5 2013, 11:27
Post #2





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



Unfortunately I canít comment on the command-line as I havenít used the WM encoder.

Can I ask, however, why you seem to consistently rename the folder of installation to ďFoobar2000Ē? It seems to me that would require active effort to counter the default behaviour of the installer, for seemingly no reason. I doubt this affects the process at all, but it seems pointless, not to mention semantically incorrect.
Go to the top of the page
+Quote Post
Brazil2
post Apr 5 2013, 11:39
Post #3





Group: Members
Posts: 149
Joined: 9-May 10
Member No.: 80499



QUOTE (xxy @ Apr 5 2013, 11:58) *
2 years ago, in win7 ultimate, with foobar2000 1.1.2, I used the way below to convert to wma:
------------------------------------------------------------------------------------------------------------------------------------
Encoder file: C:\Program Files (x86)\Foobar2000\cscript.exe


Recently, I reinstalled win7.
CLI encoder: C:\Program Files\Foobar2000\cscript.exe

Not the same location of Cscript.exe. Looks like you're now trying to use the x64 one to run a mix of x86 and x64 apps, this just can't work. The whole chain must be either x86 or x64.
Go to the top of the page
+Quote Post
xxy
post Apr 5 2013, 12:53
Post #4





Group: Members
Posts: 8
Joined: 3-October 11
Member No.: 94121



QUOTE (Brazil2 @ Apr 5 2013, 18:39) *
QUOTE (xxy @ Apr 5 2013, 11:58) *
2 years ago, in win7 ultimate, with foobar2000 1.1.2, I used the way below to convert to wma:
------------------------------------------------------------------------------------------------------------------------------------
Encoder file: C:\Program Files (x86)\Foobar2000\cscript.exe


Recently, I reinstalled win7.
CLI encoder: C:\Program Files\Foobar2000\cscript.exe

Not the same location of Cscript.exe. Looks like you're now trying to use the x64 one to run a mix of x86 and x64 apps, this just can't work. The whole chain must be either x86 or x64.

You mean the versions of windows? Sorry, I didn't describe them clearly. They are Win7 ultimate SP1 x64 & Win2003 R2 enterprise SP2.

And it seems that you are correct. This problem is caused by the version of cscript.exe.

In Win2003 R2 enterprise SP2, with 1.2.4 original, I used cscript.exe(version 5.6.0.8832)in C:\Windows\System32 instead of the one(version 5.8.7600.16385) which is from C:\Windows\System32 of Win7 ultimate SP1 x64, and flac was successfully converted to wma.

BUT, then in Win7 ultimate SP1 x64, with 1.2.3 CHS version, I used 3 different "cscript.exe"s, 5.6.0.8832 from win2003, 5.8.7600.16385 from C:\Windows\System32 of win7 & 5.8.7600.16385 from C:\Windows\SysWOW64 of win7, convertion was still failed.

What is wrong here?
Go to the top of the page
+Quote Post
marc2003
post Apr 5 2013, 14:13
Post #5





Group: Members
Posts: 4450
Joined: 27-January 05
From: England
Member No.: 19379



try this instead...

http://www.hydrogenaudio.org/forums/index....showtopic=90519
Go to the top of the page
+Quote Post
xxy
post Apr 5 2013, 14:50
Post #6





Group: Members
Posts: 8
Joined: 3-October 11
Member No.: 94121



Just now I did several experiments. It is almost sure that there is something wrong with invoking cscript.exe of Win7 ultimate SP1 x64.

In Win2003 R2 enterprise SP2, I copyed cscript.exe, WMCmd.vbs & a.flac to d:\, run cmd.exe -> D:\>cscript.exe "WMCmd.vbs" -silent -a_codec WMA9STD -a_mode 2 -a_setting Q98_44_2 -input d:\A.FLAC -output d:\A.wma. It appeared this:
----------------------------------------------------------------------------------------------------------
Microsoft ® Windows Script Host Version 5.6
© Microsoft Corporation 1996-2001

..25%..50%..75%.100%.
======== Encoding Completed ========
-------------------------------------------------------------------------------------------------------------
Convertion was successful.


In Win7 ultimate SP1 x64, I did the same as above. It appeared this:
----------------------------------------------------------------------------------------------------------
Microsoft ® Windows Script Host Version 5.8
© Microsoft Corporation 1996-2001

D:\WMCmd.vbs(375, 1) WScript.CreateObject: Can't find the automation class namedďWMEncEng.WMEncoderĒ //*This information is CHS originally, I translate it into English. So it may be different from that appears when you do the same experiment in Win7 ENG*//
-------------------------------------------------------------------------------------------------------------
or this:
----------------------------------------------------------------------------------------------------------
Microsoft ® Windows Script Host Version 5.6
Copyright © Microsoft Corporation 1996-2001. All rights reserved.

D:\WMCmd.vbs(375, 1) WScript.CreateObject: Could not locate automation class named "WMEncEng.WMEncoder". //*This is English originally. I changes nothing*//
-------------------------------------------------------------------------------------------------------------
Go to the top of the page
+Quote Post
db1989
post Apr 5 2013, 15:00
Post #7





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



As this is not a problem caused by foobar2000, Iím moving it to Other Lossy Codecs, where threads about WMA belong.

Searching Google for that message might bring you towards an answer. I found a couple of threads here reporting the same message in the past, but I donít think any definitive solution was attained. Users suggested ensuring that WM Encoder 9 and WMP 11 were installed, but some other users reported that doing so did not resolve the error. However, you should check for yourself in greater depth as I only skimmed a few results.
Go to the top of the page
+Quote Post
marc2003
post Apr 5 2013, 15:04
Post #8





Group: Members
Posts: 4450
Joined: 27-January 05
From: England
Member No.: 19379



i must confess not reading the thread properly first time round. it simply looks like you haven't got the windows media encoder codecs installed.

i think this is it....

http://www.microsoft.com/en-us/download/de...s.aspx?id=17792
Go to the top of the page
+Quote Post
xxy
post Apr 5 2013, 16:37
Post #9





Group: Members
Posts: 8
Joined: 3-October 11
Member No.: 94121



QUOTE (db1989 @ Apr 5 2013, 22:00) *
As this is not a problem caused by foobar2000, Iím moving it to Other Lossy Codecs, where threads about WMA belong.

Searching Google for that message might bring you towards an answer. I found a couple of threads here reporting the same message in the past, but I donít think any definitive solution was attained. Users suggested ensuring that WM Encoder 9 and WMP 11 were installed, but some other users reported that doing so did not resolve the error. However, you should check for yourself in greater depth as I only skimmed a few results.

I have just tried wme64_jp & wme64_en, the problem remains.

(PS:thanks for the wme64 download links from @lvqcl)

This post has been edited by xxy: Apr 5 2013, 16:38
Go to the top of the page
+Quote Post
lvqcl
post Apr 5 2013, 17:11
Post #10





Group: Developer
Posts: 3358
Joined: 2-December 07
Member No.: 49183



QUOTE (xxy @ Apr 5 2013, 19:37) *
I have just tried wme64_jp & wme64_en, the problem remains.


Try these settings:

Encoder file: C:\Windows\Sysnative\cscript.exe
Extension: wma
Parameters: "c:\Program Files\Windows Media Components\Encoder\WMCmd.vbs" -silent -a_codec WMA9STD -a_mode 2 -a_setting Q98_44_2 -input %s -output %d
Format: Lossy
Highest BPS: 16
Go to the top of the page
+Quote Post
xxy
post Apr 5 2013, 18:28
Post #11





Group: Members
Posts: 8
Joined: 3-October 11
Member No.: 94121



QUOTE (lvqcl @ Apr 6 2013, 00:11) *
QUOTE (xxy @ Apr 5 2013, 19:37) *
I have just tried wme64_jp & wme64_en, the problem remains.


Try these settings:

Encoder file: C:\Windows\Sysnative\cscript.exe
Extension: wma
Parameters: "c:\Program Files\Windows Media Components\Encoder\WMCmd.vbs" -silent -a_codec WMA9STD -a_mode 2 -a_setting Q98_44_2 -input %s -output %d
Format: Lossy
Highest BPS: 16

Bingo! It works! Amazing!

Thank you, lvqcl.

The key is C:\Windows\Sysnative\cscript.exe.
Creating a folder named Sysnative in C:\Windows\ is not needed. Just changing system32 to sysnative is enough.
Also it doesn't matter parameters is"c:\Program Files\Windows Media Components\Encoder\WMCmd.vbs" , "d:\WMCmd.vbs", or "C:\Program Files (x86)\Foobar2000\WMCmd.vbs"

Why? I really don't understand.

I just specially observed the taskmgr.exe when encoding, and found that cscript.exe's "Image Path Name" shew C:\Windows\System32\cscript.exe , "Command Line" shew "C:\Windows\Sysnative\cscript.exe" "D:\WMCmd.vbs" -silent -a_codec WMA9STD -a_mode 2 -a_setting Q98_44_2 -input "F:\temp-***.wav" -output "F:\***.wma"
Another thing I noticed is that a conhost.exe was run when cscript.exe was invoked.

Go to the top of the page
+Quote Post
db1989
post Apr 5 2013, 18:39
Post #12





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (xxy @ Apr 5 2013, 18:28) *
Creating a folder named Sysnative in C:\Windows\ is not needed. Just changing system32 to sysnative is enough.
You mean you found this folder to be present already when you had the idea to look for it, rather than advising users to rename system32! wink.gif The latter would almost certainly be blocked by the OS but is a bad idea in any case.

As for the reasoning, once again, it is easy to find by putting the logical terms into Google. Here:
QUOTE
As the Microsoft articles explain, Windows 64-bit versions will redirect any request of a 32-bit program like e.g. Total Commander to access %windir%\system32 to a folder named %windir\SysWOW64. But the 32-bit program will believe it actually sees %windir%\system32.

[…]

On the listed Windows versions, there is an invisible alias name SysNative which points to system32. Only 32-bit applications can use the alias SysNative. If a 32-bit application requests to access %windir%\Sysnative it will not be redirected to SysWOW64 instead, but it will access the real %windir%system32 folder.

Using the alias SysNative is the recommended way of accessing the real system32 folder.
link

Perhaps this information will help others in the future. It was news to me, anyway, but then I haven’t yet used a 64-bit version of Windows in sufficient depth to have encountered it naturally.

This post has been edited by db1989: Apr 5 2013, 18:46
Go to the top of the page
+Quote Post
xxy
post Apr 5 2013, 19:09
Post #13





Group: Members
Posts: 8
Joined: 3-October 11
Member No.: 94121



QUOTE (db1989 @ Apr 6 2013, 01:39) *
QUOTE (xxy @ Apr 5 2013, 18:28) *
Creating a folder named Sysnative in C:\Windows\ is not needed. Just changing system32 to sysnative is enough.
You mean you found this folder to be present already when you had the idea to look for it, rather than advising users to rename system32! wink.gif The latter would almost certainly be blocked by the OS but is a bad idea in any case.

As for the reasoning, once again, it is easy to find by putting the logical terms into Google. Here:
QUOTE
As the Microsoft articles explain, Windows 64-bit versions will redirect any request of a 32-bit program like e.g. Total Commander to access %windir%\system32 to a folder named %windir\SysWOW64. But the 32-bit program will believe it actually sees %windir%\system32.

[Ö]

On the listed Windows versions, there is an invisible alias name SysNative which points to system32. Only 32-bit applications can use the alias SysNative. If a 32-bit application requests to access %windir%\Sysnative it will not be redirected to SysWOW64 instead, but it will access the real %windir%system32 folder.

Using the alias SysNative is the recommended way of accessing the real system32 folder.
ólink

Perhaps this information will help others in the future. It was news to me, anyway, but then I havenít yet used a 64-bit version of Windows in sufficient depth to have encountered it naturally.

Yes, db1989, I do advise renaming system32 to sysnative! laugh.gif
Thanks for your link

By the way, I did use this setting "C:\Program Files (x86)\Foobar2000\cscript.exe" to encode wma, with foobar2000 1.1.2 CHS version in win7 x64 ultimate sp1 in the last 2 years.

So strange. I really can't explain it.

This post has been edited by xxy: Apr 5 2013, 19:09
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd August 2014 - 05:57