Will msscript.ocx stop working on Windows 8?

折月煮酒 提交于 2020-01-06 15:52:11

问题


As mentioned here, this component became a part of the windows operating system. However VB6 runtime may not be supported on Windows 8 and beyond. So I'm afraid this component may be going away too (even tho it is a part of windows OS). We are going to be attempting to utilize it via a C# consumer using Interop.MSScriptControl.dll, very soon. I've even seen some folks have issues with it on Windows7. Has anyone had success running it on Windows 7 and Windows Server 2008 R2? Does anyone think it will still work on Windows 8? Currently compiling for x86 32-bit CPU with thought that 64 bit system would use WoW64 to use it. Thanks!


回答1:


The ScriptControl (msscript.ocx) is specific to 32bit Windows and is specific to older languages that cannot interact with the CLR/.Net. It continues to exist on Windows 7 in C:\Windows\System32 for 32bit and C:\Windows\SysWOW64 for 64bit. With Microsoft slowly phasing out 32bit portions of the Windows OS, this will eventually go away, too. When that may happen is anyone's guess, though.

There is a .Net equivalent though that can be used in 32bit and 64bit flavors of the Windows OS.

.Net 1.1 and up provides this functionality through Visual Studio for Applications. An example project for this is on CodeProject named VSA Scripting in .NET.

With .Net 3.5 this functionality has been deprecated in favor of Powershell using the System.Management.Automation namespace. An example project for this is on CodeProject named How to run PowerShell scripts from C#.



来源:https://stackoverflow.com/questions/4110072/will-msscript-ocx-stop-working-on-windows-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!