+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
Windows 7 Thread, Not running scripts in Technical; Hello, I have this problem of not running logon scripts, I have come up with the problem being that to ...
  1. #1

    Join Date
    Feb 2010
    Location
    Australia
    Posts
    26
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Not running scripts

    Hello,

    I have this problem of not running logon scripts, I have come up with the problem being that to many people log on at one time causesing it to get skipped, how can I stop this? I am wanting it to only be on the one server, so all users can access it and if it needs to get updated it is easy to do. It seems to only affect the Windows 7 machines. Though sometimes XP machine do it too.

    I do have this code in it, should I make it so it randomly makes and number between 100 and 200 and then run it?

    -->

    'Wait until the user is really logged in
    strUserName = ""
    While strUserName = ""
    WScript.Sleep 100 ' Wait 1 second
    strUserName = WSHNetwork.UserName
    Wend

    strUserDomain = WSHNetwork.UserDomain

    <--

    Thank you, C3sium

  2. #2

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,921
    Thank Post
    1,626
    Thanked 1,893 Times in 1,407 Posts
    Blog Entries
    2
    Rep Power
    429
    server 2008 (r2) or 2003 (r2)?

    this helps with the issue if we know which server its based on

  3. #3

    Join Date
    Feb 2010
    Location
    Australia
    Posts
    26
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hello,

    It is on windows server 2003 entiprise edition SP2

    Thank you, C3sium

  4. #4

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,756
    Thank Post
    3,265
    Thanked 1,052 Times in 973 Posts
    Rep Power
    365
    I think scripting on windows 7 is different because when I have been looking at wmi and other examples on the ms website or else where it states which operating systems support which ever methods you are using, also in the script example I did not see the creation of the network object ie

    Set WshNetwork = CreateObject("Wscript.Network")

    Or

    Set WshNetwork = Wscript.CreateObject("Wscript.Network")

    Also 1000 ms is one second , not 100 or 200.

    Other then that I don't have much time to look into it now but will come back to this later unless srochford or someone else can assist you in the mean time.

  5. #5
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,196
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    A few thoughts

    1. Have you set GP to 'Always wait for network at startup and logon'?
    2. Have you set run logon scripts synchronously in GP?

  6. #6

    Join Date
    Feb 2010
    Location
    Australia
    Posts
    26
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hello,

    The script runs fine when one at a time, but it is when it runs at the same time... it fails

    Also I did not write the script, or setup the GP.

    I will have a look at that tomorrow cookie, and report back.

    C3sium

  7. #7
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,196
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    Quote Originally Posted by C3sium View Post
    Hello,

    The script runs fine when one at a time, but it is when it runs at the same time... it fails

    Also I did not write the script, or setup the GP.

    I will have a look at that tomorrow cookie, and report back.

    C3sium


    I've had issues with scripts becoming unreliable when there's load on the servers as well but setting those two settings has always solved the problems.

  8. #8

    Join Date
    Feb 2010
    Location
    Australia
    Posts
    26
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hello,

    I have found both of those commands in the GP and have enabled both of them.
    Looks like I have found a new job, Looking through the GP and testing....

    I will give that a go today, see how they go over the course of the day and report back.

    Thank you Jamie.

  9. #9

    Join Date
    Feb 2010
    Location
    Australia
    Posts
    26
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hello,

    After a few periods of testing, it has reduced the number of computers affected but not completly.
    Any more ideas?

    Thank you, C3sium

  10. #10

    Dos_Box's Avatar
    Join Date
    Jun 2005
    Location
    Preston, Lancashire
    Posts
    9,912
    Thank Post
    596
    Thanked 2,165 Times in 990 Posts
    Blog Entries
    23
    Rep Power
    628
    Just a thought, how many domain controllers do you have?

  11. #11

    Join Date
    Feb 2010
    Location
    Australia
    Posts
    26
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hello,
    We have 2 domain controllers, and they mirror each other.
    Anyone got any ideas?? I had to run the script 10 times last period, very over it!
    C3sium

  12. #12

    Dos_Box's Avatar
    Join Date
    Jun 2005
    Location
    Preston, Lancashire
    Posts
    9,912
    Thank Post
    596
    Thanked 2,165 Times in 990 Posts
    Blog Entries
    23
    Rep Power
    628
    And the scripts are running from the netlogon share, and not a shared folder, yes?

  13. #13

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,756
    Thank Post
    3,265
    Thanked 1,052 Times in 973 Posts
    Rep Power
    365
    maybe way off the mark here so apologies in advance but if you did a gpupdate on both servers and then did a force replication and then tried again would that help ?

  14. #14
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,196
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    Quote Originally Posted by C3sium View Post
    Hello,

    After a few periods of testing, it has reduced the number of computers affected but not completly.
    Any more ideas?

    Thank you, C3sium


    As the others say check that your scripts are replicating to all of the netlogon folders.

    Can you clear the event log on an affected client then reboot it and check the event log again. Post any errors.

    It might be worth posting the script as well, what is it doing, drive mapping etc?


    You said it's affecting Windows 7 and XP boxes right?

  15. #15

    Join Date
    Feb 2010
    Location
    Australia
    Posts
    26
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by Dos_Box View Post
    And the scripts are running from the netlogon share, and not a shared folder, yes?
    The scripts are running from \\mserver\NETLOGON which is shared and student can access this folder and contents(more than likly they can change it too).

    mac_shinobi;
    maybe way off the mark here so apologies in advance but if you did a gpupdate on both servers and then did a force replication and then tried again would that help ?
    Can you post help on this topic to make sure I do it correctly.

    cookie_monster

    As the others say check that your scripts are replicating to all of the netlogon folders.

    Can you clear the event log on an affected client then reboot it and check the event log again. Post any errors.

    It might be worth posting the script as well, what is it doing, drive mapping etc?


    You said it's affecting Windows 7 and XP boxes right?
    When I compare the scripts they are the same, from the two servers.
    I will try to post the script and check the logs in the morning, at the moment it is 8:30pm here.
    the script remove drives then map the drives and maps printers and set default printer.
    Yes Windows 7 desktop(dell 780) and laptops(thinkpad r500) and some XP desktops.

    If you have any more ideas let me know.

    Thank you, C3sium.
    Last edited by C3sium; 23rd February 2010 at 09:39 AM.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 23rd September 2009, 01:06 PM
  2. Workstations not running Group Policies or Logon Scripts
    By richard_s in forum Windows Server 2000/2003
    Replies: 18
    Last Post: 6th August 2009, 11:46 AM
  3. Help running scripts within scripts
    By SimpleSi in forum *nix
    Replies: 7
    Last Post: 7th March 2008, 09:23 AM
  4. Vista isn't running logon scripts
    By woody in forum Windows Vista
    Replies: 6
    Last Post: 30th January 2007, 03:32 PM
  5. Scripts, Scripts, Scripts
    By wesleyw in forum Windows
    Replies: 18
    Last Post: 17th July 2006, 02:36 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
  •