Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

You scratch my tape, and I'll scratch yours.


computers / alt.comp.os.windows-10 / Re: Why Windows 10 batch admin isn't the same as its GUI admin?

SubjectAuthor
* Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
+* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Ralph Fox
|+* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Paul
||+* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
|||`* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Andy Burns
||| +* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
||| |`- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Andy Burns
||| `- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
||`* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Ralph Fox
|| `- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
|`* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
| +* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Andy Burns
| |`* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
| | `* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
| |  `- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Andy Burns
| `* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Herbert Kleebauer
|  +* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Andy Burns
|  |`- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Ralph Fox
|  +- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
|  `* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Zaidy036
|   +* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Ralph Fox
|   |`* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Paul
|   | `* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Ralph Fox
|   |  `- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Paul
|   `* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
|    `- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
+* Re: Why Windows 10 batch admin isn't the same as its GUI admin?JJ
|`- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal
`* Re: Why Windows 10 batch admin isn't the same as its GUI admin?Brian Gregory
 `- Re: Why Windows 10 batch admin isn't the same as its GUI admin?Scott Lurndal

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

<shjt8k$ul7$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=55325&group=alt.comp.os.windows-10#55325

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: alt.comp.os.windows-10
Subject: Re: Why Windows 10 batch admin isn't the same as its GUI admin?
Date: Sat, 11 Sep 2021 23:47:33 -0400
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <shjt8k$ul7$1@dont-email.me>
References: <she5mh$17nl$1@gioia.aioe.org> <a9vljg9tspkefitk4ao7qr076t60ron1r1@4ax.com> <shgjd7$1206$1@gioia.aioe.org> <shhrcb$cgu$1@gioia.aioe.org> <shj746$95n$1@dont-email.me> <kp8qjg5rq87ne69hrbv9g1uffk129rcms9@4ax.com> <shjc40$php$2@dont-email.me> <tmeqjgtea4ovij4nl7cp1mp8e4uo5rbcv5@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 12 Sep 2021 03:47:33 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="253a26a0af96c42b54c505cd1b216066";
logging-data="31399"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Hbuut1tGTX+RmU3/QTXLq6jvQFwDnlZw="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:BQsRC82rqJ8RRqRrRRj+51HjD1k=
In-Reply-To: <tmeqjgtea4ovij4nl7cp1mp8e4uo5rbcv5@4ax.com>
 by: Paul - Sun, 12 Sep 2021 03:47 UTC

Ralph Fox wrote:
> [Scott Lurndal]
>>>>>> For whatever reason, my "command prompt" is instantaneous.
>>>>>> It disappears in a nanosecond so I can't tell what it's doing inside.
>
> [Herbert Kleebauer]
>>>>> Then insert a "pause" command at the end of the batch file so the
>>>>> window stays open.
>
> [Zaidy036]
>>>> easier to use "CMD /K" so batch ends but leaves window open and usable
>
> [Ralph Fox]
>>> The case in question is when you run the batch by:
>>> right-click >> Run As Administrator.
>>> The case in question does not use "CMD /K".
>
> [Paul]
>> You could try sticking a pause in your batch file.
>
> That is what Herbert Kleebauer already wrote.

<shf5vl$f1m$1@dont-email.me> 9/10/2021 4:45 AM

Paul

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

<shkg80$4di$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=55330&group=alt.comp.os.windows-10#55330

  copy link   Newsgroups: alt.comp.os.windows-10 alt.comp.microsoft.windows alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!byfYGra9UYTu3eUW2DIdpA.user.46.165.242.75.POSTED!not-for-mail
