Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, July 17, 2019 9:29 AM
Hi, please help. I have a problem that I can not solve alone.
Comments:
I have a file - scripts with * .vbs extension.
I've been with him for 3 years
The script runs when you log off the system. (Gpedit.msc)
It works:
Under Windows 7 Pro
Under Windows 10 Pro - up to version 1803
Did not work:
Under Windows 10 Pro - from version 1809 (on version 1903 also does not work)
If someone has Windows 10 Pro, then as a test, he can try to add any * .vbs script to logout scripts (gpedit.msc)
I did not succeed, after many attempts, combinations.
Greetings, PL
All replies (3)
Thursday, July 18, 2019 5:48 AM
Hi,
Would you please provide more information about this issue? What's the detailed error message?
You could take a look at:
Best Regards,
Farena
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Thursday, July 18, 2019 2:44 PM
Thanks for the answers
As part of the tests I decided to run the script (* .ps1)
I added it to the logout scripts (gpedit.msc -> User Conf -> Windows Settings -> Scripts -> Logoff)
The script (* .ps1) does not work either.
sample script (*.ps1):
# add the required .NET assembly:
Add-Type -AssemblyName System.Windows.Forms
# show the MsgBox:
$result = [System.Windows.Forms.MessageBox]::Show('Do you want to restart?', 'Warning', 'YesNo', 'Warning')
# check the result:
if ($result -eq 'Yes')
{
Restart-Computer -WhatIf
}
else
{
Write-Warning 'Skipping Restart'
}
comments1:
During the logout I see how to start the blue Powershell. The Powershell window has appeared and disappears quickly
Previously, I did not have any problems running scripts.
I have the impression that the problem appeared with the upgrade of Windows 10 to version 1803. Please help. The idea is over.
Please try to run the script as above.
comments2:
GPO is enabled:
User Config->Policies->Admin Templates->System->Scripts
'Display instructions in logoff scripts as they run'
comments3:
Scripts work when I run them manually in:
Windows PowerShell ISE
Windows PowerShell
I have a Windows 10 version 1903
Friday, July 19, 2019 8:20 AM
Hi,
So far I can't find this problem on known issues for Windows 10.
I suggest you submit a new case on script forum as they will be more professional on your issue:
https://social.technet.microsoft.com/Forums/Windows/en-US/home?forum=ITCG
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
Thank you for your understanding.
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].