Solved

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

Posted on 2013-05-22
5
626 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 53

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
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 Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

895 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now