从 WSH 或其他本地 Windows 程序访问 Win32 CreateEvent/SetEvent [英] Accessing Win32 CreateEvent/SetEvent from WSH or other native Windows program

查看:25
本文介绍了从 WSH 或其他本地 Windows 程序访问 Win32 CreateEvent/SetEvent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要与使用命名的程序套件进行交互.Win32 事件(例如,CreateEvent() API)在运行的进程之间进行通信.

I need to interface with a program suite that uses named. Win32 Events (eg, CreateEvent() API) to communicate between running processes.

我可以用一些非常简单的 C 代码来做到这一点

I'm able to do this with some very simple C code

 h = CreateEvent(NULL, FALSE, FALSE, argv[1]);
 if (h != INVALID_HANDLE_VALUE) SetEvent(h);

但是,由于政策问题,我无法在生产机器上安装自定义二进制文件!

However, due to policy issues, I can't install custom binaries on production machines!

有没有办法用 Windows Scripting Host 做到这一点?

Is there a way to do this with Windows Scripting Host?

我可能会将签名的二进制文件添加到生产环境中 - 因此其他脚本语言可能是可行的.欢迎提出建议.

I could possibly get signed binaries added to the production environment - so other scripting language might be viable. Recommendations are welcome.

推荐答案

我无法在生产机器上安装自定义二进制文件!...我可能会将签名的二进制文件添加到生产环境中

I can't install custom binaries on production machines! ... I could possibly get signed binaries added to the production environment

签署您自己的二进制文件.

Sign your own binaries.

制定允许您运行任意 WSH 程序但不允许运行二进制文件的政策的人应该为您的代码签名证书付费.

Whoever instituted such a policy that allows you to run arbitrary WSH programs but not binaries should pay for your code-signing cert.

这篇关于从 WSH 或其他本地 Windows 程序访问 Win32 CreateEvent/SetEvent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