Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Everything should be made as simple as possible, but not simpler." -- Albert Einstein


devel / alt.msdos.batch / Re: Change the right click context menu for Windows batch *.bat files

SubjectAuthor
* Change the right click context menu for Windows batch *.bat filesJohn Robertson
+* Re: Change the right click context menu for Windows batch *.bat filesStan Brown
|`- Re: Change the right click context menu for Windows batch *.bat filesR.Wieser
+* Re: Change the right click context menu for Windows batch *.bat filesZaidy036
|+- Re: Change the right click context menu for Windows batch *.bat filesRene Lamontagne
|`* Re: Change the right click context menu for Windows batch *.bat filesZaidy036
| `* Re: Change the right click context menu for Windows batch *.batKerr-Mudd, John
|  `* Re: Change the right click context menu for Windows batch *.bat filesStan Brown
|   `* Re: Change the right click context menu for Windows batch *.bat filesJohn Robertson
|    +* Re: Change the right click context menu for Windows batch *.bat filesHeron
|    |`- Re: Change the right click context menu for Windows batch *.bat filesPaul
|    `- Re: Change the right click context menu for Windows batch *.bat filesBugsy
+- Re: Change the right click context menu for Windows batch *.bat filesmechanic
`* Re: Change the right click context menu for Windows batch *.bat filesJJ
 `* Re: Change the right click context menu for Windows batch *.bat filesZaidy036
  `* Re: Change the right click context menu for Windows batch *.bat filesJohn Robertson
   +* Re: Change the right click context menu for Windows batch *.bat filesHerbert Kleebauer
   |`* Re: Change the right click context menu for Windows batch *.bat filesJohn Robertson
   | `- Re: Change the right click context menu for Windows batch *.bat filesHerbert Kleebauer
   `* Re: Change the right click context menu for Windows batch *.bat filesZaidy036
    `- Re: Change the right click context menu for Windows batch *.bat filesZaidy036

1
Change the right click context menu for Windows batch *.bat files

<t9s9oo$tk6m$1@news.mixmin.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=200&group=alt.msdos.batch#200

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!.POSTED!not-for-mail
From: spa...@flippers.com (John Robertson)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Change the right click context menu for Windows batch *.bat files
Date: Sun, 3 Jul 2022 08:40:49 -0600
Organization: Mixmin
Message-ID: <t9s9oo$tk6m$1@news.mixmin.net>
Reply-To: spam@flippers.com
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 3 Jul 2022 14:40:24 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="bf378acd0e99a434117066664e0d5e05b56f1853";
logging-data="970966"; mail-complaints-to="abuse@mixmin.net"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.8.1
Content-Language: en-US
X-Usenet-Provider: http://www.giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: John Robertson - Sun, 3 Jul 2022 14:40 UTC

Is there a way to change the right click context menu for Windows *.bat
batch files to limit the options to just those that I want there?

I don't want open or open with.
I don't want print (as I can print from the editor)
I don't want Scan with Microsoft Defender...
I don't want share
I don't want Restore previous versions
I don't want send to

All I do want is what I do with a batch file.
For example, I definitely want the "Run as administrator" item
And I only need "Edit" and not print (because I can print from the editor)
I'm ok with the "Send to" section (but which I never use)
I'm ok with the "cut & copy" section too
I'm ok with the "Create shortcut, deleted, and rename" section
And I'm ok with the "Properties" section

