Comments:
Comments:
Thanks David. I really appreciate it!
Have a great weekend.
Audi :-)
How can i Hide Window when running console application which running by TaskScheduler.
Below the code i have written to create task.
TaskDefinition td = ts.NewTask();
td.RegistrationInfo.Description = "Convert TO HL7 Message";
td.Settings.Hidden = true;
TimeTrigger tt = new TimeTrigger();
tt.StartBoundary = DateTime.Now;
tt.Repetition.Interval = TimeSpan.FromMinutes(1);
tt.Repetition.Duration = TimeSpan.FromDays(1);
td.Triggers.Add(tt);
string argument = textBox1.Text.Replace(' ', '^');
argument = argument + "$" + textBox2.Text.Replace(' ', '^');
argument = argument + "$" + textBox3.Text.Replace(' ', '^');
string exePath = System.Configuration.ConfigurationManager.AppSettings["ConvertToHL7ExePath"].ToString(); td.Actions.Add(new ExecAction(exePath, argument, null)); ts.RootFolder.RegisterTaskDefinition(@"Test", td);
I think you can try some combination of calling the cmd.exe with the start command. I haven't tested this, but I would try something like:
cmd.exe /c start /min executable.exe
Does anyone know if there's a way to create a weekly trigger with multiple days? I have only been able to schedule with a weekly trigger on one specific day, or alternatievly on all days. So, for example, I can say:
td.Triggers.Add(new WeeklyTrigger { StartBoundary = DateTime.Today + TimeSpan.FromHours(2), DaysOfWeek = DaysOfTheWeek.Friday });
It's also possible to specify DayOfWeek = DaysOfTheWeek.AllDays
But what about specifying more than one, but fewer than seven, days on each week (e.g. start the task on Tuesday, Wednesday, and Friday)?
Of course, I could schedule three separate weekly tasks, one to run on Tuesday, one on Wednesday, and one on Friday, but that's a workaround I'll use as a last resort, as it would be cleaner to schedule one weekly task, to run on multiple days, if possible.
I've figured it out. This can be done using the or concatenator "|" between days so, for example, DaysOfTheWeek.Friday | DaysOfTheWeek.Saturday.
A slight problem I've had, which is probably why I didn't figure this out right away, is that I'm working in VB and most of the examples on here are in C#, so I have been trying to understand the examples based on my rudimentary knowledge of C#, or by using the websites that translate beween VB and C#, but those websites don't always do the translation correctly. For those of you coding in VB, the method to include multiple days with a weekly trigger is to use the word "Or" as the concatenator, so for example, DaysOfTheWeek.Friday Or DaysOfTheWeek.Saturday.
In any case, I've got this resolved. By the way, this scheduler is an excellent piece of software.
Why the antiviruses detect a riskware in the library?
Is it false detection? Or library actually have any dangerous parts?
Alas, I have the opposite problem in that I am much more proficient in C# than VB. If you end up with sample code in VB that you would like to share, please pass it along and I'll include it in the documentation.
I'm glad you're finding value in the library. Please take the time to rate it on the download page.
The library is just compiled .NET code referencing a COM library. I have never had anything show up in my antivirus scans on my computer using McAfee. All referenced libraries in the Editor assembly are also compiled code using no referenced work. I'm guessing it is a false detection. The ZIP file was scanned by WinZip as it was made and before I uploaded it to CodePlex. Looking at your link, it does appear that your antivirus software has problems with MSIL which is at the heart of any .NET library.
Actually, I've checked some other .NET libraries and no any riskware was found inside of them. Also I've downloaded source code and recompiled it by self. Just after that antivirus software found nothing. But after some hours I've repeatedly checked the same library and again Kaspersky found "not-a-virus".
I undestand it is false detection, but the problem is some mail servers don't undestand that, so I have to pack program in the archive with a password in order to send it through the mail.
P.S.: stupid antivirus software :(
I did that. Actually, you ought to talk to Microsoft about incorporating it into the .Net framework. I'm surprised that the framework lacks classes natively that do what your libary does.
Hello,
Just wondering were there any updates on enhancing you base COM library for Windows 8 RTM?
I'm installing the SDK's today to compare them (Win 7 vs. Win 8). Unfortunately Microsoft has not released any notes regarding changes. Once compared, I will make the changes to the base .NET library. Later this month I will get Windows 8 installed and can update the UI components to match the new UI.