如何将值从任务计划程序传递到我的Windows应用程序 [英] How Do I Pass Values From Task Scheduler To My Windows App
本文介绍了如何将值从任务计划程序传递到我的Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当任务调度程序运行application.exe时,我需要我的任务调度程序将字符串传递给我的Windows应用程序
I need my task scheduler to pass a string to my windows application when the task scheduler runs the application.exe
推荐答案
将其作为程序参数传递:你可以使用args
参数在Main方法中选择它们,或者如果它是WinForms应用程序,那么:
Pass it as a program argument: you can pick them up in your Main method using theargs
parameter, or if it is a WinForms app then:
string[] args = Environment.GetCommandLineArgs();
会这样做。
这篇关于如何将值从任务计划程序传递到我的Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文