This script finds out if the logged on user is a member of a group. This is very handy for logon scripts.
' Find the user logged in
Set WSHShell = CreateObject("WScript.Shell")
UserLoggedIn = WshShell.ExpandEnvironmentStrings("%username%")
'Run the functions if the user is a member of the group
Set oGroup = getobject("WinNT://kbomb.local/" & "Domain Admins")
For Each oMember in oGroup.Members
If lcase(oMember.Name) = lcase(UserLoggedIn) Then
wscript.echo "reg modification code here"
wscript.echo "file modification code here"