+ Post New Thread
Results 1 to 8 of 8
Windows 7 Thread, Long delays on Login and logout in Technical; Currently trying to create a Windows 7 image for deployment across some laptops. However I'm got a major snag where ...
  1. #1

    Join Date
    Mar 2007
    Posts
    427
    Thank Post
    16
    Thanked 16 Times in 10 Posts
    Rep Power
    19

    Long delays on Login and logout

    Currently trying to create a Windows 7 image for deployment across some laptops. However I'm got a major snag where domain users face a 5 minute or more delay logging in or out.

    Admin users don't get this error. The only thing I can see is that an executable file is run at login and logoff for all users. This .exe creates a log record (I use this on our XP clients) and I can see that non-admin users are not creating the log record.

    In the event viewer I see errors like this:
    The winlogon notification subscriber <GPClient> took 302 second(s) to handle the notification event
    - which explains the 5 minute delays!

    Not sure what to do with this one. These users work fine in XP so its not a permissions problem to the script/exe. Yet W7 is now useless to me with this sort of problem. We need to run the script as the data is creates is used a lot. The script itself has been working in XP clients for around 5 years!

  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,007
    Thank Post
    124
    Thanked 286 Times in 263 Posts
    Rep Power
    109
    Is it a log to a file or the system log?

  3. #3

    Join Date
    Mar 2007
    Posts
    427
    Thank Post
    16
    Thanked 16 Times in 10 Posts
    Rep Power
    19
    Basically its a VB.exe that gets the username/PC name etc and writes it to an SQL Database with the time and date etc.

    The users that 'hang' on Windows7 are working perfectly in XP - the log records appear and the VB.exe takes around 1 second to complete!

  4. #4

    Join Date
    Jan 2007
    Location
    Nottinghamshire
    Posts
    531
    Thank Post
    2
    Thanked 84 Times in 58 Posts
    Rep Power
    39
    Does it run on win7 normally as a limited user? 5 mins sounds like a network timeout issue, perhaps it doesn't have permissions to access the network at that point

  5. #5

    Join Date
    Mar 2007
    Posts
    427
    Thank Post
    16
    Thanked 16 Times in 10 Posts
    Rep Power
    19
    I ran it directly as a limited user and nothing happens. No error, no log entry and nothing appears in the event viewer. It uses SQLOLEDB to connect to the database and this seems to work OK as an admin, but times out as a non-admin.

    Putting some debug messages into the program shows that the database connection is timing out, but only if you're running it as a non-admin user.

    Bizarre - can't be a provider/connection issue then - but what policy setting would cause this!?

    And its not the firewall either, as I get the same results when the firewall is disabled. The program generates the error 'SQL Server not found or access denied' which is a pretty vague error meaning it couldn't connect.

    Think I'll have to call it quits on this one. Some bug within Windows 7 does not let a user connect to an SQL database using a standard connection string if its from within a program. If I use a UDL the user can connect fine so its not a connection or provider issue.

    Another nail in the coffin for W7 as far as I'm concerned. The list of unworkable problems is too long now!
    Last edited by GoldenWonder; 9th June 2010 at 10:41 AM.

  6. #6
    carvjo's Avatar
    Join Date
    Mar 2010
    Location
    Oxford
    Posts
    195
    Thank Post
    12
    Thanked 39 Times in 34 Posts
    Rep Power
    22
    Hi

    To get around the problem - run the logon/logoff exe as a scheduled task -

    Below is a command line that I use to create schtasks for WPKG on Windows7 machines - there are options available for on logon - or on user session connection and user session end

    schtasks /create /tn wpkg /rl highest /tr "\\SERVER\storage\wpkg-start.bat" /sc onstart /ru domain\user /rp password

    The key to getting it to work is the "highest" option - which does the elevation bit..

    alternatively create the tak in the GUI - by typing task in the Start-Search dialogue and following the steps..

    I hope this helps

    John

  7. #7

    Join Date
    Mar 2007
    Posts
    427
    Thank Post
    16
    Thanked 16 Times in 10 Posts
    Rep Power
    19
    The odd thing about this problem though is the user can connect to the database ok (I even installed the SQL Management tools and used a restricted user account to connect) and this application works 100% in XP. What I can't fathom is what has changed in W7 that stops a non admin user connecting to a database through a program like this! Even when I make the restricted account a local administrator of the machine it still doesn't work. Yet they can connect with the UDL so it must be a permissions issue or something to do with W7 and ODBC connections.

    I'll have a look at the scheduled tasks - I didn't know there was a 'on logon' option. Cheers for the info

    Edit: This is more bizarre! I installed VB6 on the W7 machine and ran the app in debug mode, line by line. It worked fine. Compiled the app and ran that - the error came back straight away! There must be a permission somewhere in W7 that stops an app connecting to a database if you're not an admin.

    Found out something else today as well. The app is normally run from a network share (no problems there in the past) If I copy the app locally to C:\Program Files it then works.
    Last edited by GoldenWonder; 11th June 2010 at 11:59 AM.

  8. #8

    Join Date
    Mar 2007
    Posts
    427
    Thank Post
    16
    Thanked 16 Times in 10 Posts
    Rep Power
    19
    Cracked it. The problem is a bit odd. The application that causes the error is held on a network share (\\server\share$) to which normal users have R/O access to the share and Read\Traverse folder etc permissions. Works fine with XP, but you have to give them Full Control on the Share for it to work under Windows 7 - leaving the NTFS permissions the same. Very odd but at least I've found a workaround - might affect other things in the future as well.



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 19
    Last Post: 11th August 2010, 06:35 PM
  2. Replies: 1
    Last Post: 13th April 2010, 08:05 AM
  3. Delays to SIMS releases
    By Mcshammer_dj in forum MIS Systems
    Replies: 23
    Last Post: 14th December 2009, 11:15 AM
  4. BSF Delays... Again!
    By Diello in forum BSF
    Replies: 3
    Last Post: 15th October 2008, 09:34 AM
  5. More BSF Delays
    By steve in forum BSF
    Replies: 36
    Last Post: 6th February 2008, 04:13 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
  •