Windows 脚本主机的 DotNet 版本

发布于 2024-07-09 14:19:23 字数 290 浏览 6 评论 0原文

早上好,

我在一家小商店工作(只有我们两个人),我们目前管理更多我们想要的 .vbs 脚本(我们想管理零)。 这些脚本的好处之一是可以快速进行更改(根据需要)并返回我们的日常工作。

这一切都很好,直到我们决定需要对工作进行重大改变,然后使用 PITA 来开发和调试,主要是因为感觉就像我在用棒球棒打台球一样。

是否有一种更 DotNet 风格的方法来完成人们已经使用和喜欢的类似 Windows 脚本主机的操作? 当然,我更喜欢免费/便宜的工具。

问候,

-艾伦。

Good morning,

I work in a small shop (only two of us) and we currently manage more .vbs scripts that we would like to (we would like to manage zero). One of the nice things about these scripts is that it's quick to make changes (as necessary) and go back to our day jobs.

That's all nice and good until we decide that the job needs to be changed substantially, and then a PITA to develop and debug, mostly because it feels like I'm shooting pool with a baseball bat.

Is there a more DotNet-y way to do Windows Scripting Host-like stuff that people have used and like? I'd prefer free/cheap tools, naturally.

Regards,

-Alan.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

掐死时间 2024-07-16 14:19:23

PowerShell 是“下一代基于 .NET 的脚本编写平台” ”来自微软。 我还没有详细研究过它,但据我所知,它试图将 Unix 风格管道的简单性与丰富对象模型的强大功能结合起来。

当然,我不能确切地说它是否完全符合您想要实现的目标 - 但它确实值得一看。

还有其他适合脚本编写的 .NET 语言 - 有动态语言,例如 IronRubyIronPython,以及 Boo(大部分是静态的,但可以在您想要的地方进行鸭式输入)。

PowerShell is the "next generation, .NET-based scripting platform" from Microsoft. I haven't looked at it in detail, but from what I've heard it's trying to combine the simplicity of Unix-style pipelines with the power of a rich object model.

Whether or not it fits in with exactly what you want to achieve is something I can't really say, of course - but it's certainly worth a look.

There are other .NET languages which are amenable to scripting - there are the dynamic languages such as IronRuby and IronPython, and also Boo (mostly static, but with duck-typing where you want it).

过期以后 2024-07-16 14:19:23

我刚刚偶然发现 http://www.csscript.net 它可以让你执行小的 C# 脚本(无需编译) 。 它是开源的。

“CS-Script 将 C# 和 FCL 的强大功能和丰富性与脚本系统的灵活性相结合。CS-Script 对于系统和网络管理员、开发人员和测试人员非常有用。对于任何需要自动化来解决各种编程任务的人来说”。

I just stumbled upon http://www.csscript.net which let's you execute little c# scripts (no compiling). It's opensource to boot.

"CS-Script combines the power and richness of C# and FCL with the flexibility of a scripting system. CS-Script can be useful for system and network administrators, developers and testers. For any one who needs an automation for solving variety of programming tasks."

蓝咒 2024-07-16 14:19:23

尝试修复 VBScript 的未来是有问题的。 微软表示他们是 致力于保持下去(第二条)。 然而,虽然有 JScript.NET,但还没有 VBScript.NET 的迹象。

除了 JScript.NET 之外,还有多种方法可以解决此问题,例如 DOTNET Scripting Host (DSH)

所以 VBScript 似乎或多或少还活着而且很好。 不久前甚至有一篇 CodeProject 文章 使用 VBScript 编写 .NET 应用程序脚本

这最终是你的选择; 对我来说,学习 PowerShell 并不是我要做的事情的首要任务,所以我会继续学习 VBScript,正如 Fozzie Bear 所建议的那样,“希望有更好的东西出现”。

Trying to get a fix on the future of VBScript is problematic. Microsoft have said that they're committed to keeping it going (second entry). However, whilst there is a JScript.NET there's no sign yet of a VBScript.NET.

There are various approaches to the issue apart from JScript.NET, for example DOTNET Scripting Host (DSH).

So VBScript seems to be more or less alive and well. A while back there was even a CodeProject article Scripting .NET applications with VBScript.

It's ultimately your choice; for me learning PowerShell is not high on my list of things to do, so I'll just plod on with VBScript as it stands and, as Fozzie Bear suggests, "hope that something better comes along."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文