Page 1 of 1

Windows User Connect Script not working

Posted: Wed Jun 02, 2021 11:05 am
by TMTI Support
Hi All

I have followed the example in
https://openvpn.net/vpn-server-resource ... work-share

But I can't get the Windows User Connect Script to work.

In the Windows User Connect Script I have
start \\192.168.10.170\VPNUser\shares.exe

There is a file that can seen at that location. It has the widest open permissions.

I connect to the VPN server, it asks me if I want to run the file.

If I say yes imediatly, then I get this error after about 20 seconds.
--------------------8<--------------------
[Window Title]
Network Error

[Main Instruction]
Windows cannot access \\192.168.10.170\VPNUser\shares.exe

[Content]
Check the spelling of the name. Otherwise, there might be a problem with your network. To try to identify and resolve network problems, click Diagnose.

[^] Hide details [Diagnose] [Cancel]

[Expanded Information]
Error code: 0x80070035
The network path was not found.
--------------------8<--------------------

If I wait over 3 seconds before I click Yes then the file runs.

If I select "Don't show again" and yes then I get the error every time.

This means that the network is not set up yet. Therefor put a delay into the script.

So now I I have two lines in the Windows User Connect
e.g.
start timeout /t 30
start \\192.168.10.170\VPNUser\shares.exe

Then it only runs the first line of the script
If I combine the commands onto one line.
e.g.
start timeout /t 30 && start \\192.168.10.170\VPNUser\shares.exe

Then they both run concurrently
I have verified that the script is in place using

./sacli --pfilt <USER_OR_GROUP> UserPropGet

I have changed this by both the GUI and CLI and confirmed that it has been pushed out to the client.
The client asks to run whatever I put into [prop_cli.script.win.user.connect]

Any idears?

Re: Windows User Connect Script not working

Posted: Wed Jun 02, 2021 1:55 pm
by TinCanTech
You are using OpenVPN Access-Server product ?

Re: Windows User Connect Script not working

Posted: Mon Jun 07, 2021 10:14 am
by TMTI Support
TinCanTech wrote:
Wed Jun 02, 2021 1:55 pm
You are using OpenVPN Access-Server product ?
Yes, the latest client has 1/2 resolved the problem, enough for a work around

Re: Windows User Connect Script not working

Posted: Mon Jun 07, 2021 1:04 pm
by chilinux
Possibly try:

Code: Select all

start powershell start-sleep -s 30 ; start-process \\192.168.10.170\VPNUser\shares.exe

Re: Windows User Connect Script not working

Posted: Mon Jun 14, 2021 2:15 pm
by TMTI Support
I was a bug in the client which they 1/2 fixed in the latest release 3.3.0 (2171)
It would work in the admin section but not in the user section.
I now have it working using this in the Windows User Connect script

Code: Select all

Timeout.exe /T 10 && start %LOGONSERVER%.local.domain.net\NETLOGON\VPN_User\startup.%USERNAME%.bat
It still does not do multi lines