Follow

Computer logon hangs or cannot logon when deploying vbscript (.vbs) in a group policy

When deploying the vbscript (.vbs) script at logon using a Group Policy the Windows logon can hang up to 20 Minutes or the default timeout. This occurs due to the GPO being set to synchronous. 

Below is the information from Microsoft on how the settings work and why the logon will hang. 

"Synchronous processes can be described as a series of processes where one process must finish running before the next one begins. Asynchronous processes, on the other hand, can run on different threads simultaneously because their outcome is independent of other processes. You can change the default processing behavior by using a policy setting for each GPO so that processing is asynchronous instead of synchronous. However, this is not recommended because it can cause unpredictable or undesirable side effects. For example, if the policy has been set to remove the Run command from the Start menu, it is possible under asynchronous processing that a user could logon prior to this policy taking effect, so the user would initially have access to this functionality. To provide the most reliable operation, it is recommended that you leave the processing as synchronous." 

http://technet.microsoft.com/en-us/library/cc758898(v=ws.10).aspx

There are 2 ways to resolve the issue.

  1. Change the group policy to be Asynchronous. Please see the following link on the GPO setting. http://msdn.microsoft.com/en-us/library/ms812997.aspx 
  2. Create a batch file (.bat) to run the .vbs script. The GPO will then call the .bat and the .bat file will call the .vbs script and close. This will allow the logon to continue as the batch file completed. 

 

Creating a Batch File

In the same share/ sysvol folder that the .vbs script is located in create new .txt file and add the following:

start /d "\\computername\sharefolder\"  user_notification.vbs

  1. Change the \\computername\sharefolder\ to be the same as the location of the share/location of the .vbs script.
  2. Change the user_notification.vbs to be the name or your .vbs script.
  3. Save this as a .bat file.  When using notepad you need to change the "Save as type" to All Files and the File name to be the name.bat as shown below. 

You should now have a .bat file listed in your SYSVOL/Share folder.  

More information on creating batch files can be found here. 

http://technet.microsoft.com/en-us/library/bb490869.aspx

 

Pointing the GPO to use the Batch File

 You will need to change the group policy to point to the .bat file instead of the .vbs script.  Please see the following links for help with the location of the group policy. 

http://wiki.untangle.com/index.php/Directory_Connector#UNLS_for_the_entire_domain

http://wiki.untangle.com/index.php/Directory_Connector#UNLS_for_specific_users

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk