+ Post New Thread
Results 1 to 5 of 5
Windows Server 2008 R2 Thread, Script not running within GP in Technical; So I'm a bit cheesed off with my Group Policy and I'm a bit stuck now. I've got a piece ...
  1. #1

    Join Date
    Nov 2007
    Location
    Rotherham
    Posts
    1,679
    Thank Post
    122
    Thanked 126 Times in 102 Posts
    Rep Power
    46

    Script not running within GP

    So I'm a bit cheesed off with my Group Policy and I'm a bit stuck now.

    I've got a piece of software that requires the registration key to be put in the registry under HKCU. So my choices were to require the user to input it the first time they use it (not really an option) or script it.

    I've written my script, tested it and I know it works. Created a GPO and have it apply to a security group of computers. the GPO makes the necessary file and registry security changes and then runs a login script to make the necessary registry changes that's enable using the User group policy processing loopback. Now here is where we hit the problem. The scripts, as far as I can tell isn't running.

    The script works if I manually run it when the user logs in. My printer scripts that are set up identically are running. My other login script that modifies the registry works (though that IS applied to the user). It even works if I replace the the users login script to this one. The rest of the policy is applying as I can see the security changes but fo some reason this VBS script won't work.

    Any ideas what on earth could cause this as I'm stuck

  2. #2

    Join Date
    Nov 2007
    Location
    Rotherham
    Posts
    1,679
    Thank Post
    122
    Thanked 126 Times in 102 Posts
    Rep Power
    46
    An additional update. I created a new GPO and assigned it to my test user. I added my script into the Login Script key within group policy and... script works.

    So for some reason the new GPO I created that applies the security and the user login script isnt working and running the user setting. Whislt running the script for all users is not the end of the world I don't really want to be doing that for the sake of 15 computers. I just don't understand why the script won't run yet my printer scripts, which are set up in exacly the same way do.

  3. #3

    Join Date
    Aug 2007
    Location
    Deal, Kent
    Posts
    343
    Thank Post
    12
    Thanked 73 Times in 51 Posts
    Rep Power
    27
    Could be one of two things.

    1 - You say you applied the GP to a computer group, which unless has loopback enabled will not run the script at user logon.
    2 - User may not have permission to run cmd, or scripts, or registry editing for that matter

    I would recommend using Group Polict Client Side Extensions. You will have a nice GUI to add the reg entries with.

    Simon

  4. #4

    Join Date
    Nov 2007
    Location
    Rotherham
    Posts
    1,679
    Thank Post
    122
    Thanked 126 Times in 102 Posts
    Rep Power
    46
    Psyom,
    Yep I've got loopback running and yep the users do have permissions to run the scripts.
    I always forget about preferences for reg editing, might have a look.

    Interestingly after some trial and error I discovered the problem. If I apply the GPO to a computer group (thorough the security filtering) the lookback processing doesn't process the user config. If I put it back to "Authenticated" user it all works well.

    Given that I have to put a diffenet licence key into each comptuer and I really don't want to add rubbish to the registry on every computer I think I have three options:
    1: User Preferences with Item level targetting (machine name)
    2: Scripted applied to the whole network (the script looks at the machine name and only modifys the reg on certian machine but it means every machine has to run it

    Not really sure what the "Best" solution to that is... I don't want the script running unncessarily.
    Last edited by Stuart_C; 14th October 2010 at 01:14 PM.

  5. #5

    Join Date
    Aug 2007
    Location
    Deal, Kent
    Posts
    343
    Thank Post
    12
    Thanked 73 Times in 51 Posts
    Rep Power
    27
    Option 1 sounds like a winner to me.
    Si



SHARE:
+ Post New Thread

Similar Threads

  1. Running a script as administrator
    By mrbios in forum Scripts
    Replies: 5
    Last Post: 23rd September 2010, 03:20 PM
  2. Startup Script Running after login
    By glennda in forum Windows
    Replies: 6
    Last Post: 18th November 2009, 12:54 AM
  3. Login Script not running
    By adamf in forum Windows Server 2000/2003
    Replies: 8
    Last Post: 12th August 2009, 10:59 PM
  4. Replies: 21
    Last Post: 27th February 2009, 02:08 PM
  5. Script to check if app is running ...
    By pooley in forum Windows
    Replies: 4
    Last Post: 5th January 2009, 12:31 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •