Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.comp.os.windows-10 > #148335

Re: Why Windows 10 batch admin isn't the same as its GUI admin?

From Scott Lurndal <scott@slp53.sl.home>
Newsgroups alt.comp.os.windows-10, alt.comp.microsoft.windows, alt.msdos.batch
Subject Re: Why Windows 10 batch admin isn't the same as its GUI admin?
Date 2021-09-11 00:22 +0300
Organization UsenetServer - www.usenetserver.com
Message-ID <shgiah$k25$1@gioia.aioe.org> (permalink)
References <she5mh$17nl$1@gioia.aioe.org> <dz3eju52ebrf.1cag93k8suvd5.dlg@40tude.net>

Cross-posted to 3 groups.

Show all headers | View raw


JJ writes:
> Define "doesn't work".

1. If I run the one-line batch command in an admin window, it works.
2. If I rightclick run as admin in a file explorer window, it fails.

I'm pretty sure it's user error in terms of the batch file syntax.
There's something I'm not understanding about how Windows works.

Everything is run from the openvpn config file directory.
Everything is being run logged in as a user (with admin privileges).

The batch freeopenvpn.bat file contains only a single line.
  c:\path-to\openvpn\bin\openvpn.exe freeopenvpn.ovpn

The freeopenvpn.conf config file itself calls the login/password file.
  auth-user-pass freeopenvpn.txt 

The freeopenvpn.txt login/password file contains only two lines.
  freeopenvpn
  055254372

Where that second line, the password, changes daily at the web site.
 https://www.freeopenvpn.org/index.php

And where today that 9-digit password happens to be "055254372"
 https://www.freeopenvpn.org/premium.php?cntid=USA&lang=en

My simple method is these simple efficient steps.
1. I manually find the daily password (wget would be nice though)
2. In the File Explorer I doubleclick to add it to freeopenvpn.txt
3. I open an admin window & run the one line freeopenvpn.bat file

This is successful by all measures of how anyone would test VPN.
a. "curl icanhazip.com" reports the VPN connection
b. "route print|more" reports the VPN connection
c. And the command window reports a successful VPN connection

What I'd like to work is to be able to "run as admin" in the file explorer.
3. I right-click on freeopenvpn.bat & select "Run as administrator"

That flashes & then fails by all measures of how anyone would test VPN.
a. "curl icanhazip.com" reports the original (not the VPN connection)
b. "route print|more" reports the original (not the VPN connection)
c. And there is no window that reports anything after it flashes instantly

I don't know why "Run as administrator" doesn't work but it's perhaps
because I don't understand how Windows 10 batch commands work.

Is there a line or two I can add to the batch command to make it work?
-- 
BTW, I'm using that VPN connection as we speak so I know it works normally.
It just doesn't work inside the Windows File Explorer for an unknown reason.

Back to alt.comp.os.windows-10 | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-10 02:34 +0300
  Re: Why Windows 10 batch admin isn't the same as its GUI admin? Ralph Fox <-rf-nz-@-.invalid> - 2021-09-10 19:08 +1200
    Re: Why Windows 10 batch admin isn't the same as its GUI admin? Paul <nospam@needed.invalid> - 2021-09-10 04:45 -0400
      Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-11 12:18 +0300
        Re: Why Windows 10 batch admin isn't the same as its GUI admin? Andy Burns <usenet@andyburns.uk> - 2021-09-11 10:26 +0100
          Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-11 22:08 +0300
            Re: Why Windows 10 batch admin isn't the same as its GUI admin? Andy Burns <usenet@andyburns.uk> - 2021-09-11 20:15 +0100
          Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-12 13:25 +0300
      Re: Why Windows 10 batch admin isn't the same as its GUI admin? Ralph Fox <-rf-nz-@-.invalid> - 2021-09-12 06:58 +1200
        Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-11 22:59 +0300
    Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-11 00:40 +0300
      Re: Why Windows 10 batch admin isn't the same as its GUI admin? Andy Burns <usenet@andyburns.uk> - 2021-09-11 08:57 +0100
        Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-11 11:26 +0300
          Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-11 11:33 +0300
            Re: Why Windows 10 batch admin isn't the same as its GUI admin? Andy Burns <usenet@andyburns.uk> - 2021-09-11 09:44 +0100
      Re: Why Windows 10 batch admin isn't the same as its GUI admin? Herbert Kleebauer <klee@unibwm.de> - 2021-09-11 11:03 +0200
        Re: Why Windows 10 batch admin isn't the same as its GUI admin? Andy Burns <usenet@andyburns.uk> - 2021-09-11 10:05 +0100
          Re: Why Windows 10 batch admin isn't the same as its GUI admin? Ralph Fox <-rf-nz-@-.invalid> - 2021-09-12 07:15 +1200
        Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-11 13:00 +0300
        Re: Why Windows 10 batch admin isn't the same as its GUI admin? Zaidy036 <Zaidy036@air.isp.spam> - 2021-09-11 17:29 -0400
          Re: Why Windows 10 batch admin isn't the same as its GUI admin? Ralph Fox <-rf-nz-@-.invalid> - 2021-09-12 09:48 +1200
            Re: Why Windows 10 batch admin isn't the same as its GUI admin? Paul <nospam@needed.invalid> - 2021-09-11 18:54 -0400
              Re: Why Windows 10 batch admin isn't the same as its GUI admin? Ralph Fox <-rf-nz-@-.invalid> - 2021-09-12 11:30 +1200
                Re: Why Windows 10 batch admin isn't the same as its GUI admin? Paul <nospam@needed.invalid> - 2021-09-11 23:47 -0400
          Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-12 06:00 +0300
            Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-12 12:11 +0300
  Re: Why Windows 10 batch admin isn't the same as its GUI admin? JJ <jj4public@gmail.com> - 2021-09-10 16:47 +0700
    Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-11 00:22 +0300
  Re: Why Windows 10 batch admin isn't the same as its GUI admin? Brian Gregory <void-invalid-dead-dontuse@email.invalid> - 2021-09-12 10:25 +0100
    Re: Why Windows 10 batch admin isn't the same as its GUI admin? Scott Lurndal <scott@slp53.sl.home> - 2021-09-12 14:34 +0300

csiph-web