From: scott@slp53.sl.home (Scott Lurndal)
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: Sun, 12 Sep 2021 12:11:31 +0300
Organization: UsenetServer - www.usenetserver.com
Message-ID: <shkg80$4di$1@gioia.aioe.org>
References: <she5mh$17nl$1@gioia.aioe.org> <a9vljg9tspkefitk4ao7qr076t60ron1r1@4ax.com> <shgjd7$1206$1@gioia.aioe.org> <shhrcb$cgu$1@gioia.aioe.org> <shj746$95n$1@dont-email.me> <shjqg4$uoh$1@gioia.aioe.org>
Reply-To: slp53@pacbell.net
Injection-Info: gioia.aioe.org; logging-data="4530"; posting-host="byfYGra9UYTu3eUW2DIdpA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-newsreader: xrn 9.03-beta-14-64bit
X-Notice: Filtered by postfilter v. 0.9.2
 by: Scott Lurndal - Sun, 12 Sep 2021 09:11 UTC

> Please see improvements to the tutorial for all to test, below.

I just remembered I may have skipped a step which was done years ago.

Rightclick on openvpn.exe > Properties > Compatibility >
[x]Run this program as an administrator
[Change settings for all users]
[x]Run this program as an administrator
[OK][OK]
--
When you test the tutorial, please let me know what to improve
as the goal is for everyone to benefit every time we solve an issue.

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

<iq5vbeF2hu1U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=55331&group=alt.comp.os.windows-10#55331

  copy link   Newsgroups: alt.comp.os.windows-10 alt.comp.microsoft.windows alt.msdos.batch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: void-invalid-dead-dontuse@email.invalid (Brian Gregory)
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: Sun, 12 Sep 2021 10:25:01 +0100
Lines: 10
Message-ID: <iq5vbeF2hu1U1@mid.individual.net>
References: <she5mh$17nl$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net SskmvA+pgLv+j6F5axBP5QguvOLYHdNnv2ieoCmaorcqZ5fo6Q
Cancel-Lock: sha1:BH3MUXqG5rfOmwpKtlbFUG5IVIY=
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.1.0
Content-Language: en-GB
In-Reply-To: <she5mh$17nl$1@gioia.aioe.org>
 by: Brian Gregory - Sun, 12 Sep 2021 09:25 UTC

On 10/09/2021 00:34, Scott Lurndal wrote:
> Why doesn't right clicking on the batch command to select "run as admin"
> work, when running the batch command in an admin window works just fine?
>...

I think right clicking and running as administrator tends to change the
current directory to your user directory. Could that be the problem?

--
Brian Gregory (in England).

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

<shkkjh$1ucn$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=55332&group=alt.comp.os.windows-10#55332

  copy link   Newsgroups: alt.comp.os.windows-10 alt.comp.microsoft.windows alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!byfYGra9UYTu3eUW2DIdpA.user.46.165.242.75.POSTED!not-for-mail
From: scott@slp53.sl.home (Scott Lurndal)
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: Sun, 12 Sep 2021 13:25:56 +0300
Organization: UsenetServer - www.usenetserver.com
Message-ID: <shkkjh$1ucn$1@gioia.aioe.org>
References: <she5mh$17nl$1@gioia.aioe.org> <a9vljg9tspkefitk4ao7qr076t60ron1r1@4ax.com> <shf5vl$f1m$1@dont-email.me> <shhs99$ogs$1@gioia.aioe.org> <iq3b2eFhkdgU1@mid.individual.net>
Reply-To: slp53@pacbell.net
Injection-Info: gioia.aioe.org; logging-data="63895"; posting-host="byfYGra9UYTu3eUW2DIdpA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-newsreader: xrn 9.03-beta-14-64bit
 by: Scott Lurndal - Sun, 12 Sep 2021 10:25 UTC

Andy Burns writes:
> I'm surprised windows follows the .ovpn file association to even do that

To better help others...

And to Andy's point that we "could" also use a different ovpn-association
use model, below is documentred a _different_ tutorial, showing how to open
any number of free openvpn config files previously downloaded off the
Internet and then to select a score of them to doubleclick on them en masse,
where only the first working one will connect you to an openvpn server (the
rest drop off).

It's an efficient use model when you simply want to randomly change your IP
address, for example.

