none
Windows 8 logoff script problem

    Question

  • Hi,

    I have a problem after migration from Windows 7 to Windows 8.

    The computer is on a domain and logoff script is applied via GPO to it. The logoff script simply opens an internal web page in Internet Explorer. The problem is that when I select signout/shutdown/restart and the script runs I cannot see Internet explorer bacause of the signingout/shuttingdown/restarting screen. The IE is opened in the background and cannot be accessed, so I have to wait 10 minutes for Winlogon services which closes IE forcefully. In XP and 7 works fine. Is there a way to correct that?

    Thank you

    Friday, November 16, 2012 12:31 PM

All replies

  • Hi,


    This issue occurs can be caused by the script may be not compatibility with Windows 8. You may re-write the script file.


    Kim Zhou

    TechNet Community Support

    Monday, November 19, 2012 8:07 AM
  • Hi,

    The script is very simple: start /wait /i /max iexplore.exe webpage

    And if I run it manually it works ok, but if I choose i.e. restart and gpo starts it I am just not able to see IE window bacuse it is in background of "restarting" screen. Is there a way to change/remove this screen or some kind of a different solution?

    TY

    Monday, November 19, 2012 12:43 PM
  • running a script that starts IE at shutdown is going to be tricky to get right, due to shutdown processing and speed. What are you trying to accomplish? is it a message to the users or tracking shutdowns?
    Monday, November 19, 2012 6:44 PM
  • Just stumbled across this, we're having the exact same issue.  On user logoff, a simple call is made to launch IE with an internal web page (in our case, to give the user a chance to punch out and check their work schedule).

    On Windows XP/7 computers that's fine, because the user logoff dialog doesn't cover the entire screen.  The user is able to interact with the web page and close it once he or she is done with it.

    On Windows 8, the user logoff/signoff screen appears on top of everything.  The IE page still loads, but is not visible to the users, so it sits there until the logoff script timeout takes effect (5 or 10 minutes, whatever the default is).  In the eyes of users, they just think that logging off or rebooting takes much longer on Windows 8.

    Edit: yep, 10 minutes by default.  Key combinations like Alt+Tab, Alt+F4 etc. do not select or close the running (but not visible) process.
    • Edited by IntegreDave Monday, November 19, 2012 7:28 PM Adding info
    Monday, November 19, 2012 7:13 PM
  • it will be interesting to see if someone has a solution for this. I don't know enough about the way the shutdown works to be of any help.

    Worst-case scenario - There are alternatives....for example, a batch file on the desktop called "shutdown" that runs IE and then calls c:\windows\system32\shutdown.exe

    Tuesday, November 20, 2012 4:33 PM
  • Agree with you on that one Mark.  It looks like a number of organizations are running into this with Windows 8 back through the developer preview.  Some answers have even (incorrectly) asserted that this never worked.

    Depending on the organization, the worst case scenario you suggested may work.  It won't catch people that use the Shutdown/Sign Out/Restart controls from the charms menu or from the ctrl+alt+del screen when a user is signed in, but I suppose those can be hidden through GPO.

    Tuesday, November 20, 2012 5:54 PM
  • Just wondering if anybody has figured this out yet?

    I have a log off script that just sends a message to my users as they log off via notepad.

    It works great on 7, but wont work on 8 and getting people to click on a batch file to log off after all the training they already had on how to navigate Windows 8, just isn't happening.

    Thursday, November 22, 2012 7:07 AM
  • Sadly not.  I've had to work around the problem by throwing a version check into my batch file for the logoff script.  If the version check finds a version of windows below 6.2, it launches the interactive program at logoff as normal.  If it's 6.2 or greater, it does not launch anything.

    @echo off
    :: Determine Windows Version
    for /f "tokens=4 delims=] " %%a in ('ver') do set fullver=%%a
    for /f "tokens=1,2 delims=." %%a in ("%fullver%") do set winver=%%a.%%b
    
    :: Now should have a Windows version number in Major.Minor format
    :: Right now, logoff scripts do not work properly in Windows 8 (6.2)
    :: They run, but are not visible and have to wait for a 600 second timeout (or timeout as defined in group policy)
    if %winver% LSS 6.2 (
        <<<RUN YOUR REGULAR SCRIPT/PROGRAM HERE>>>
    )

    This is the best I've come up with so far.

    Tuesday, December 11, 2012 2:52 PM
  • And what if you'll use psexec /I processname? Wouldn't it start your process interactively?


    Well this is the world we live in And these are the hands we're given...

    Tuesday, December 11, 2012 3:52 PM
  • I have some problem.

    I have a logoff script in hta/vbs and after migration station from windows 7 to window8, my script simply open background, and the user cannot click in option...

     

    Tuesday, December 11, 2012 10:37 PM
  • To me it sounds like Windows 8 has begun to behave correctly here. On logoff the entire user env is taken down, i.e. Windows applications - and just before finalization - your logoff scripts with commands are run to do their job.

    That postorder processing of the logoff script guarantees user files are not manipulated by various processes while your finalizing script is running just before logoff is commited and completely transacted. It's logoff ...

    If you need to do a http requests uses i.e. curl as a script command to post the request to the http server ... instead of trying to start an app that basicly needs the user env thats has been/was being (prior to Win8?) taken Down.

    http://curl.haxx.se/

    http://curl.haxx.se/docs/manpage.html

    Saturday, December 15, 2012 4:33 AM
  • On Windows 8, the user logoff/signoff screen appears on top of everything.  The IE page still loads, but is not visible to the users


    Is this a Metro vs Desktop issue or just a problem of needing Always on Top set somehow?
    Saturday, December 15, 2012 1:21 PM
  • Is this a Metro vs Desktop issue or just a problem of needing Always on Top set somehow?

    The latter; it looks like the signout/restart/shutdown screen is the topmost window.  I'm assuming it's a metro screen, and since we call IE from a script it is run as a desktop app.  Is it possible to call IE as a metro app from a script?

    Computermensch:  I won't argue with you there, the logout process shouldn't be interrupted once started.  Calling IE as an interactive process on logoff is a risky thing, and is not without flaws.  A knowledgeable user could break out of the logoff process by using the features in IE.  I have done this in the past as a test.  If a user walks away without closing the IE window, someone else could walk up to the machine and do the same.

    Curl won't do in our situation, as we aren't forcing our users to punch out of our time keeping system at logoff/shutdown/restart, but giving them the opportunity to. 

    Exotic Hadron:  I haven't tried that, but am willing to give it a shot.  I don't hold out much hope for it though.

    Reading PsExec's guide page, the -i switch gives you the option to launch a process interactively in a desktop session on a remote computer.  Using that switch to launch IE on the local machine seems like another way of just running iexplore.exe, which is run interactively but is displayed "under" the signout/restart/shutdown screen, so the user can't interact with it.  I'd be interested to see if that is not the case though.

    EDIT:  Running iexplore.exe using PsExec -i is indeed no different than just calling iexplore.exe directly in this case.  IE launches, but is not visible in foreground and can't be interacted with.

    • Edited by IntegreDave Monday, December 17, 2012 5:48 PM updated information
    Monday, December 17, 2012 3:43 PM
  • Hi,

    I have a problem after migration from Windows 7 to Windows 8.

    The computer is on a domain and logoff script is applied via GPO to it. The logoff script simply opens an internal web page in Internet Explorer. The problem is that when I select signout/shutdown/restart and the script runs I cannot see Internet explorer bacause of the signingout/shuttingdown/restarting screen. The IE is opened in the background and cannot be accessed, so I have to wait 10 minutes for Winlogon services which closes IE forcefully. In XP and 7 works fine. Is there a way to correct that?

    Thank you

    Hello, just edit your GPO enabling this:

    User settings/Administrative Templates/system/

    Run logoff scripts visible


    Hugo S.

    • Proposed as answer by HugoSampaio Wednesday, January 02, 2013 8:24 PM
    Wednesday, January 02, 2013 8:23 PM
  • Hello, just edit your GPO enabling this:

    User settings/Administrative Templates/system/

    Run logoff scripts visible


    Hugo S.

    I couldn't find the suggested setting to even review it; it wasn't present in the user/administrative templates on our Server 2012 DC, at least.

    What I did find is this:

    Display instructions in logoff scripts as they run

    Setting Path:
    User Configuration/Administrative Templates/System/Scripts

    Supported On:
    At least Windows 2000

    Explanation
    This policy setting displays the instructions in logoff scripts as they run.

    Logoff scripts are batch files of instructions that run when the user logs off.  By default, the system does not display the instructions in the logoff script.

    If you enable this policy setting, the system displays each instruction in the logoff script as it runs.  The instructions appear in a command window.  This policy setting is designed for advanced users.

    If you disable or do not configure this policy setting, the instructions are suppressed.

    Try setting this to to Enabled for the GPO which calls your logoff script to launch IE.

    I tested this on a Windows 8 Enterprise 64-bit client, and it did indeed work -- IE launched and was visible, the user could interact with the IE window.  The only downside to it is that the CMD shell window for the script is visible as well.

    Dave

    • Proposed as answer by IntegreDave Tuesday, January 08, 2013 2:19 PM
    Friday, January 04, 2013 7:34 PM
  • Hi Hugo,

              I couldn't find such setting on my GPO..... can you provide us snap of the this location with detail?

    Monday, May 12, 2014 3:59 AM
  • Hi IntergreDave,

                  Neither i could find the configuration setting you have suggested on my GPO.... if you could also provide us SNAP of the GPO.

    Monday, May 12, 2014 4:00 AM
  • IntegreDave is correct, the name of the setting is:

    Display instructions in logoff scripts as they run

    and the path to the setting is:

    User Configuration/Administrative Templates/System/Scripts

    Enabling this setting resolved the issue for me.

    Here is a screen cap:

    Display instructions in logoff script


    - TheTechinator

    Tuesday, June 03, 2014 2:53 PM