That's it.
Is there a way to change the batch context menu to do just want I want it
to do? (Mostly just "Run as Administrator" and not much else.

--
(Please post followups or tech inquiries to the USENET newsgroup)
John's Jukes Ltd.
MOVED to #7 - 3979 Marine Way, Burnaby, BC, Canada V5J 5E3
(604)872-5757 (Pinballs, Jukes, Video Games)
www.flippers.com
"Old pinballers never die, they just flip out."

Re: Change the right click context menu for Windows batch *.bat files

<MPG.3d2b5d319c522da98ff65@news.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=201&group=alt.msdos.batch#201

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Sun, 3 Jul 2022 09:01:24 -0700
Organization: Oak Road Systems
Lines: 39
Message-ID: <MPG.3d2b5d319c522da98ff65@news.individual.net>
References: <t9s9oo$tk6m$1@news.mixmin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net I/ZNrPTSInjZtFsGx6f4QAj6QGr4dFLF7oOi5ZT3vogMyMDs9X
Cancel-Lock: sha1:iOxuMu4kT3vrv9ebXGHbLA0FwoI=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Sun, 3 Jul 2022 16:01 UTC

On Sun, 3 Jul 2022 08:40:49 -0600, John Robertson wrote:
>
> Is there a way to change the right click context menu for Windows *.bat
> batch files to limit the options to just those that I want there?
>
> I don't want open or open with.
> I don't want print (as I can print from the editor)
> I don't want Scan with Microsoft Defender...
> I don't want share
> I don't want Restore previous versions
> I don't want send to
>
> All I do want is what I do with a batch file.
> For example, I definitely want the "Run as administrator" item
> And I only need "Edit" and not print (because I can print from the editor)
> I'm ok with the "Send to" section (but which I never use)
> I'm ok with the "cut & copy" section too
> I'm ok with the "Create shortcut, deleted, and rename" section
> And I'm ok with the "Properties" section
>
> That's it.
> Is there a way to change the batch context menu to do just want I want it
> to do? (Mostly just "Run as Administrator" and not much else.

I think the answer is no -- though Paul may correct me, and I'll be
glad to learn something new.

Normally in HKCR in the Registry, you would find .bat, see what its
file type is, find that file type, and make our changes.

But .bat's "file type" is "PersistentHandler", and that's shared with
quite a few three-letter extensions. However, I couldn't find a
"PersistentHandler" subkey under HKCR. So those right-click menu
items may be hard-coded in Windows, or at least coded in a way that
we're not able to change.

--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...

Re: Change the right click context menu for Windows batch *.bat files

<t9shc3$pcd$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=202&group=alt.msdos.batch#202

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: addr...@not.available (R.Wieser)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Sun, 3 Jul 2022 18:50:00 +0200
Organization: Aioe.org NNTP Server
Lines: 22
Message-ID: <t9shc3$pcd$1@gioia.aioe.org>
References: <t9s9oo$tk6m$1@news.mixmin.net> <MPG.3d2b5d319c522da98ff65@news.individual.net>
Injection-Info: gioia.aioe.org; logging-data="25997"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Priority: 3
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
 by: R.Wieser - Sun, 3 Jul 2022 16:50 UTC

Stan,

> But .bat's "file type" is "PersistentHandler",

Not quite. AFAIK that *key*s (default) value
("{5e941d80-bf96-11cd-b579-08002b30bfeb}") is to let windows search know it
is allowed to look at the files contents (google for it).

Personally I would suggest to export (save) both the ".bat" as well as the
"batfile" (the ".bat" keys default entry) and experiment a bit.

For starters deleting keys under "batfile" -> "shell" (perhaps not the
"open" one ...) as well as the whole "ShellEx" key and see how the context
menu changes. Some stuff will disappear, but likely not everything.

If the result is acceptable some of the origional "shell" keys could be
restored (checking the context menu every time ofcourse).

Regards,
Rudy Wieser

Re: Change the right click context menu for Windows batch *.bat files

<t9squ9$34co3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=203&group=alt.msdos.batch#203

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Eri...@Bloch.com (Zaidy036)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Sun, 3 Jul 2022 15:33:29 -0400
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <t9squ9$34co3$1@dont-email.me>
References: <t9s9oo$tk6m$1@news.mixmin.net>
Reply-To: Zaidy036@air.isp.spam
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 3 Jul 2022 19:33:29 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5f0cf3541cea366d368915245e579c89";
logging-data="3289859"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yGARhyXeMvoFKUlo703p0zIzDWW+VvBw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:ncbEtRr5TmK1saqXB9wi0IiqfK8=
In-Reply-To: <t9s9oo$tk6m$1@news.mixmin.net>
Content-Language: en-US
 by: Zaidy036 - Sun, 3 Jul 2022 19:33 UTC

On 7/3/2022 10:40 AM, John Robertson wrote:
> Is there a way to change the right click context menu for Windows *.bat
> batch files to limit the options to just those that I want there?
>
> I don't want open or open with.
> I don't want print (as I can print from the editor)
> I don't want Scan with Microsoft Defender...
> I don't want share
> I don't want Restore previous versions
> I don't want send to
>
> All I do want is what I do with a batch file.
> For example, I definitely want the "Run as administrator" item
> And I only need "Edit" and not print (because I can print from the editor)
> I'm ok with the "Send to" section (but which I never use)
> I'm ok with the "cut & copy" section too
> I'm ok with the "Create shortcut, deleted, and rename" section
> And I'm ok with the "Properties" section
>
> That's it.
> Is there a way to change the batch context menu to do just want I want it
> to do? (Mostly just "Run as Administrator" and not much else.
>
Place a "Batch Cmds" folder in context menu and add commands you want in
the folder.

Re: Change the right click context menu for Windows batch *.bat files

<jiea0kFmjptU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=204&group=alt.msdos.batch#204

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rlam...@shaw.ca (Rene Lamontagne)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Sun, 3 Jul 2022 14:46:31 -0500
Lines: 37
Message-ID: <jiea0kFmjptU1@mid.individual.net>
References: <t9s9oo$tk6m$1@news.mixmin.net> <t9squ9$34co3$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 4qUEg0+iu7kydwcCWCQmTAsYS2LLjRI9U5y3n3wORfTIriu3H3
Cancel-Lock: sha1:75/PiUqS3g1xnLy6ipgCBKTcZh8=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101
Thunderbird/60.9.1
In-Reply-To: <t9squ9$34co3$1@dont-email.me>
Content-Language: en-US
 by: Rene Lamontagne - Sun, 3 Jul 2022 19:46 UTC

On 2022-07-03 2:33 p.m., Zaidy036 wrote:
> On 7/3/2022 10:40 AM, John Robertson wrote:
>> Is there a way to change the right click context menu for Windows *.bat
>> batch files to limit the options to just those that I want there?
>>
>> I don't want open or open with.
>> I don't want print (as I can print from the editor)
>> I don't want Scan with Microsoft Defender...
>> I don't want share
>> I don't want Restore previous versions
>> I don't want send to
>>
>> All I do want is what I do with a batch file.
>> For example, I definitely want the "Run as administrator" item
>> And I only need "Edit" and not print (because I can print from the
>> editor)
>> I'm ok with the "Send to" section (but which I never use)
>> I'm ok with the "cut & copy" section too
>> I'm ok with the "Create shortcut, deleted, and rename" section
>> And I'm ok with the "Properties" section
>>
>> That's it.
>> Is there a way to change the batch context menu to do just want I want it
>> to do? (Mostly just "Run as Administrator" and not much else.
>>
> Place a "Batch Cmds" folder in context menu and add commands you want in
> the folder.

Lots off easy choices here.

https://www.thewindowsclub.com/remove-click-context-menu-items-editors

I have used a couple, no problem.

Rene

Re: Change the right click context menu for Windows batch *.bat files

<jeoqa070n5ts$.dlg@example1357.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=205&group=alt.msdos.batch#205

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!2gG28KunLBwSGcp/ySJqLA.user.46.165.242.91.POSTED!not-for-mail
From: mecha...@example.net (mechanic)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Sun, 3 Jul 2022 21:56:27 +0100
Organization: Aioe.org NNTP Server
Message-ID: <jeoqa070n5ts$.dlg@example1357.net>
References: <t9s9oo$tk6m$1@news.mixmin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="27136"; posting-host="2gG28KunLBwSGcp/ySJqLA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: 40tude_Dialog/2.0.15.1
X-Notice: Filtered by postfilter v. 0.9.2
 by: mechanic - Sun, 3 Jul 2022 20:56 UTC

On Sun, 3 Jul 2022 08:40:49 -0600, John Robertson wrote:

> Is there a way to change the batch context menu to do just want I
> want it to do? (Mostly just "Run as Administrator" and not much
> else.

A simple search on 'howto edit the windows context menu' seems to
provide some useful suggestions.

Re: Change the right click context menu for Windows batch *.bat files

<7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=206&group=alt.msdos.batch#206

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: jj4pub...@outlook.com (JJ)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Mon, 4 Jul 2022 05:41:57 +0700
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net>
References: <t9s9oo$tk6m$1@news.mixmin.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="59793e49d0a1c698503b9ccd7efb0b7f";
logging-data="3327729"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YZlyhngdZ7+V4MfHwxY0WaTFd7QQker4="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:IYg/AZSv0qtlyLg6h8TPBaB2i48=
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
 by: JJ - Sun, 3 Jul 2022 22:41 UTC

On Sun, 3 Jul 2022 08:40:49 -0600, John Robertson wrote:
> Is there a way to change the right click context menu for Windows *.bat
> batch files to limit the options to just those that I want there?
>
> I don't want open or open with.
> I don't want print (as I can print from the editor)
> I don't want Scan with Microsoft Defender...
> I don't want share
> I don't want Restore previous versions
> I don't want send to
>
> All I do want is what I do with a batch file.
> For example, I definitely want the "Run as administrator" item
> And I only need "Edit" and not print (because I can print from the editor)
> I'm ok with the "Send to" section (but which I never use)
> I'm ok with the "cut & copy" section too
> I'm ok with the "Create shortcut, deleted, and rename" section
> And I'm ok with the "Properties" section
>
> That's it.
> Is there a way to change the batch context menu to do just want I want it
> to do? (Mostly just "Run as Administrator" and not much else.

Yes, but you need to know that, all menu items are registered based on the
file type, and those menu items are registered for a pseudo file type which
represent all file types. Kind of like global menu items.

To remove e.g. the Send To menu from bat file type, it has to be
unregistered from the pseudo all-file-type, AND in order for it to be shown
for all other file types, it has to be manually registered for EACH and
every file type, including the pseudo file type which represent unknown file
types. Meaning that if there are 200 known/registered file types in the
system, the menu will need to be added onto the other 199 file types. Also,
for EACH newly registered file type, the menu will need to be manually
added.

In short, yes. It's possible, but it would be a tedious task without the
help of an automation script or program, and it will require additional
effort to re-add the no-longer-global menu items for each new file type
added into the system.

Re: Change the right click context menu for Windows batch *.bat files

<t9td1r$368ah$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=207&group=alt.msdos.batch#207

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Eri...@Bloch.com (Zaidy036)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Sun, 3 Jul 2022 20:42:34 -0400
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <t9td1r$368ah$1@dont-email.me>
References: <t9s9oo$tk6m$1@news.mixmin.net>
<7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net>
Reply-To: Zaidy036@air.isp.spam
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Jul 2022 00:42:35 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="62608022ee2bcc8f1498e23c9cde5d39";
logging-data="3350865"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VGoPZfmF8ZYw1ucsSoX05kW+jga0l/MA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:eaIrdIR1ThusOlWEixV8+r0ZCIM=
In-Reply-To: <7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net>
Content-Language: en-US
 by: Zaidy036 - Mon, 4 Jul 2022 00:42 UTC

On 7/3/2022 6:41 PM, JJ wrote:
> On Sun, 3 Jul 2022 08:40:49 -0600, John Robertson wrote:
>> Is there a way to change the right click context menu for Windows *.bat
>> batch files to limit the options to just those that I want there?
>>
>> I don't want open or open with.
>> I don't want print (as I can print from the editor)
>> I don't want Scan with Microsoft Defender...
>> I don't want share
>> I don't want Restore previous versions
>> I don't want send to
>>
>> All I do want is what I do with a batch file.
>> For example, I definitely want the "Run as administrator" item
>> And I only need "Edit" and not print (because I can print from the editor)
>> I'm ok with the "Send to" section (but which I never use)
>> I'm ok with the "cut & copy" section too
>> I'm ok with the "Create shortcut, deleted, and rename" section
>> And I'm ok with the "Properties" section
>>
>> That's it.
>> Is there a way to change the batch context menu to do just want I want it
>> to do? (Mostly just "Run as Administrator" and not much else.
>
> Yes, but you need to know that, all menu items are registered based on the
> file type, and those menu items are registered for a pseudo file type which
> represent all file types. Kind of like global menu items.
>
> To remove e.g. the Send To menu from bat file type, it has to be
> unregistered from the pseudo all-file-type, AND in order for it to be shown
> for all other file types, it has to be manually registered for EACH and
> every file type, including the pseudo file type which represent unknown file
> types. Meaning that if there are 200 known/registered file types in the
> system, the menu will need to be added onto the other 199 file types. Also,
> for EACH newly registered file type, the menu will need to be manually
> added.
>
> In short, yes. It's possible, but it would be a tedious task without the
> help of an automation script or program, and it will require additional
> effort to re-add the no-longer-global menu items for each new file type
> added into the system.
One way to always run as Admin would be to start the batch with:

If %1=a goto xxxx
SCHTASKS /RUN /TN <TASKNAME> at highest privileges and add argument a.
:xxxx

Re: Change the right click context menu for Windows batch *.bat files

<t9tksp$10be0$1@news.mixmin.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=208&group=alt.msdos.batch#208

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!.POSTED!not-for-mail
From: spa...@flippers.com (John Robertson)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Sun, 3 Jul 2022 20:56:51 -0600
Organization: Mixmin
Message-ID: <t9tksp$10be0$1@news.mixmin.net>
References: <t9s9oo$tk6m$1@news.mixmin.net> <7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net> <t9td1r$368ah$1@dont-email.me>
Reply-To: spam@flippers.com
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Jul 2022 02:56:26 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="6abc5252f8f9389e768b336175680b75459e9407";
logging-data="1060288"; mail-complaints-to="abuse@mixmin.net"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.8.1
Content-Language: en-US
X-Usenet-Provider: http://www.giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: John Robertson - Mon, 4 Jul 2022 02:56 UTC

On 2022/07/03 7:42 pm, Zaidy036 wrote:

> One way to always run as Admin would be to start the batch with:
>
> If %1=a goto xxxx
> SCHTASKS /RUN /TN <TASKNAME> at highest privileges and add argument a.
> :xxxx

If I can get this to work that will be beautiful as then I won't NEED that
damn context menu to run each of a hundred different batch files as admin!

Currently I select all hundred (after editing the registry to allow that),
and then, I right click once to "run as admin" and then I hit the "YES"
button time and again until all are done.

If I could put inside each batch file one line like that which didn't need
me to ALSO create a scheduled task of elevated privileges, that would be
great.

Does your method above REQUIRE a scheduled task for EACH of the hundred
batch files or can I just put that one line in each of the hundred batch
files?

--
(Please post followups or tech inquiries to the USENET newsgroup)
John's Jukes Ltd.
MOVED to #7 - 3979 Marine Way, Burnaby, BC, Canada V5J 5E3
(604)872-5757 (Pinballs, Jukes, Video Games)
www.flippers.com
"Old pinballers never die, they just flip out."

Re: Change the right click context menu for Windows batch *.bat files

<t9u0uq$emh$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=209&group=alt.msdos.batch#209

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!g5FztXLO/MyW1GS7zwuBNg.user.46.165.242.91.POSTED!not-for-mail
From: kle...@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Mon, 4 Jul 2022 08:22:19 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t9u0uq$emh$1@gioia.aioe.org>
References: <t9s9oo$tk6m$1@news.mixmin.net>
<7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net> <t9td1r$368ah$1@dont-email.me>
<t9tksp$10be0$1@news.mixmin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="15057"; posting-host="g5FztXLO/MyW1GS7zwuBNg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Herbert Kleebauer - Mon, 4 Jul 2022 06:22 UTC

On 04.07.2022 04:56, John Robertson wrote:
> On 2022/07/03 7:42 pm, Zaidy036 wrote:
>
>
>> One way to always run as Admin would be to start the batch with:
>>
>> If %1=a goto xxxx
>> SCHTASKS /RUN /TN <TASKNAME> at highest privileges and add argument a.
>> :xxxx
>
> If I can get this to work that will be beautiful as then I won't NEED that
> damn context menu to run each of a hundred different batch files as admin!

Create a link to the batch file, then in the properties of
the link you can specify that it should be run as administrator.

Re: Change the right click context menu for Windows batch *.bat files

<t9uu04$138h8$1@news.mixmin.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=210&group=alt.msdos.batch#210

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!.POSTED!not-for-mail
From: spa...@flippers.com (John Robertson)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Mon, 4 Jul 2022 08:38:23 -0600
Organization: Mixmin
Message-ID: <t9uu04$138h8$1@news.mixmin.net>
References: <t9s9oo$tk6m$1@news.mixmin.net> <7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net> <t9td1r$368ah$1@dont-email.me> <t9tksp$10be0$1@news.mixmin.net> <t9u0uq$emh$1@gioia.aioe.org>
Reply-To: spam@flippers.com
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Jul 2022 14:37:57 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="6abc5252f8f9389e768b336175680b75459e9407";
logging-data="1155624"; mail-complaints-to="abuse@mixmin.net"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.8.1
Content-Language: en-US
X-Usenet-Provider: http://www.giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: John Robertson - Mon, 4 Jul 2022 14:38 UTC

On 2022/07/04 7:22 am, Herbert Kleebauer wrote:

>>> One way to always run as Admin would be to start the batch with:
>>>
>>> If %1=a goto xxxx
>>> SCHTASKS /RUN /TN <TASKNAME> at highest privileges and add argument a.
>>> :xxxx
>>
>> If I can get this to work that will be beautiful as then I won't NEED that
>> damn context menu to run each of a hundred different batch files as admin!
>
> Create a link to the batch file, then in the properties of
> the link you can specify that it should be run as administrator.

Thanks for the advice as I always knew that it was a difficult problem set.
Otherwise I'd already have found a solution in my Internet searches.
Search: How to run a batch file as administrator?

Creating links all day every day fifty times a day might be more work than
just selecting a dozen files at a time and right clicking "Run as Admin."

Mainly I was just trying to clean up the right click context menu so that I
can more easily see "Run as Admin" (for example, if I could put it at the
top or bottom of the list, that would make it easier, as I'm always doing
this all day every day ten times a day.

The batch files change all the time because they are configuration files
that have to be run as administrator because they need to change the
routing table to run VPN.

Each batch file has a different setting for configfile, the problem
being that confifile changes every day a few times a day, otherwise a
single batch file would have worked.

This is the basic boilerplate format of the batch file.
The openvpn config file name changes constantly.
The rest of the boilerplate stays the same.

REM Filename=20220701_1113am_172.178.9.24_udp_1515.bat
REM Must be run as administrator to change the routing table
set DIR=C:\Windows\Temp\openvpn\config\
set CMD=C:\Program Files\OpenVPN\bin\openvpn.exe
set VPN=20220701_1113am_172.178.9.24_udp_1515.ovpn
cd %DIR%
%CMD% %DIR%%VPN%

If I could add lines that put that simple batch skeleton into Administrator
mode when it's doubleclicked, that would solve the problem instantly.

I wouldn't need any rightclick context menu then.
I'd just doubleclick on the batch files.

Otherwise I select a few dozen of these *.bat files and right click and
then select "Run as Administrator" from the *.bat context menu, and then I
hit "Yes" over and over in the UAC prompts until one of those batch files
works.

When that one batch file works, I'm on VPN and then I hit "No" just once to
the UAC prompt and I'm done with interactions until I exit VPN.
--
(Please post followups or tech inquiries to the USENET newsgroup)
John's Jukes Ltd.
MOVED to #7 - 3979 Marine Way, Burnaby, BC, Canada V5J 5E3
(604)872-5757 (Pinballs, Jukes, Video Games)
www.flippers.com
"Old pinballers never die, they just flip out."

Re: Change the right click context menu for Windows batch *.bat files

<t9v36e$5dm$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=211&group=alt.msdos.batch#211

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!g5FztXLO/MyW1GS7zwuBNg.user.46.165.242.91.POSTED!not-for-mail
From: kle...@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Mon, 4 Jul 2022 18:06:38 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t9v36e$5dm$1@gioia.aioe.org>
References: <t9s9oo$tk6m$1@news.mixmin.net>
<7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net> <t9td1r$368ah$1@dont-email.me>
<t9tksp$10be0$1@news.mixmin.net> <t9u0uq$emh$1@gioia.aioe.org>
<t9uu04$138h8$1@news.mixmin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="5558"; posting-host="g5FztXLO/MyW1GS7zwuBNg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Herbert Kleebauer - Mon, 4 Jul 2022 16:06 UTC

On 04.07.2022 16:38, John Robertson wrote:

>
> Otherwise I select a few dozen of these *.bat files and right click and
> then select "Run as Administrator" from the *.bat context menu, and then I
> hit "Yes" over and over in the UAC prompts until one of those batch files
> works.
>
> When that one batch file works, I'm on VPN and then I hit "No" just once to
> the UAC prompt and I'm done with interactions until I exit VPN.

I'm not sure if I understand your problem correctly:
You have a directory with many batch files and you want
to execute them all with admin rights?

Create a file "run_them_all.cmd" with this single line (untested):

for %%i in (*.bat) call %%i

and then execute "run_them_all.cmd" as administrator.

Re: Change the right click context menu for Windows batch *.bat files

<t9v4oa$3e1ui$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=212&group=alt.msdos.batch#212

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Eri...@Bloch.com (Zaidy036)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Mon, 4 Jul 2022 12:33:13 -0400
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <t9v4oa$3e1ui$1@dont-email.me>
References: <t9s9oo$tk6m$1@news.mixmin.net>
<7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net> <t9td1r$368ah$1@dont-email.me>
<t9tksp$10be0$1@news.mixmin.net>
Reply-To: Zaidy036@air.isp.spam
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 4 Jul 2022 16:33:14 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="62608022ee2bcc8f1498e23c9cde5d39";
logging-data="3606482"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OaRTlTNfk29GB+4VX7Yov2eieLDF8oLs="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:8HTJTUyqLnCcYIau7c/ONWXC5FQ=
Content-Language: en-US
In-Reply-To: <t9tksp$10be0$1@news.mixmin.net>
 by: Zaidy036 - Mon, 4 Jul 2022 16:33 UTC

On 7/3/2022 10:56 PM, John Robertson wrote:
> On 2022/07/03 7:42 pm, Zaidy036 wrote:
>
>
>> One way to always run as Admin would be to start the batch with:
>>
>> If %1=a goto xxxx
>> SCHTASKS /RUN /TN <TASKNAME>   at highest privileges and add argument a.
>> :xxxx
>
> If I can get this to work that will be beautiful as then I won't NEED
> that damn context menu to run each of a hundred different batch files as
> admin!
>
> Currently I select all hundred (after editing the registry to allow
> that), and then, I right click once to "run as admin" and then I hit the
> "YES" button time and again until all are done.
>
> If I could put inside each batch file one line like that which didn't
> need me to ALSO create a scheduled task of elevated privileges, that
> would be great.
>
> Does your method above REQUIRE a scheduled task for EACH of the hundred
> batch files or can I just put that one line in each of the hundred batch
> files?
>
Not sure if it will work but maybe set a variable instead of a fixed
TASKNAME. Also may need to kill bat before SCHTASKS

have not tried but maybe something like:

New Batch: _RunAdmin.bat:
TIMEOUT /t 1 > NUL
%_BN% a

Start of Batch to RUN:
If %1=a goto xxxx
SETx _BN <current batch name>
SCHTASKS /RUN /TN _RunAdmin
exit
:xxxx

Re: Change the right click context menu for Windows batch *.bat files

<t9v5nt$3e50b$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=213&group=alt.msdos.batch#213

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Eri...@Bloch.com (Zaidy036)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Mon, 4 Jul 2022 12:50:03 -0400
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <t9v5nt$3e50b$1@dont-email.me>
References: <t9s9oo$tk6m$1@news.mixmin.net>
<7b9dnb0n0pmr.ikcousjj3qhn.dlg@40tude.net> <t9td1r$368ah$1@dont-email.me>
<t9tksp$10be0$1@news.mixmin.net> <t9v4oa$3e1ui$1@dont-email.me>
Reply-To: Zaidy036@air.isp.spam
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 4 Jul 2022 16:50:05 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="62608022ee2bcc8f1498e23c9cde5d39";
logging-data="3609611"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+pnwqWEMciKEp9qfkIiD1ofnIEY8cY54E="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:zpvh4bufSAp4oT0KFc/AYXz5sUw=
Content-Language: en-US
In-Reply-To: <t9v4oa$3e1ui$1@dont-email.me>
 by: Zaidy036 - Mon, 4 Jul 2022 16:50 UTC

On 7/4/2022 12:33 PM, Zaidy036 wrote:
> On 7/3/2022 10:56 PM, John Robertson wrote:
>> On 2022/07/03 7:42 pm, Zaidy036 wrote:
>>
>>
>>> One way to always run as Admin would be to start the batch with:
>>>
>>> If %1=a goto xxxx
>>> SCHTASKS /RUN /TN <TASKNAME>   at highest privileges and add argument a.
>>> :xxxx
>>
>> If I can get this to work that will be beautiful as then I won't NEED
>> that damn context menu to run each of a hundred different batch files
>> as admin!
>>
>> Currently I select all hundred (after editing the registry to allow
>> that), and then, I right click once to "run as admin" and then I hit
>> the "YES" button time and again until all are done.
>>
>> If I could put inside each batch file one line like that which didn't
>> need me to ALSO create a scheduled task of elevated privileges, that
>> would be great.
>>
>> Does your method above REQUIRE a scheduled task for EACH of the
>> hundred batch files or can I just put that one line in each of the
>> hundred batch files?
>>
> Not sure if it will work but maybe set a variable instead of a fixed
> TASKNAME. Also may need to kill bat before SCHTASKS
>
> have not tried but maybe something like:
>
> New Batch: _RunAdmin.bat:
> TIMEOUT /t 1 > NUL
> %_BN% a
>
> Start of Batch to RUN:
> If %1=a goto xxxx
> SETx _BN <current batch name>
> SCHTASKS /RUN /TN _RunAdmin
> exit
> :xxxx

Look at
https://www.google.com/search?client=firefox-b-1-d&q=regedit+to+force+running+as+admin

Re: Change the right click context menu for Windows batch *.bat files

<ta5bu9$63rs$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=214&group=alt.msdos.batch#214

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Eri...@Bloch.com (Zaidy036)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Wed, 6 Jul 2022 21:12:41 -0400
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <ta5bu9$63rs$1@dont-email.me>
References: <t9s9oo$tk6m$1@news.mixmin.net> <t9squ9$34co3$1@dont-email.me>
Reply-To: Zaidy036@air.isp.spam
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 7 Jul 2022 01:12:41 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="73cf773a3080131fc3c53653673e77c6";
logging-data="200572"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lm8RW0w+8lH1UXCgLP5+kr+hGSE/MAUQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:yZU7/QbxtSSAjFL8XCEBXLlUMO4=
Content-Language: en-US
In-Reply-To: <t9squ9$34co3$1@dont-email.me>
 by: Zaidy036 - Thu, 7 Jul 2022 01:12 UTC

On 7/3/2022 3:33 PM, Zaidy036 wrote:
> On 7/3/2022 10:40 AM, John Robertson wrote:
>> Is there a way to change the right click context menu for Windows *.bat
>> batch files to limit the options to just those that I want there?
>>
>> I don't want open or open with.
>> I don't want print (as I can print from the editor)
>> I don't want Scan with Microsoft Defender...
>> I don't want share
>> I don't want Restore previous versions
>> I don't want send to
>>
>> All I do want is what I do with a batch file.
>> For example, I definitely want the "Run as administrator" item
>> And I only need "Edit" and not print (because I can print from the
>> editor)
>> I'm ok with the "Send to" section (but which I never use)
>> I'm ok with the "cut & copy" section too
>> I'm ok with the "Create shortcut, deleted, and rename" section
>> And I'm ok with the "Properties" section
>>
>> That's it.
>> Is there a way to change the batch context menu to do just want I want it
>> to do? (Mostly just "Run as Administrator" and not much else.
>>
> Place a "Batch Cmds" folder in context menu and add commands you want in
> the folder.

How to add to context menu:
<https://www.howtogeek.com/howto/windows-vista/add-any-application-to-the-desktop-right-click-menu-in-vista/>

Re: Change the right click context menu for Windows batch *.bat files

<20220707111214.705f42b9f88920bd7eb91d10@127.0.0.1>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=215&group=alt.msdos.batch#215

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: adm...@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat
files
Date: Thu, 7 Jul 2022 11:12:14 +0100
Organization: Dis
Lines: 38
Message-ID: <20220707111214.705f42b9f88920bd7eb91d10@127.0.0.1>
References: <t9s9oo$tk6m$1@news.mixmin.net>
<t9squ9$34co3$1@dont-email.me>
<ta5bu9$63rs$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="9489ce528f518e49b961c0be873ceadc";
logging-data="380216"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19LsCGKe10CB+mUNDWtkBiwqoaGsmKl7AA="
Cancel-Lock: sha1:5JpvtlVW4hE3Y1NcFft8bkza490=
GNU: Terry Pratchett
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
;X-no-Archive: Maybe
 by: Kerr-Mudd, John - Thu, 7 Jul 2022 10:12 UTC

On Wed, 6 Jul 2022 21:12:41 -0400
Zaidy036 <Eric@Bloch.com> wrote:

> On 7/3/2022 3:33 PM, Zaidy036 wrote:
> > On 7/3/2022 10:40 AM, John Robertson wrote:
> >> Is there a way to change the right click context menu for Windows *.bat
> >> batch files to limit the options to just those that I want there?
> >>
> >> I don't want open or open with.
> >> I don't want print (as I can print from the editor)
> >> I don't want Scan with Microsoft Defender...
> >> I don't want share
> >> I don't want Restore previous versions
> >> I don't want send to
> >>
> >> All I do want is what I do with a batch file.
> >> For example, I definitely want the "Run as administrator" item
> >> And I only need "Edit" and not print (because I can print from the
> >> editor)
> >> I'm ok with the "Send to" section (but which I never use)
> >> I'm ok with the "cut & copy" section too
> >> I'm ok with the "Create shortcut, deleted, and rename" section
> >> And I'm ok with the "Properties" section
> >>
> >> That's it.
> >> Is there a way to change the batch context menu to do just want I want it
> >> to do? (Mostly just "Run as Administrator" and not much else.
> >>
> > Place a "Batch Cmds" folder in context menu and add commands you want in
> > the folder.
>
> How to add to context menu:
> <https://www.howtogeek.com/howto/windows-vista/add-any-application-to-the-desktop-right-click-menu-in-vista/>

It's *removing* (most of) the context menu is what the OP wants.

--
Bah, and indeed Humbug.

Re: Change the right click context menu for Windows batch *.bat files

<MPG.3d30ef617c17a9e698ff67@news.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=216&group=alt.msdos.batch#216

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Thu, 7 Jul 2022 14:26:26 -0700
Organization: Oak Road Systems
Lines: 20
Message-ID: <MPG.3d30ef617c17a9e698ff67@news.individual.net>
References: <t9s9oo$tk6m$1@news.mixmin.net> <t9squ9$34co3$1@dont-email.me> <ta5bu9$63rs$1@dont-email.me> <20220707111214.705f42b9f88920bd7eb91d10@127.0.0.1>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net IGO4F38vjukNMcgOoRGU/gb37WNpGdkBeZDzoLCDkfKpDdcwXP
Cancel-Lock: sha1:p7rLu47riU1pl+ta+AGSbYwRbiA=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Thu, 7 Jul 2022 21:26 UTC

On Thu, 7 Jul 2022 11:12:14 +0100, Kerr-Mudd, John wrote:
>
> On Wed, 6 Jul 2022 21:12:41 -0400
> Zaidy036 <Eric@Bloch.com> wrote:

> > How to add to context menu:
> > <https://www.howtogeek.com/howto/windows-vista/add-any-application-to-the-desktop-right-click-menu-in-vista/>
>
> It's *removing* (most of) the context menu is what the OP wants.

<https://preview.tinyurl.com/4fr57rt9>

which resolves to

<https://www.howtogeek.com/howto/windows-vista/how-to-clean-up-your-
messy-windows-context-menu/>

--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...

Re: Change the right click context menu for Windows batch *.bat files

<ta81vo$1n1k7$1@news.mixmin.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=217&group=alt.msdos.batch#217

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!.POSTED!not-for-mail
From: spa...@flippers.com (John Robertson)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Thu, 7 Jul 2022 19:41:40 -0600
Organization: Mixmin
Message-ID: <ta81vo$1n1k7$1@news.mixmin.net>
References: <t9s9oo$tk6m$1@news.mixmin.net> <t9squ9$34co3$1@dont-email.me> <ta5bu9$63rs$1@dont-email.me> <20220707111214.705f42b9f88920bd7eb91d10@127.0.0.1> <MPG.3d30ef617c17a9e698ff67@news.individual.net>
Reply-To: spam@flippers.com
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 8 Jul 2022 01:41:13 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="6abc5252f8f9389e768b336175680b75459e9407";
logging-data="1803911"; mail-complaints-to="abuse@mixmin.net"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.8.1
Content-Language: en-US
X-Usenet-Provider: http://www.giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: John Robertson - Fri, 8 Jul 2022 01:41 UTC

On 2022/07/07 10:26 pm, Stan Brown wrote:

>>> How to add to context menu:
>>> <https://www.howtogeek.com/howto/windows-vista/add-any-application-to-the-desktop-right-click-menu-in-vista/>
>>
>> It's *removing* (most of) the context menu is what the OP wants.
>
> <https://preview.tinyurl.com/4fr57rt9>
>
> which resolves to
>
> <https://www.howtogeek.com/howto/windows-vista/how-to-clean-up-your-
> messy-windows-context-menu/>

Thanks for those suggestions as doing what they said got me going finally
because I was like a cat frozen while staring at a car bearing down on it.

I started with what they called "the hard way" and then opted for "the easy
way" which was to download the nirsoft utilities.

The first step was to remove the sendto context entries.
HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\Send To
https://www.howtogeek.com/howto/windows-vista/disable-the-send-to-folder-on-the-windows-explorer-context-menu/

The second step was to remove the openwith context entries
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\
I removed entries in the .bat registry key OpenWithList registry subkey.
https://www.howtogeek.com/howto/18119/remove-programs-from-open-with-menu-in-explorer/

The third step was to use ShellExView, which handles shellex items.
https://www.nirsoft.net/utils/shexview.html
I searched for .bat" which only had three lines all of which I disabled.
edit
Run as different user
runas

But I had to re-enable "runas" to "Run as Administrator" which is the only
context menu I need for a batch file.

The fourth step was to use ShellMenuView, which handles regular shell items
I removed the .openWith but I couldn't see how to get rid of the "Open" and
"Print" neither of which I'll ever need for a batch file.
https://www.nirsoft.net/utils/shell_menu_view.html

Then I went back to the hard way because at first I also couldn't get rid
of "Share" or "Scan with Microsoft Defender" or "Scan with Malwarebytes" or
"Restore previous version" or "Open" or "Print" context menu entries.

Then I found this which said to go to Settings : General : Windows Explorer
settings in malware bytes and turn it off but it was already off.
So I deleted malwarebytes instead which cleaned up that menu entry.
https://windowsloop.com/remove-scan-with-malwarebytes-in-right-click-menu/

To remove the scan with microsoft defender context menu I ran this file
https://www.tenforums.com/attachments/tutorials/286913d1594060844-add-remove-scan-microsoft-defender-context-menu-windows-10-a-remove_scan_with_microsoft_defender_context_menu.reg
https://www.tenforums.com/tutorials/18145-add-remove-scan-microsoft-defender-context-menu-windows-10-a.html
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\EPP]
[-HKEY_CLASSES_ROOT\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}]
[-HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\EPP]
[-HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\EPP]

To remove the "Share" item from the context menu I went to
Computer\HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\ModernSharing
https://www.thewindowsclub.com/remove-share-button-context-menu-windows-10#

To remove "Restore previous versions" from the context menu I went to
https://www.tenforums.com/tutorials/79513-remove-previous-versions-context-menu-properties-windows-10-a.html
https://www.tenforums.com/attachments/tutorials/125429d1489709794-remove-previous-versions-context-menu-properties-windows-10-a-remove_previous_versions_from_properties_and_context_menu.reg

To remove the "Print" from the context menu I went to
https://winaero.com/remove-print-context-menu-in-windows-10/
https://winaero.com/download.php?view.2309

At this point I realized what someone was trying to warn me about which is
that it wasn't just affecting "batch" files but most other files, so I
didn't remove the "Open" but at least now the "Run as administrator" is the
second item down (after "Open") and I'm down to about ten entries in total.

Much surprised nothing required a reboot.
Thanks for all the help.
I'm sure I'll be sorry in days to come if other file types are affected.
Such is editing the registry (I didn't bother with a backup).
--
(Please post followups or tech inquiries to the USENET newsgroup)
John's Jukes Ltd.
MOVED to #7 - 3979 Marine Way, Burnaby, BC, Canada V5J 5E3
(604)872-5757 (Pinballs, Jukes, Video Games)
www.flippers.com
"Old pinballers never die, they just flip out."

Re: Change the right click context menu for Windows batch *.bat files

<ta9n7p$1tl8$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=218&group=alt.msdos.batch#218

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!3LynqicjQzfGNMG55oB4VQ.user.46.165.242.75.POSTED!not-for-mail
From: McKeis...@ipanywhere.com (Heron)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Fri, 8 Jul 2022 11:50:29 -0500
Organization: Aioe.org NNTP Server
Message-ID: <ta9n7p$1tl8$1@gioia.aioe.org>
References: <t9s9oo$tk6m$1@news.mixmin.net> <t9squ9$34co3$1@dont-email.me> <ta5bu9$63rs$1@dont-email.me> <20220707111214.705f42b9f88920bd7eb91d10@127.0.0.1> <MPG.3d30ef617c17a9e698ff67@news.individual.net> <ta81vo$1n1k7$1@news.mixmin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="63144"; posting-host="3LynqicjQzfGNMG55oB4VQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Heron - Fri, 8 Jul 2022 16:50 UTC

On 7/7/2022 8:41 PM, John Robertson wrote:
> To remove "Restore previous versions" from the context menu I went to
> https://www.tenforums.com/tutorials/79513-remove-previous-versions-context-menu-properties-windows-10-a.html
> https://www.tenforums.com/attachments/tutorials/125429d1489709794-remove-previous-versions-context-menu-properties-windows-10-a-remove_previous_versions_from_properties_and_context_menu.reg

What does "restore previous versions" even mean?

Re: Change the right click context menu for Windows batch *.bat files

<ta9o5e$3ec2v$1@paganini.bofh.team>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=219&group=alt.msdos.batch#219

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!paganini.bofh.team!not-for-mail
From: bug...@zimage.comBUGSY (Bugsy)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Fri, 8 Jul 2022 12:06:17 -0500
Organization: To protect and to server
Message-ID: <ta9o5e$3ec2v$1@paganini.bofh.team>
References: <t9s9oo$tk6m$1@news.mixmin.net> <t9squ9$34co3$1@dont-email.me> <ta5bu9$63rs$1@dont-email.me> <20220707111214.705f42b9f88920bd7eb91d10@127.0.0.1> <MPG.3d30ef617c17a9e698ff67@news.individual.net> <ta81vo$1n1k7$1@news.mixmin.net>
Injection-Date: Fri, 8 Jul 2022 17:05:50 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="3616863"; posting-host="a2z8sKC9C8w6k9H6p5z1qQ.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team";
User-Agent: tin/2.4.5-20201224 ("Glen Albyn") (Linux/5.10.19-200.fc33.x86_64 (x86_64))
X-Notice: Filtered by postfilter v. 0.9.1
 by: Bugsy - Fri, 8 Jul 2022 17:06 UTC

John Robertson <spam@flippers.com> wrote:

> At this point I realized what someone was trying to warn me about which is
> that it wasn't just affecting "batch" files but most other files, so I
> didn't remove the "Open" but at least now the "Run as administrator" is the
> second item down (after "Open") and I'm down to about ten entries in total.

There might be a way to flip them but I don't know if this will do it.
https://www.techspot.com/downloads/7095-easy-context-menu.html
https://www.techspot.com/downloads/downloadnow/7095/?evp=82838668d77594315e27a94ae8cf8659&file=9318
https://files02.tchspt.com/temp/EcMenu_x64.exe
--
Please wear your mask!
Bugs are everywhere. :)
!__!
(@)(@)
\.'||'./
-: :: :-
/'..''..'\

Re: Change the right click context menu for Windows batch *.bat files

<ta9v2a$pp6s$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=220&group=alt.msdos.batch#220

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: nos...@needed.invalid (Paul)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: Change the right click context menu for Windows batch *.bat files
Date: Fri, 8 Jul 2022 15:03:37 -0400
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <ta9v2a$pp6s$1@dont-email.me>
References: <t9s9oo$tk6m$1@news.mixmin.net> <t9squ9$34co3$1@dont-email.me>
<ta5bu9$63rs$1@dont-email.me>
<20220707111214.705f42b9f88920bd7eb91d10@127.0.0.1>
<MPG.3d30ef617c17a9e698ff67@news.individual.net>
<ta81vo$1n1k7$1@news.mixmin.net> <ta9n7p$1tl8$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 8 Jul 2022 19:03:38 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="c064375cc2e8c8dd9750951bd9cbb06d";
logging-data="845020"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sEiJ7KOugQ9SByc9PAvCISOzL+Rg+C1o="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:bdeMAMJnjgMRIdxylkg7Qm2TH2Y=
Content-Language: en-US
In-Reply-To: <ta9n7p$1tl8$1@gioia.aioe.org>
 by: Paul - Fri, 8 Jul 2022 19:03 UTC

On 7/8/2022 12:50 PM, Heron wrote:
> On 7/7/2022 8:41 PM, John Robertson wrote:
>> To remove "Restore previous versions" from the context menu I went to
>> https://www.tenforums.com/tutorials/79513-remove-previous-versions-context-menu-properties-windows-10-a.html
>> https://www.tenforums.com/attachments/tutorials/125429d1489709794-remove-previous-versions-context-menu-properties-windows-10-a-remove_previous_versions_from_properties_and_context_menu.reg
>
> What does "restore previous versions" even mean?

That is probably a "File History" reference.

https://www.tenforums.com/tutorials/79490-restore-previous-versions-files-folders-drives-windows-10-a.html

Paul

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor