Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64 (Read 17566 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

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?

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #1
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.

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #2
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.

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #3
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?


cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #5
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*//
-------------------------------------------------------------------------------------------------------------

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #6
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.

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #7
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

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #8
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)

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #9
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

 

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #10
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.


cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #11
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!  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.

cscript.exe/WMCmd.vbs do not launch on Windows 7 Ultimate SP1 x64

Reply #12
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!  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! 
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.