Solved

Toggle Service State at Login/Logoff

Posted on 2014-01-08
6
403 Views
Last Modified: 2014-01-14
We plan to utilize our logged-off workstations for renderings (via Autodesk's Backburner software) but want it set up so that when a user logs in, their workstation is removed from the pool of available render nodes.  The easiest way to do this seems to be by stopping the Backburner service when a user logs in, and starting the service when they log out.

I know I can do this via login/logoff script ("net stop/start BACKBURNER_SRV_200"), but is there a way to do this with a GPO policy (or other)?  I've otherwise eliminated the need for login/logoff scripts and would like to avoid them if possible.  Thanks!
0
Comment
Question by:pcamis
6 Comments
 
LVL 22

Accepted Solution

by:
Matt V earned 300 total points
ID: 39766378
I think the only way you can do this is assigning a script via GPO to run at logon/logoff.  No matter how you do it, you will need the start/stop script file to do it.
0
 
LVL 53

Assisted Solution

by:Will Szymkowski
Will Szymkowski earned 200 total points
ID: 39766880
You have to be able to run this when the user logs in so a GPO startup script and a GPO logoff script would be required. You could also probably do something like this from a scheduled task as well via GPO.

GPO Scheduled Task - http://technet.microsoft.com/en-us/library/cc725745.aspx

Will.
0
 

Author Closing Comment

by:pcamis
ID: 39768582
Thanks guys - that's what I figured, but thought I'd inquire.  I like the idea of setting it via schedule, Will, but we also want to leave the possibility open of using workstations when a user is out of the office on any particular day.  Cheers!
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 54

Expert Comment

by:McKnife
ID: 39771887
>   I like the idea of setting it via schedule, Will, but we also want to leave the possibility open of using workstations when a user is out of the office on any particular day.
Seems you are not familiar with task triggers. Tasks can be triggered by logon/logoff events, so that's exactly what you need.
0
 

Author Comment

by:pcamis
ID: 39779289
McKnife - looks like I jumped the gun on conceding that I was stuck with logon/logoff scripts.  Task Scheduler triggers seem to be working perfectly!  If I had a way to award extra points to you, absolutely would.  Thank you VERY much for the clarification (and again to Will for leading me in this direction).

For reference, I created two tasks:

Title: Enable Backburner
Run whether user is logged on or not / Run with highest privileges
Trigger: On an event (Log: System; Source: Winlogon; Event ID: 7002)
Action: Start a program (Program: cmd.exe; Arguments: /c "net start BACKBURNER_SRV_200")

Title: Disable Backburner
Run whether user is logged on or not / Run with highest privileges
Trigger: At log on (At log on of any user)
Action: Start a program (Program: cmd.exe; Arguments: /c "net stop BACKBURNER_SRV_200")
0
 
LVL 54

Expert Comment

by:McKnife
ID: 39779301
You're welcome and thanks for feedback.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question