Recommended Posts

Hi guys. I got a quick question for anyone that has more experience with openvpn. I'm trying to have the damn thing run at startup and I used the "scheduled task" method to do it. It runs fine, but my problem is that there's no tray icon. Without it, if something is wrong with the network connection, there's no way to reconnect the vpn, unless the user ends the task/process and open the gui manually. And that is another problem, because the logged in user does not have admin privileges. 

 

I've set a delay of 2 minutes in the Triggers section of the task, to let everything else load first, but the tray icon still doesn't show. 

 

Is there anything else I can do?

 

Thank you!

Link to comment
https://www.neowin.net/forum/topic/1288614-openvpn-gui-issue-at-startup/
Share on other sites

why not just put it in the startup folder instead of running it as a scheduled task?  This way when the user logs on it will run and it will be interactive with the user.   You can even do it in the all users section so that it applies to anyone who logs in, not just the individual user.

  On 11/02/2016 at 21:32, sc302 said:

why not just put it in the startup folder instead of running it as a scheduled task?  This way when the user logs on it will run and it will be interactive with the user.   You can even do it in the all users section so that it applies to anyone who logs in, not just the individual user.

Expand  

I already tried that, it does run BUT it asks for the admin password and I don't want that, since the user doesn't have the rights.

  On 11/02/2016 at 22:27, BudMan said:

do your users have admin rights?? 

 

If not is this the way you set it up?

https://community.openvpn.net/openvpn/wiki/Nonprivileged

 

This starts the gui for the user..

Expand  

As I said, the user doesn't have admin rights. I used the method here: https://help.my-private-network.co.uk/support/solutions/articles/8464-windows-openvpn-auto-start

  On 11/02/2016 at 21:20, John Teacake said:

Why are you trying to run it as a Scheduled Task? Presumably there would be no icon as its not running as the logged in user. 

Expand  

Because there's no other way other than the openvpn windows service set to automatic, but that method still doesn't show the tray icon...

That method is missing quite a bit... Take a look at the article I posted..

 

Also you can give the vpn service start stop permissions to normal user...  Been a coons age since I have done anything like this but I know you can grant non users rights to start and stop service with
 subinacl, there use to be a way to change the gui via a reg key so that it started and stopped the service..

 

Google is your friend, found the old article

http://openvpn.se/files/howto/openvpn-howto_run_openvpn_as_nonadmin.html

 

That goes over the way to change the service and the reg keys... Have not had to do this in years.. But might still work, if I get a chance latter I will test it..  Also int he article I linked to it links to 2 other gui options that can be used without admin rights.  Maybe either of those would suit your needs??  So you don't have to use the scheduled task method at all.

  On 11/02/2016 at 22:50, BudMan said:

That method is missing quite a bit... Take a look at the article I posted..

 

Also you can give the vpn service start stop permissions to normal user...  Been a coons age since I have done anything like this but I know you can grant non users rights to start and stop service with
 subinacl, there use to be a way to change the gui via a reg key so that it started and stopped the service..

 

Google is your friend, found the old article

http://openvpn.se/files/howto/openvpn-howto_run_openvpn_as_nonadmin.html

 

That goes over the way to change the service and the reg keys... Have not had to do this in years.. But might still work, if I get a chance latter I will test it..  Also int he article I linked to it links to 2 other gui options that can be used without admin rights.  Maybe either of those would suit your needs??  So you don't have to use the scheduled task method at all.

Expand  

I think you're missing the point (but please correct me if I'm wrong). The issue is NOT that a normal user cannot run openvpn, it's the tray icon that's missing. The connection runs fine as a scheduled task, with admin rights (the .exe is in the processes list in task manager), but my concern is that if the internet connection drops the vpn will not reconnect automatically. So the user needs to have a manual way of reconnecting, via the tray icon, since re-opening the main exe file requires admin password.

 

That script + scheduled task method you posted basically does the same thing, the app runs but there's no icon. Maybe I should add an explorer restart, so that the tray icon gets registered properly?

If you read the article I Linked too it gives them the gui so they can restart the connection.  Or the other guis in the article do not have to have admin rights and they can restart the connection.  They have a GUI!!

 

That is your whole point right - if the connection dies the users can't restart it... That is what I am showing you how to do - the article gives you the gui to see if the connection is up down, restart it, etc..  Same goes with the replacement guis that do not require admin.

 

"the app runs but there's no icon"

There is a icon!!! 

 

This automatically created task will put the user in the group "Network Configuration Operators" and then start OpenVPN GUI automatically at the next logon of this (non privileged) user (with highest privileges).

 

"win7x64_user1_openvpn will then execute openvpn-gui.exe in the users context but with highest privileges."

 

Since the user task win7x64_user1_openvpn was present at logon, it get's executed and starts openvpn-gui.exe. So after the user logged in, he/she has the OpenVPN-GUI running in the system tray and is ready to establish connections without administrative privileges"

 

Clearly you did NOT read it???

 

 

  On 11/02/2016 at 22:31, TDT said:

I already tried that, it does run BUT it asks for the admin password and I don't want that, since the user doesn't have the rights.