Here's how to set that up if anyone is interested in that use model.
a. Clicking on *.ovpn files opens them in the OpenVPN Daemon.
b. Turn off the UAC nag screen that pops up every time an *ovpn is opened.
c. Set OpenVPN Daemon running-log files to open up in the same spot.
d. Add a 32-bit registry DWORD to open more than 15 files at a time.

A. Set the Windows 10 file association for *.ovpn to open in the daemon
Right click on any *.ovpn text configuration file in Windows 10
Select "Open with" and then "Choose another app".
Click the [x] checkbox for "Always use this app to open *.ovpn files".
Change from: *.ovpn starts with the OpenVPN GUI (openvpnserv.exe)
Change to: *.ovpn starts with the OpenVPN Daemon (openvpn.exe)

B. Set the executable permissions for OpenVPN/bin/*.exe
Rightclick on openvpn.exe > Properties > Compatibility >
[x]Run this program as an administrator
[Change settings for all users]
[x]Run this program as an administrator
[OK][OK]

C. Set OpenVPN Daemon running logs to open up in the same spot!
Doubleclick on an *.ovpn file to open up the OpenVPN Daemon log
Right click in the top bar of that running log file
Select "Properties" & go to the "Layout" tab
Position the window as you want all of the windows to appear
Uncheck the checkbox for "[ ]Let system position window"
Press OK

Be careful if that spot is a second screen as you won't be able
to see open VPN windows when/if you disconnect that second screen.

D. Add a Windows 10 32-bit DWORD to open more than 15 files at a time.
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer
Name : MultipleInvokePromptMinimum
Type : DWORD
Default : 15 (decimal)
Change to: 200 (decimal)

In summary, another use model is to download many openvpn free configuration
files from the Internet, to select a few at a time, to randomly connect to
the first that works using this sequence after the setup performed above:
1. Download the openvpn config files
2. Rightclick select a handful of openvpn config files in Windows FE
3. Hit "Open" from the Windows File Explorer pop-up menu.

Any openvpn config files that work after the first will just die, and any
files that fail will remain in a hung window. Close the hung windows by
clicking on the [x] box, all of which are lined up for efficiency.

To gracefully close the one working window, press "F4" in that window.
HTH (and, as always, please improve so all benefit from your suggestions.)

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

<shkojr$1nm9$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=55333&group=alt.comp.os.windows-10#55333

  copy link   Newsgroups: alt.comp.os.windows-10 alt.comp.microsoft.windows alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!byfYGra9UYTu3eUW2DIdpA.user.46.165.242.75.POSTED!not-for-mail
From: scott@slp53.sl.home (Scott Lurndal)
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: Sun, 12 Sep 2021 14:34:22 +0300
Organization: UsenetServer - www.usenetserver.com
Message-ID: <shkojr$1nm9$1@gioia.aioe.org>
References: <she5mh$17nl$1@gioia.aioe.org> <iq5vbeF2hu1U1@mid.individual.net>
Reply-To: slp53@pacbell.net
Injection-Info: gioia.aioe.org; logging-data="57033"; posting-host="byfYGra9UYTu3eUW2DIdpA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-newsreader: xrn 9.03-beta-14-64bit
 by: Scott Lurndal - Sun, 12 Sep 2021 11:34 UTC

Brian Gregory writes:
> I think right clicking and running as administrator tends to change the
> current directory to your user directory. Could that be the problem?

Yes. The problem was explained first by Herbert Kleebauer.

So that everyone always benefits, here is the latest tutorial update, with many improvements using Windows tricks.

Tutorial: How to _efficiently_ set up free openvpn on Windows 10

Note this is not the default documented openvpn GUI installation setup method. If you want to use the default openvpn GUI, follow instructions at the site you obtained the OpenVPN client software.

This is how I set up openvpn to work efficiently with _many_ ovpn files.

1. Download and install a free open source Windows "openvpn" client.
This is the one I'd use: https://openvpn.net/community-downloads/
https://swupdate.openvpn.org/community/releases/OpenVPN-2.5.3-I601-amd64.msi

Note the default use model is the OpenVPN client GUI.
I use the OpenVPN client executable instead, for more direct control.

After installation, I change a few things to garner more control:
a. I change the *.ovpn file association from the GUI to the client.
b. I set permissions for OpenVPN/bin/*.exe to run as administrator.
c. I add a 32-bit registry DWORD to open more than 15 files.
d. I set OpenVPN Daemon to open logs in the same spot.
e. Optionally, I bypass the UAC nag screen (or change the sound).

A. Set the Windows 10 file association for *.ovpn to open in the daemon
Right click on any *.ovpn file in the Windows 10 File Explorer.
Select "Open with" and then "Choose another app".
Select [x] Always use this app to open *.ovpn files
Change from: *.ovpn starts with the OpenVPN GUI (openvpnserv.exe)
Change to: *.ovpn starts with the OpenVPN Daemon (openvpn.exe)

B. Set the executable permissions for OpenVPN/bin/*.exe to run as admin.
Rightclick on openvpn.exe > Properties > Compatibility >
[x]Run this program as an administrator
[Change settings for all users]
[x]Run this program as an administrator
[OK][OK]

C. Add a Windows 10 32-bit DWORD to open more than 15 files at a time.
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer
Name : MultipleInvokePromptMinimum
Type : DWORD
Default : 15 (decimal)
Change to: 200 (decimal)

D. Set OpenVPN Daemon running logs to open up in the same spot!
Doubleclick on an *.ovpn file to open up the OpenVPN Daemon log
Right click in the top bar of that running log file
Select "Properties" & go to the "Layout" tab
Position the window as you want all of the windows to appear
Uncheck the checkbox for "[ ]Let system position window"
Press OK

Be careful if that spot is a second screen as you won't be able
to see open VPN windows when/if you disconnect that second screen.

E. Optionally bypass UAC which otherwise pop up when an *ovpn is run
by adding a shortcut that calls the task scheduler which calls the
executable "with highest privileges".

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\vpnopen.exe
This allows "Win+R > vpnopen" to work.

C:\pathto\link\vpnopen.lnk
TARGET=C:\Windows\System32\schtasks.exe /run /TN "task:vpnopen"
STARTIN=%windir%\system32
COMMENT=taskschd.msc > Task Scheduler Library > task:vpnopen>
General > [x]Run with highest privileges
Actions > Start a program > Program/script > %comspec%
Add arguments > /c start "" c:\pathto\openvpn.exe c:\pathto\configs\openvpn.ovpn

Optionally, if you keep UAC, you could change the sound (if desired):
From: C:\Windows\Media\Windows User Account Control.wav
To: C:\Windows\Media\ding.wav
Control Panel -> Hardware and Sound -> Sound -> Change system sounds
Sounds -> Windows User Account Control ->
Browse -> C:\Windows\Media\ding.wav -> Test -> Apply -> OK

2. Download any number of free openvpn configuration files off the net.
You can get these free configuration files from many locations.

This is just one common free example (password changes daily):
https://www.freeopenvpn.org/
https://www.freeopenvpn.org/ovpn/USA_freeopenvpn_udp.ovpn
(other countries and protocols exist at that web site)

Here is another common free set of openvpn configuration files
(where the login/password credentials are embedded in the file):
https://vanwa.tech/vpn
https://vanwa.tech/free-openvpn-service
https://vanwa.tech/download-free-openvpn-config

And many others (many don't even require a change of login/password):
https://www.vpngate.net/en/

For our example, we'll use this particular free openvpn config file:
https://www.freeopenvpn.org/ovpn/USA_freeopenvpn_udp.ovpn

Save that file to wherever you want to store your VPN configs.
c:\pathto\configs\freeopenvpn.ovpn

3. Create a freeopenvpn.txt text file for the login & daily password.
notepad.exe freeopenvpn.txt

Each OpenVPN config file can authenticate differently.
Adjust each approach based on the specific authentication method.
For example, for freeopenvpn.org, I'd create a login/password file.

In that file I'd put the current login & password, each on a line.
freeopenvpn
173975185

Note that the freeopenvpn.org password changes frequently where
you will need to update that password file when it changes.

4. Then I'd modify the config file to find that login/password file:
C:\> notepad.exe USA_freeopenvpn_udp.ovpn

Change this line from:
auth-user-pass
Change that line to the full path to the login/password file:
auth-user-pass c:\\pathto\\configs\\freeopenvpn.txt

5. Create a batch command to run VPN for you as administrator.
notepad.exe freeopenvpn.bat

In that file you can add one line to call the desired config file.
c:\pathto\openvpn\bin\openvpn.exe c:\pathto\configs\freeopenvpn.ovpn

If desired, add paths, variables and/or a pause in case of error.

REM freeopenvpn.bat
cd c:\pathto\configs\
c:\pathto\openvpn\bin\openvpn.exe c:\pathto\configs\freeopenvpn.ovpn
pause

Or, if you want to use variables, something like this would be ok:
REM freeopenvpn.bat
REM https://www.freeopenvpn.org/premium.php?cntid=USA&lang=en
set configdir=c:\pathto\configs\
set configcmd=c:\pathto\openvpn\bin\openvpn.exe
set configfile=freeopenvpn.ovpn
cd $configdir
%configcmd% %configdir%%configfile%
pause

6. Now you can get on that free VPN by any of a few efficient methods:

I usually run it at the command line inside an administrator window:
Win+R > cmd{ctrl+shft+rtn}
C:\> .\freeopenvpn.bat

But you can also run it as admin via the Windows File Explorer.
{Rightclick on freeopenvpn.bat}{Select "Run as administrator"}

Or, in an administrator window, you can directly run the commands:
c:\pathto\openvpn\bin\openvpn.exe c:\pathto\configs\freeopenvpn.ovpn

Or, you can just doubleclick on the freeopenvpn.config file if you've
set up the "ovpn" file associations to run the openvpn client daemon
(openvpn.exe) instead of the openvpn client GUI (abc).

Note that you must run openvpn.exe as admin on Windows 10.
Otherwise it won't be able to successfully modify the routing table.

You can check the routing table before and after running the command:
route print | more

7. Doublecheck that you are on VPN if you're not sure you're connected.
Win+R > cmd{Enter}
C:\> curl icanhazip.com
That should return whatever IP address you're connected as.

You can create a command to run in the Run box if you like.
REM curlit.bat
%comspec% /k curl icanhazip.com

8. Each day you want to use VPN, check for the new password:
https://www.freeopenvpn.org/

a. Modify the password line, as needed, of the freeopenvpn.txt file.
b. Press "F4" in the resulting command window when you wish to exit.

9. The steps are similar for vanwa.tech (but even simpler):
REM vanwa.bat
REM https://vanwa.tech/download-free-openvpn-config
set configfile=vanwa.ovpn
set configcmd=c:\pathto\openvpn\bin\openvpn.exe
set configdir=c:\pathto\configs\
cd $configdir
%configcmd% %configdir%%configfile%
pause

10. Steps are similar (but with different proclivities) for vpngate.net:
REM vpngate.net
set configfile=vpngate.ovpn
set configcmd=c:\pathto\openvpn\bin\openvpn.exe
set configdir=c:\pathto\configs\
cd $configdir
%configcmd% %configdir%%configfile%
pause

In summary, there are many freely available openvpn configuration files
on the net, all of which work with the FOSS openvpn client. Each works
slightly differently though in what they require for authentication.

And that is what we're dealing with here, in addition to being
able to run any number of these files at will.


Click here to read the complete article
Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor