Starting Windows Service As Standard User

Aug 4, 2010

My app (which runs ok as a standard user) requires updates to be installed, but I don't want to have to input the administrator username/password each time nor do I want to increase user privileges to administrator.

I have a windows service which handles the downloading of updates etc (running as Local System) but the start command needs to come from the main app (running as a standard user). This is not permitted and I get Access Denied.

I understand why this is happening but is there an alternative way to achieve this? I want to handle program updates as the standard user without using ClickOnce or installing to a non Program Files folder.

View 3 Replies


ADVERTISEMENT

Starting Up A Thread That Runs The Standard Windows Defrag Utility?

Apr 8, 2009

I have a app that is starting up a thread that runs the standard windows defrag utility. It also gives the user the option to cancel the defrag if they want to. Problem is if the thread defrag is running on is canceled is there any data loss or does it just do the last operation and then exit. For example the code goes something like this:

[Code]...

Code works exactly as it should, runs the defrag on a separate thread so my UI remains responsive. I'm just worried about the effect of the cancel on it, when you call a thread abort does the program running in the thread know it's being canceled and "cleanly" close? I don't want to abort a file move operation when it's defraging and end up with a corrupt file.

View 11 Replies

Starting A Windows Service On Remote PC?

Jan 22, 2009

Am trying the following to start a windows service

Try
Dim myController As New ServiceController("FCR GEFU Server 1", "10.1.1.208")
myController.Start()
TextBox1.Text = "Service Started"
Catch ex As Exception
TextBox1.Text = ex.Message
End Try

Am getting the following error:Cannot open Service Control Manager on computer '10.1.1.208'. This operation might require other privileges.How should I provide the log in credentials for the remote PC !?

View 9 Replies

VS 2008 Starting A Custom Windows Service?

Jul 5, 2010

I've created a Windows Service and installed it via InstallUtil so I can test it out.The installation goes seamlessly, but it will not start from some reason. When I attempt to start it, I get an "Access Denied" error and that's it.

I haven't been able to find any information via the normal channels.I first thought to give the service admin rights, but that didn't work either.

View 10 Replies

Windows Service To Monitor Programs Starting

Jan 14, 2009

I am trying to create a windows service that sits in the background waiting for programs to be started. When the programs start I want to be able to check a unique bit of information for each program (I believe GUIDs may provide this) to see what the program is. If the program is not allowed, I aim to provide a warning to the user and possibly close the program. The aim of the application is to identify when users are attempting to install additional software on to the computer so simply monitoring for a certain executable wouldn't work as msiexec is called for all MSI's and as I only want to stop blacklisted programs...this wouldn't work.

View 4 Replies

Create A Windows Service In Studio 2008 Standard (No Template)?

Dec 7, 2009

I want to create a Windows Service using VB.Net, but in VS2008 Standard, you don't seem to get the "Windows Service" template I've used before.

What's the best way of creating such a service, without resorting to using the C++ template?

View 2 Replies

VS 2010 Starting/Stopping Print Spooler (Windows Service)?

Jan 17, 2011

Since the coming of Windows7 at our office we have sometimes the issue that the print spool is crashing.Users don't have admin rights to restart the service so that leaves them only at restarting their computer as solution.Which costs alot of time... As we cannot find a final solution to this problem I've begin to write a small tool so they can restart it..I've only hard code a local admin account in the source for this operate for them..

[Code]...

View 14 Replies

Detect User Log On From A Windows Service

Jan 28, 2011

Is there for my .Net application to detect if a user has logged on? It is a Windows Service, so it will be running before logon.What I want to do is display a "popup" when a user logs on to tell them the status of the application

View 2 Replies

Allow User To Input A Value During The Msi Installation Of A Windows Service?

Feb 1, 2012

I currently have a windows service that is packaged up as an msi installer. However, during the installation i need the user to input their required filepath (to string) location. The filepath variable currently resides in my component class called MyNewService that is inherited from System.ServiceProcess.ServiceBase.

Is there anyway i can allow the user to define the filepath variable during installation?

View 1 Replies

C# - Web Service Do Not Return Current Windows User Name

Jan 26, 2010

This is the function that I use in web service for getting current windows user.

<WebMethod()> _
Function User() As String
Dim p() As String = Split(My.User.Name, "")

[code]....

When I run service on localhost it realy return current windows user name!The problem is when i run service from remote PC, in that case I got nothing from this function. What is problem with this service, and how I can get name of Windows user?

View 4 Replies

Possible To Programmatically Set The User Account For A Windows Service?

Aug 5, 2009

I have created a windows service that has the Account set to user. Which means that when I install the service I need to pass a user name and password. Is there a way to set these maybe in the ProjectInstaller class maybe in the BeforeInstall event? if so HOW?

View 6 Replies

Windows Service Access To User Files?

Aug 1, 2010

I've been developing in .NET (VB, C++, C#) for a number of years, but I am finally creating my first service application (in VB). I need to read/write to a file contained within a user's documents. As a service is not associated with a particular user, would a service have access to a user's documents? ...regardless if that user is signed on or not?

View 2 Replies

Windows Service Detecting User Log Off Event?

Aug 15, 2011

Recently while I was playing with VS 2008(VB), I have created an application for folder sync purpose... which is working fine. Then, I have created a windows service that does the same thing and it is also working fine(from application perspective). But, I have been trying to add some additional functionality to that new service. It keeps on running as long as System is ON.

But I would like to change the functionality to... as soon as user logs off Service should STOP, and should START when user logs into that PC. I tried to find some useful info online(related to my task) and all I could come up with was to add OnSessionChange(...) method to the service. But for some reason it is not working out for me(when I've logged off or other system events such as 'system lock').

[Code]...

View 3 Replies

Xml - Allow User To Input Value During On Start Of A Windows Service?

Feb 2, 2012

I need to get the user input for where they want the files that will be produced by my windows service to be stored.

I was thinking that i could do this by reading in the user's input to a variable in the on start event of my service? this variable is then later used in my xml writer.

View 2 Replies

Restrict Windows Service To Start After User Login?

Apr 20, 2012

I have developed a windows services that Log On As "Local System" account with Statup Type "Automatic". I understand that windows services starts before user logins. But I want my service to start when ever user logs in.

View 3 Replies

Windows Service Not Able To Read Current User's Registry?

Sep 9, 2009

I developed a windows service project using vb.net and windows service is installed with logon account as admin's user name and password. Target of windows service is to read the pst file path location from windows registry for currently logged user by accessing the following registry key

"HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionWindows Messaging SubsystemProfilesOutlook52a407cf2e436a4d8fe252d1d257465501f6700".

The problem is , windows service can able to read the admin pst file path location if admin is logged in windows. When other user logged in windows, service is not able to read currently logged user's pst file path location from registry because of windows service is configured with admin user name and password. so it always reads admin's pst file location.

View 1 Replies

Windows Service Passing Local User Id And Password

Feb 24, 2009

I'm writing a windows service in VB.Net and set the service process installer's "Account" property set to "User". So when I tried to install the utility using INSTALLUTIL.EXE it is prompting to enter the user id and password. So I wanted to suppress this "Set Service Logon" so added below code to ProjectInstaller.vb and I was able to do what ever I want: [code]

View 2 Replies

C# - Windows Service Installer For Different User Account (other Than Local System)?

May 1, 2012

Set objService = objWMIService.Get("Win32_BaseService")

objService.Create("usb2", "usb test", "c:usb2.exe",
OWN_PROCESS, NORMAL_ERROR_CONTROL, "Automatic", NOT_INTERACTIVE, null

[code].....

View 1 Replies

Unable To Start Process Under Different User Context From Windows Service?

Nov 24, 2010

I have a Windows Service that needs to start other processes under a user context other than that used by the service. I've seen other posts related to this but have seen no resolutionI've tried many things and have been unsuccessful in starting the process from a Windows Service when a username, password is supplied. orking as it's a requirement of our system to do this and it worked fine until recently and only fails on Vista and Windows 7 (works on XP).

The following code is used to start the process.
Dim P As New Process
P.StartInfo.Domain = Domain

[code].....

View 2 Replies

Windows Service - When User Connects To The Network Theservice Should Run The Exe File?

Mar 9, 2009

I have to schedule an exe file as windows service.The exe file should be triggered when user connects to the pariticular net work for ex: company network.User can connect/disconnect to the company n/w "n" number of times to the network in a day. so every time when user connects to the network theservice should run the exe file.

View 1 Replies

Service Created In VB Not Starting

Aug 24, 2010

We have service developed in Visul Basic .NET. This service utilizes some COM objects provided by SAP to access SAP database. This has been working fine till yesterday. On this Sunday, we upgraded the SAP system, and subsequently all other programs were also re-builded using the new DLL files (for the COM object). We tried doing the same for the service also. But it is not starting now. When started, it shows a message saying service terminated unexpectedly. This is probably due to the fact that it is not able to load the requisite DLL file.

View 1 Replies

Starting And Stopping A WCF Service

Oct 8, 2009

I have a WCF service, which I can open and close by doing:[code]The problem with this is I have "downtime" of the service in between myService. Close() and newService.Open(). if anyone tries to connect while this is happening it fails. how can I make the "downtime" as small as possibel?

View 12 Replies

.net - WCF Service Hosted In A Managed Windows Service Connect Using A WCF Service Application

Jul 14, 2011

i have a Windows service that is hosting a WCF service through net.tcp and this is working great. I have also created a WCF service application. I am trying to add the net.tcp service reference to the service application. Then I add it to the GAC that goes ok but if I try to RegAsm the WCF service application to allow it to be called from Server.CreateObject I get the error:

Warning: Type library exporter encountered a type that derives from a
generic class and is not marked as
[ClassInterface(ClassInterfaceType.None)]. Class interfaces cannot be
exposed for such types. Consider marking the type with
[ClassInterface(ClassInterfaceType.None)] and exposing an explicit
interface as the default interface to COM using the
ComDefaultInterface attribute.

It does not work. I have tried to call it through a class library but this does not work either as the end point is not set correctly.

View 1 Replies

What Difference Is Between Pausing / Resuming And Stopping / Starting A Service

Aug 25, 2010

I am developing a Windows Service in VB2008 and am in the testing stage. What I have noticed is that if I Pause it while it is busy doing something and then resume it, the process generates an error. While I am debugging this I wanted to determine exactly what the difference is between Pausing/Resuming and Stopping/Starting a service.I searched, but most results simply told me how to Stop/Start/Pause and Resume a service, a hurdle that I jumped over many years ago. Does any one know of any resources that go into detail what happens when a service is stopped vs when it is paused?From some experimentation, it seems that if I do not place any code in the OnPause and OnContinue events the Pause/Resume commands have no effect.

View 1 Replies

Error 1053 When Starting A Service (that Attempts To Print Some Text)

May 15, 2006

I have a small service which right now I just want to test by printing some string that is passed in and stored in a class.

Problem is everything works fine, service even starts fine as long as I don't call PrintDocument's Print function.

The moment I do that, the service never starts and I get Error 1053:Service didn't respond, etc error.

View 5 Replies

C# - Standard Windows Menu Bars In Windows Forms?

May 6, 2010

I noticed that adding a MenuStrip (from the Toolbox) to my form design doesn't yield a menu bar like many native Windows applications. Instead I get a menu bar like Visual Studio's own. None of the style settings for MenuStrip appear to mimic the much more common native menu bar.Is there a way to add a menu bar to my Windows Forms application that looks the same as the one you see in Notepad, Task Manager and others? (Preferably with the designer, but I wouldn't mind adding it programmatically either.)

View 3 Replies

"Underlying Connection Was Closed" Error On Windows Service But Only Occurs When A User Is Not RDP'd Into The Server?

Oct 6, 2009

I have a windows service I created that checks for data to post to an off site webservice over SSL. The service checks every 10 seconds for data to send, if there is data it opens a connection to the remote webservice, and closes the connection after 120 seconds (still checking for data to send during this time). The service works fine if a user is RDP'd into the server, but as soon as no one is logged on and the service attempts to push data, I receive the following error:"The underlying connection was closed: An unexpected error occurred on a send."I have tried running the service as a local service, network service, under my login, and under a service account, but nothing seems to work. The PC it is running on is a windows 2003 server (virtualized - vmware)

Protected Overrides Function GetWebRequest(ByVal Uri As Uri) As System.Net.WebRequest Dim oWebrequest As System.Net.HttpWebRequest = MyBase.GetWebRequest(Uri) oWebrequest.KeepAlive = False oWebrequest.ConnectionGroupName = Guid.NewGuid.ToString oWebrequest.ProtocolVersion =

[code]....

View 1 Replies

[VS 2005] Service Control Manager Privileges - Communicate With A Windows Service On A Remote Machine On The Network

Jul 23, 2009

I am trying to communicate with a Windows service on a remote machine on the network but i keep getting an exception saying the following: "System.InvalidOperationException: Cannot open Service Control Manager on computer 'machine001'. This operation might require other priviledges. ---> System.ComponentModel.Win32Exception: Access is denied.

[Code]...

View 4 Replies

Have A Dotnet Windows Service Which Monitor Other Services And Upon Stop Of Any Service?

Sep 18, 2009

Is it possible to have a dotnet windows service which monitor other services and upon stop of any service, the monitoring service would be able to start the stopped service.

View 4 Replies

Use Windows Search Service Instead Of The Old Indexing Service To Index Files?

Jul 7, 2009

In the past I had the indexing service installed on a Windows Server 2003 and used it to index files for my website. I did this by executing an OleDbCommand with a query and a connection string.How do I accomplish the same thing with the new "Windows Search Service" (Windows Server 2008) by using VB.NET? Does this work the same way so that I only need to change the Provider name which has been "MSIDXS.1" up to now? Case true, what is the new Provider name?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved