Skip to content
I reduces the timout in the script and it worked. Then for good measure, I increased the ConnectionScriptTimeout as you said to 120 seconds. However this seems to have broken something because now my disconnect script doesn't work any more. I tried installing Viscosity, but it didn't work. How can I reset the settings?
Startup script not working when executed by Viscosity
Got a problem with Viscosity or need help? Ask here!
- Posts: 4
- Joined: Sun Apr 08, 2018 3:04 am
I have a startup script that looks like this to start my torrent program when connected:
When I run this file with my terminal, it works just fine. But when I connect to my vpn, the script does not seem to work when Viscosity runs it. The script doesn't even start.
I also a shutdown script and that works just fine though:
Code: Select all
TIMEOUT /T 10
taskkill /f /im qBittorrent.exe
TIMEOUT /T 25
:while1
TIMEOUT /T 30
if exist e:\ (
start "" "C:\Program Files\qBittorrent\qbittorrent.exe"
) else (
goto :while1
)
When I run this file with my terminal, it works just fine. But when I connect to my vpn, the script does not seem to work when Viscosity runs it. The script doesn't even start.
I also a shutdown script and that works just fine though:
Code: Select all
I have also tried using VBS script and do the same thing. And I have the same problem, startup doesn't work but stop does.TIMEOUT /T 2
taskkill /f /im qBittorrent.exe
Hi,
Viscosity will terminate scripts that run for longer than 60 seconds to prevent scripts getting in a stuck state forever. It looks like your script is timed to not start your application until at least 65 seconds after it's first run if I'm reading your timeout values correctly.
You have two options, you can shorten the delays in your scripts, or lengthen the delay in Viscosity until it terminates a script. To do the latter, run the following from Start -> Run or a command prompt:
Regards,
Eric
Viscosity will terminate scripts that run for longer than 60 seconds to prevent scripts getting in a stuck state forever. It looks like your script is timed to not start your application until at least 65 seconds after it's first run if I'm reading your timeout values correctly.
You have two options, you can shorten the delays in your scripts, or lengthen the delay in Viscosity until it terminates a script. To do the latter, run the following from Start -> Run or a command prompt:
Code: Select all
Replacing 120 with however many seconds you'd like Viscosity to wait until it terminates a script. I would not recommend taking this value beyond 240."C:\Program Files\Viscosity\Viscosity.exe" SetPref ConnectionScriptTimeout 120
Regards,
Eric
Eric Thorpe
Viscosity Developer
Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
Viscosity Developer
Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
- Posts: 4
- Joined: Sun Apr 08, 2018 3:04 am
Mon Oct 14, 2019 11:58 amEric wrote: Hi,Hi, thanks.
Viscosity will terminate scripts that run for longer than 60 seconds to prevent scripts getting in a stuck state forever. It looks like your script is timed to not start your application until at least 65 seconds after it's first run if I'm reading your timeout values correctly.
You have two options, you can shorten the delays in your scripts, or lengthen the delay in Viscosity until it terminates a script. To do the latter, run the following from Start -> Run or a command prompt:
Code: Select allReplacing 120 with however many seconds you'd like Viscosity to wait until it terminates a script. I would not recommend taking this value beyond 240."C:\Program Files\Viscosity\Viscosity.exe" SetPref ConnectionScriptTimeout 120
Regards,
Eric
I reduces the timout in the script and it worked. Then for good measure, I increased the ConnectionScriptTimeout as you said to 120 seconds. However this seems to have broken something because now my disconnect script doesn't work any more. I tried installing Viscosity, but it didn't work. How can I reset the settings?
Hi,
To reset this setting, Exit Viscosity and then run:
We'll take a look and see if we can replicate the problem.
Regards,
Eric
To reset this setting, Exit Viscosity and then run:
Code: Select all
To reset all settings, delete the file at %appdata%\Viscosity\Settings.xml (type in %appdata%\Viscosity into an explorer window and press Enter). Please keep in mind this will also delete your license and you will need to re-enter it."C:\Program Files\Viscosity\Viscosity.exe" SetPref ConnectionScriptTimeout deletepref
We'll take a look and see if we can replicate the problem.
Regards,
Eric
Eric Thorpe
Viscosity Developer
Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
Viscosity Developer
Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
4 posts
Page 1 of 1