Solved

Windows 7 Group Policy - Run a script when group policy applies outside of logon/logoff scripts

Posted on 2013-05-22
5
631 Views
Last Modified: 2013-06-20
Hey guys,

I have a VbScript that I want to run periodically whilst a user is logged onto their Windows 7 machine. The script backs up a file which is user specific to a directory on the network which is also user specific (although the user does have full access to both locations).

So I have this script running at logoff; however, our users have a tendancy to log onto multiple machines simultaneously, thus this is not always the perfect solution as this file is required to be up-to-date when the user logs onto another machine. As group policy re-applies approximately every 180mins (I believe), I would like to run this script to back up this file.

Is there a section in Group Policy that will allow me to have this script run when Group Policy applies?

**Note: I am trying to avoid using task scheduler due to problems in consistancy we have had with it in the past.

Hope someone can help.
Cheers,
G_M
0
Comment
Question by:G_M
5 Comments
 
LVL 54

Accepted Solution

by:
McKnife earned 500 total points
ID: 39187272
No, this is not possible. If you try to have GPO background refresh trigger the execution of a script, then you would have to tie the script execution to that event... this is only possible via scheduler which you are trying to avoid.

So please solve your problem with scheduler eithere here or with Microsoft support.
0
 
LVL 16

Expert Comment

by:ThinkPaper
ID: 39187279
Unfortunately, the way you are asking is not possible. In order for your script to run at regular intervals, it will need to be set as some kind of scheduled task (which you say you don't want to do).

With your current setup, you could try to eliminate the issue with multiple logons by either 1) restrict logon so that users are only allowed to log on 1 machine at a time or 2) update the script to include a timestamp of the user's logon and store it on the user's profile (i assume it's roaming?). this way you can use the timestamp to check which one the user is logged on currently vs current time and back up THAT one versus a previous logged on machine.
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 39187747
Why dont you use Folder Redirection ???

This way any files users work on within their "My Documents" or "Desktop" will always be backed up and current no matter how many workstations they simultaneously log into.
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

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.
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

792 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