Windows 7 User Logon and Logoff Scripts

I added login and logoff scripts under the Local Group Policy Editor, User Configuration, Windows Settings, Scripts.  The scripts reside in the root of the C drive.   The scripts dont seem to be working.  When I click on "To view the Script Files stores in this Group Policy Object", nothing appears.

This is a normal script, no a Powershell script.

I googled something about having to activate the Powershell Script feature.  Do I also need to activate the normal script feature?    Thanks!

jscnsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

howejustinCommented:
Put the scripts in your System32 folder and see how that works for you (or add the root of C to your system path locations). I presume that in order to execute and call/see those scripts, it's looking in any of the pre-defined path locations (of which System32 is in by default).
0
RobSampsonCommented:
If you are using Group Policy, put the scripts in the folder
\\domain.com\sysvol\domain.com\scripts

or simply
\\yourdc\netlogon

Then just put the filename only in the script box to run.

Rob.
0
jscnsAuthor Commented:
Can sometime please answer my question and tell me if I need to do anything to active the script feature in Windows 7?
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

RobSampsonCommented:
No, for VBS scripts, (and even Powershell for Windows 7), there's nothing you need to do, besides point the Group Policy to the correct script location.  Usually, for Active Directory, scripts go into the Netlogon share of your Domain Controllers, and then in the Scripts dialog box where you enter the script, you just need to put its name, and not the path.

Regards,

Rob.
0
jscnsAuthor Commented:
I am running Windows 7 Professional.  Can you provide me with directions on how to "point the Group Policy to the correct script location'" ?  I have attached the directions for setting up the script.  Please see  page 4, step11 ...this is what I am trying to set up.    I dont know what Active Directory, Domain Controller, and Netlogin is......and I really dont need to ...just want to verify the script is working....I am unable to the dual screen feature to work.
Multi-Monitor-Setup-Guide--V4--2.pdf
0
RobSampsonCommented:
OK, my apologies.  I thought you were using Active Directory Group Policy, not local group policy.

Your scripts for logon should be copied to
C:\WINDOWS\System32\GroupPolicy\User\Scripts\Logon

and for logoff they should go to
C:\WINDOWS\System32\GroupPolicy\User\Scripts\Logoff

Then, when you click Show Files in the dialog, it will be displayed.  Then you can just put the script name, not the path, and it should run fine.

Regards,

Rob.
0
jscnsAuthor Commented:
I will do that.  However, I am wondering why the attached instructions tell me to put the script in the root of the C drive?  Any thoughts?
0
RobSampsonCommented:
I just tested it on Win7 32bit, by placing a script in C:\Temp\Test.vbs and then entering the full path in the Scripts dialog, and when I logged on, it ran fine.  How are you sure it's not running?  The Show Files button will only show files in the C:\WINDOWS\System32\GroupPolicy\User\Scripts\Logon folder.

If you test this script, it will write a file in the same folder you place the script, called Test.txt, and write "Hi" to it, when you log in.

Regards,

Rob.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Test.txt")
objFile.WriteLine "Hi"
objFile.Close

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jscnsAuthor Commented:
Thank you!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.