Expand  

then use proc mon to find out what is being called and give the user admin rights over those areas either in the registry or the file location.  If the file location is in program files move the folder or install it to the root of c or a folder outside of one of the restricted folders (windows, program files, or programdata).  This is how I have made programs that normally need admin access accessible to end users without admin access.  I could remote in with teamviewer and help you with a test box if you would like me to show you what to do...I will probably need a break at some point today while watching airwatch videos (blech). 

 

https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx

 

  On 12/02/2016 at 09:47, BudMan said:

If you read the article I Linked too it gives them the gui so they can restart the connection.  Or the other guis in the article do not have to have admin rights and they can restart the connection.  They have a GUI!!

 

That is your whole point right - if the connection dies the users can't restart it... That is what I am showing you how to do - the article gives you the gui to see if the connection is up down, restart it, etc..  Same goes with the replacement guis that do not require admin.

 

"the app runs but there's no icon"

There is a icon!!! 

 

This automatically created task will put the user in the group "Network Configuration Operators" and then start OpenVPN GUI automatically at the next logon of this (non privileged) user (with highest privileges).

 

"win7x64_user1_openvpn will then execute openvpn-gui.exe in the users context but with highest privileges."

 

Since the user task win7x64_user1_openvpn was present at logon, it get's executed and starts openvpn-gui.exe. So after the user logged in, he/she has the OpenVPN-GUI running in the system tray and is ready to establish connections without administrative privileges"

 

Clearly you did NOT read it???

 

 

Expand  

I did read it and tried, but it didn't work then, I think I missed a step or something. I tried again today and it does indeed work as expected, but there's still a minor issue (I really don't care about it, just mentioning): the tray icon is always green, even if the vpn gets disconnected. 

Anyway, thanks! This is a much better solution than the others that I found so far. :)

  • 5 months later...
  On 12/02/2016 at 09:47, BudMan said:

If you read the article I Linked too it gives them the gui so they can restart the connection.  Or the other guis in the article do not have to have admin rights and they can restart the connection.  They have a GUI!!

 

That is your whole point right - if the connection dies the users can't restart it... That is what I am showing you how to do - the article gives you the gui to see if the connection is up down, restart it, etc..  Same goes with the replacement guis that do not require admin.

 

"the app runs but there's no icon"

There is a icon!!! 

 

This automatically created task will put the user in the group "Network Configuration Operators" and then start OpenVPN GUI automatically at the next logon of this (non privileged) user (with highest privileges).

 

"win7x64_user1_openvpn will then execute openvpn-gui.exe in the users context but with highest privileges."

 

Since the user task win7x64_user1_openvpn was present at logon, it get's executed and starts openvpn-gui.exe. So after the user logged in, he/she has the OpenVPN-GUI running in the system tray and is ready to establish connections without administrative privileges"

 

Clearly you did NOT read it???

 

 

Expand  

thanks for the tip this might be just what im looking for, one question, in the article it mentions accessing a "hidden" menu. I fixed the value in the registry but I don’t know where to look for it, nothing has SEEMED to change. If you have any advice it would be much appreciated

 

- I'm running Windows 10 and am also having trouble with the system tray icon showing up

  On 20/07/2016 at 11:21, BudMan said:

I have not tested this with windows 10. 

Expand  

Thanks for fast reply. I have Win 7 computers as well and i wanted to see this. I changed the value but I am unsure where the extra menu pops up. i.e. do I right click the GUI or maybe the system tray icon? Thanks.

 

"If you are running as administrator, and just want a convenient way to control the OpenVPN Service, you can enable a hidden menu for this."

 

You enable this by setting the following registry value to "1":  HKEY_LOCAL_MACHINE\SOFTWARE\OpenVPN-GUI\allow_service

 

