
Originally Posted by
Fix
If you all want to fix this while we wait for microsoft to fix the Rasman service, try this:
Create a notepad file and type: net stop rasman and save it as VPN-fix.cmd. do not save it is vpn-fix.cmd.txt, look online how to save it as whatever extension you want if you don't know how.
Save it somewhere elegent, I have a bunch of scripts I run on my PC and I save it to c:\#Scripts\ Find a spot on root c: or wherever.
Connect to your VPN. If you can't, reboot to clear the 633 error and try again. Open an elevated command prompt, type: sc query rasman and it should show it running, since you are on your VPN.
Disconnect from VPN, do not sleep yet. do an sc query rasman again, rasman should still be running. This is part of the bug; it should stop on disconnect and sleep.
You SHOULD be able to net stop rasman since you haven't entered sleep yet. You can reconnect to your VPN without issue. I've noticed the Rasman service doesn't stop on VPN disconnect, however it does not affect VPN reconnectivity so long as you have not entered sleep.
Check event logs. Exomam shows his disconnect VPN event ID to be 20226, for me event viewer shows 20268 when I disconnect from my VPN. Do some connecting and disconecting before sleep to check what event ID is logged for you.
I created a basic task to run c:\#scripts\vpn-fix.cmd upon event ID 20268 (or 20226, depending). If you're new to scheduled tasks, make sure under security on the general tab you set to use the following settings... account: system. Run: whether logged in or not, hidden: yes, configure: for windows 7. - Trigger tab; begin the task: on an event, log: system, source: rasman event ID: 20268. Actions; run the vpn-fix.cmd we created earlier. conditions; check power. on my laptop, I needed to uncheck 'start task only if computer is on AC power'
to test, save the task. Connect to VPN (you didn't sleep yet right? if so reboot to test) When I disconnect from my VPN, the event ID is created, my vpn-fix.cmd is ran, rasman stops completely. I can then sleep and resume and reconnect without issue. Check "last run time" and "last run result" on the task itself.
For me, this works when I disconnect from my VPN before sleep, AND when I do not disconnect first. Event logs show event 42 "system is entering sleep" and 1 second later that VPN is disconnecting so no need to add an extra trigger event.
If This fix only works when you disconnect before sleep, and NOT when you do not disconnect first, add another trigger for this task and add; Trigger tab; begin the task: on an event, log: system, source: kernel-power event ID: 42 In my case, the disconnected from VPN log is submitted BEFORE sleep and therefore triggers my script. I can see on some PCs this not being logged fast enough, causing rasman to stay running before sleep.
R9 280,
7th May 2023, 21:28 in