Solved

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

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Suggested Solutions

Resolve DNS query failed errors for Exchange
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…

757 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