windows-services

Listening to TFS Work item state change using C# window service

偶尔善良 提交于 2021-02-08 10:21:04
问题 I am working on a project where i need to sync data (tickets) from help desk department to TFS and vice-a-versa. i am able to add item in TFS using windows service and its running fine. but, Whenever a work item's status is change in TFS, i want to update the same in Help desk system. so for that i need an event listener kind of things which can listen to TFS work item status change. I am using TFS2010 API and i also looked into ISubscriber. but it look like i need to develop plug-in and put

Can I develop a windows service, that can be both a windows service and a (<any type>) application?

∥☆過路亽.° 提交于 2021-02-08 08:32:16
问题 Suppose I want to create a windows service, but as I want to debug it, (and there may be other reasons...) I want to create an application that can be build as a windows service OR application. How do i do that ? Can you do that by Building the functionality of your service in a service helper application, say serviceHelper and implement start and stop methods and whatever you need in there ? Can you then create a very very small windows-service who's start and stop, etc you need are

Microsoft.Office.Interop.Excel PrintOut Throws Error

限于喜欢 提交于 2021-02-08 06:57:22
问题 I'm using Microsoft.Office.Interop.Excel in a .Net Framework 4.5 Windows Service project on my 64bit Windows 7 desktop workstation and everything appears to be working except the PageSetup properties and more importantly the PrintOut method of the Worksheet object. Here's the code: Microsoft.Office.Interop.Excel.Application ExcelApp = null; Microsoft.Office.Interop.Excel.Workbook WBook = new Microsoft.Office.Interop.Excel.Workbook; Microsoft.Office.Interop.Excel.Worksheet WSheet = new

Why does DriveInfo.GetDrives() not get network mapped drive in windows service

牧云@^-^@ 提交于 2021-02-07 14:51:17
问题 I have a windows service developed in .NET C# using VS 2010, I'm calling the DriveInfo.GetDrives() but it is not getting the Z: drive (a mapped network drive), I did some googling and found some results pointing to windows account privileges, so I have tried all account types of service installer such as LocalSystem, User, LocalService, NetworkService but none worked and I still can't get the drive Z: . I did another test, debugging the windows service (as a console application) and I can get

Why does DriveInfo.GetDrives() not get network mapped drive in windows service

偶尔善良 提交于 2021-02-07 14:51:04
问题 I have a windows service developed in .NET C# using VS 2010, I'm calling the DriveInfo.GetDrives() but it is not getting the Z: drive (a mapped network drive), I did some googling and found some results pointing to windows account privileges, so I have tried all account types of service installer such as LocalSystem, User, LocalService, NetworkService but none worked and I still can't get the drive Z: . I did another test, debugging the windows service (as a console application) and I can get

Starting a windows application from a windows service

懵懂的女人 提交于 2021-02-07 12:10:18
问题 I am trying to start a windows application from a windows Service using the below code Process.Start(@"filename.exe"); In windows 7 I receive a popup that says, "A program running on this computer is trying to display a message" 回答1: have a look at the following link: http://www.codeproject.com/KB/vista-security/SubvertingVistaUAC.aspx 回答2: You cannot start an interactive application from a Windows Service. This was changed in Windows Vista and 7. Some other advice was given in this Stack

Starting a windows application from a windows service

烂漫一生 提交于 2021-02-07 12:06:34
问题 I am trying to start a windows application from a windows Service using the below code Process.Start(@"filename.exe"); In windows 7 I receive a popup that says, "A program running on this computer is trying to display a message" 回答1: have a look at the following link: http://www.codeproject.com/KB/vista-security/SubvertingVistaUAC.aspx 回答2: You cannot start an interactive application from a Windows Service. This was changed in Windows Vista and 7. Some other advice was given in this Stack

How to run a program from windows service with administrator privileges

瘦欲@ 提交于 2021-02-07 06:47:14
问题 I created a windows service that runs a program on windows startup, but with this solution the program runs without administrator privileges. However, if I run the program by click on the program's shortcut on the Start menu, it runs with administrator privileges I used this code to run the program: ApplicationLoader.PROCESS_INFORMATION procInfo; ApplicationLoader.StartProcessAndBypassUAC(program_name, out procInfo); So how to run this program with administrator privileges? Thanks 回答1: To run

Is it possible to run Orleans hosted within Windows Service

十年热恋 提交于 2021-02-06 11:26:57
问题 Please, point me out if there are any direct methods to run Orleans hosted within Windows Service. If there are no direct methods, then are there any indirect methods of doing that? Thank you in advance 回答1: Note: this is for v1.x Orleans. 2.x configuration changed quite a bit Here's a topshelf based sample. referencing https://github.com/migrap/Topshelf.Orleans static void Main() { HostFactory.Run(c => { c.Service<OrleansService>(s => { s.ConstructUsing(sc => { sc.ConfigFileName(

Is it possible to run Orleans hosted within Windows Service

北慕城南 提交于 2021-02-06 11:23:01
问题 Please, point me out if there are any direct methods to run Orleans hosted within Windows Service. If there are no direct methods, then are there any indirect methods of doing that? Thank you in advance 回答1: Note: this is for v1.x Orleans. 2.x configuration changed quite a bit Here's a topshelf based sample. referencing https://github.com/migrap/Topshelf.Orleans static void Main() { HostFactory.Run(c => { c.Service<OrleansService>(s => { s.ConstructUsing(sc => { sc.ConfigFileName(