Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-05-22
5
Medium Priority
?
664 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 56

Accepted Solution

by:
McKnife earned 2000 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This process allows computer passwords to be managed and secured without using LAPS. This is an improvement on an existing process, enhanced to store password encrypted, instead of clear-text files within SQL
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
Suggested Courses

604 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