I changed the value but I am unsure where the extra menu pops up. i.e. do I right click the GUI or maybe the system tray icon? Thanks.

 

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Austin residents rally against Tesla's robotaxi launch by Hamid Ganji Tesla's plan to launch its robotaxi service in Austin, Texas, has sparked protests in the city. While the EV maker targets June 22 as the launch date, local residents are raising their voices against the plan due to political disagreements and safety concerns. As reported by CNBC, public safety advocates and political protesters are organizing protests against Tesla's robotaxi launch in Austin. Members of the Dawn Project, Tesla Takedown, and Resist Austin have cited safety issues with Tesla's automated driving systems. Meanwhile, Elon Musk's involvement in Donald Trump's administration and his work in the Department of Government Efficiency (DOGE) has prompted another group of people to join the Austin protests against Tesla. To show Austin citizens the safety problems of Tesla's self-driving system, The Dawn Project brought a Tesla Model Y to the protest, equipped with the company's Full Self-Driving (FSD) software (version 13.2.9). In the demonstration, the Model Y with FSD software reportedly zoomed past a school bus with a stop sign held out and ran over a child-sized mannequin placed in front of the car. The FSD package includes automatic lane-keeping, steering, and parking. It is unclear to what extent this test was conducted under standard conditions or what Tesla's defense is. However, multiple cases of Tesla FSD software malfunction in the past have resulted in collisions or severe accidents, according to data collected by National Highway Traffic Safety Administration. Interestingly, The Dawn Project CEO Dan O'Dowd is the CEO of another company that sells embedded safety and security solutions to carmakers like Ford and Toyota. It remains to be seen whether Tesla could launch a robotaxi service in Austin despite the residents' protests. Earlier this week, Elon Musk demonstrated the new version of Tesla's FSD software in a post on X. Musk's decisions on DOGE fuel public backlash against Tesla. While Musk left the Trump administration after a beef with the president, he's still a target of public criticism, which directly imapcts Tesla. As a result, the slow sales have even caused Tesla to sell its Cybertruck with 0 percent APR to boost sales.
    • I'm sure Denmark would stand to lose a lot if US consumers stopped buying Danish products, whether that's Lurpak butter or hi-fi equipment.
    • JD Vance will be the next President. Who've the Democrats got? Harris again? lol....
    • Microsoft Edge gets new password feature and security fixes by Taras Buria Microsoft has released a new update for the Edge browser in the Stable Channel. Version 137.0.3296.83 introduces a new password feature and fixes security vulnerabilities to make your browsing experience safer. Starting with new features, Microsoft Edge 137 now supports Secure Password Deployment. Microsoft recently announced this for IT admins, allowing them to share encrypted passwords with user groups. This service lets users log into websites without seeing their passwords, thus enhancing the organization's security. You can read more about Microsoft Edge Secure Password Deployment in our recent article here. Security updates in Microsoft Edge 137.0.3296.83 include two fixes for Chromium vulnerabilities: CVE-2025-5958: Use after free in Media in Google Chrome prior to 137.0.7151.103 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page. (Chromium security severity: High) CVE-2025-5959: Type Confusion in V8 in Google Chrome prior to 137.0.7151.103 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page. (Chromium security severity: High) You can update Microsoft Edge to the latest version by heading to edge://settings/help. The browser can also update itself automatically in the background and apply updates between restarts. In case you missed it, Microsoft released Edge 137 by the end of May. The update deprecated quite a lot of existing features, including Wallet, Image Editor, Image Hover, Mini menu, and Video Super Resolution. It also introduced Web Content Filtering and enhancements for the picture-in-picture player and Find on Page in Microsoft Edge for Business. The next feature update for Microsoft Edge, version 138, is expected on the week of June 26, 2025, as part of the standard four-week release cadence.
    • Microsoft commits to upskill 1 million UK workers in AI this year by Paul Hill Microsoft has partnered with the UK government in the latter’s ambitious plan to train 7.5 million workers in AI skills over the next five years. Specifically, Microsoft has committed to upskilling 1 million of those workers by the end of this year. This represents a significant portion of the overall target and within a very short timeframe. The education drive by Microsoft builds on its previous “Get On” program, which has given 1.5 million people basic digital skills. The effort to train up 1 million British workers in AI is part of Microsoft’s broader £2.5 billion investment in UK AI infrastructure. Ensuring workers have the skills to leverage AI tools is important. Microsoft CEO UK Darren Hardman said recently that two-thirds of business people wouldn’t hire someone lacking AI skills, showing just how vital it is to get people’s skills up to date. Microsoft's approach to AI skills development Microsoft has several platforms to offer AI training, including Microsoft Learn, AI Skills Navigator, and through partnerships with non-profit organisations such as Catch22 in the UK. Its educational materials cover everything from the basics of generative AI to helping you prepare for advanced roles like being an AI engineer. With Catch22, Microsoft helps to train people who face various challenges to getting tech skills, including gender and ethnicity barriers, homelessness, mental health issues, school exclusion and disability. Microsoft is also trying to get more women into tech fields through programmes like TechHer, where it has trained thousands of women across UK government departments. Many of the courses that Microsoft offers come complete with certificates that you can show off on your CV when applying for a job to impress potential employers and land a job. Who else is partnering with the UK government? While Microsoft is playing a massive role in the government’s plans, it’s not the only big tech giant helping out. The firms that have partnered with the government are: Accenture, Amazon, Barclays, BT, Google, IBM, Intuit, Microsoft, Sage, SAS, and Salesforce. While all of these firms are helping to train workers, Microsoft’s planned efforts are the most notable. This initiative by the government will help the country brace for the changes AI is expected to bring to the economy. In April, the United Nations said that AI will affect 40% of all jobs, so being ready is a must.
  • Recent Achievements

    • Week One Done
      LagFighterZ earned a badge
      Week One Done
    • First Post
      ThatGuyOnline earned a badge
      First Post
    • One Month Later
      5i3zi1 earned a badge
      One Month Later
    • Week One Done
      5i3zi1 earned a badge
      Week One Done
    • Week One Done
      julien02 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      545
    2. 2
      ATLien_0
      227
    3. 3
      +FloatingFatMan
      165
    4. 4
      Michael Scrip
      118
    5. 5
      +Edouard
      91
  • Tell a friend

    Love Neowin? Tell a friend!