When I open a new text file, I just want it to open with some lines in it like this which would come from some kind of Microsoft Windows template.
What is the Windows magic that will allow a rightclick context menuTry this link. Go down to the response that's had 75 up votes.
selection of "{rightclick} New | Text Document" to create those lines?
When I open a new text file, I just want it to open with some lines in it like this which would come from some kind of Microsoft Windows template.
=============================================================================
=============================================================================
=============================================================================
What is the Windows magic that will allow a rightclick context menu
selection of "{rightclick} New | Text Document" to create those lines?
I would use a batch to put the text into the Windows clipboard:
@echo off
(for /l %%i in (1,1,10) do @echo ==============================&echo.)|clip
Then, when editing a text file, just press <CTRL>-V (or <WIN>-V
if you have added more content to the clipboard) to insert the lines
at any position you like. The batch also could ask which one of
a collection of templates it should put into the clipboard.
When I open a new text file, I just want it to open with some lines in it like this which would come from some kind of Microsoft Windows template.
============================================================================= 12345678901234567890123456789012345678901234567890123456789012345678901234567 =============================================================================
=============================================================================
=============================================================================
=============================================================================
=============================================================================
=============================================================================
=============================================================================
=============================================================================
What is the Windows magic that will allow a rightclick context menu
selection of "{rightclick} New | Text Document" to create those lines?
I created C:\batchfiles\cliptext.bat containing the 3 lines below.
@echo off
REM cliptext.bat cliptext.bat seeds clipboard for subsequent paste
(for /l %%i in (1,1,10) do @echo &=============================================================================&echo.)|clip
Clicking on the batch file worked, but to make it a run command I added
this key to the registry to invoke it from the run box.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\cliptext.exe
But when created a shortcut to that batch file, Windows wouldn't allow me
to pin it to the taskbar.
On 15.10.2024 19:04, Wolf Greenblatt wrote:
I created C:\batchfiles\cliptext.bat containing the 3 lines below.
@echo off
REM cliptext.bat cliptext.bat seeds clipboard for subsequent paste
(for /l %%i in (1,1,10) do @echo &=============================================================================&echo.)|clip
Clicking on the batch file worked, but to make it a run command I added
this key to the registry to invoke it from the run box.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\cliptext.exe
But when created a shortcut to that batch file, Windows wouldn't allow me
to pin it to the taskbar.
Instead of messing around with shortcuts and the registry, I would
use a small exe to start the batch.
But when created a shortcut to that batch file, Windows wouldn't allow me >>> to pin it to the taskbar.
Instead of messing around with shortcuts and the registry, I would
use a small exe to start the batch.
It is even much simpler. Just rename cliptext.bat to cliptext.exe,
then you can drag&drop it to the taskbar. Then rename it back to cliptext.bat and right-click in the taskbar and change the link in
properties also to cliptext.bat.
It's this simple:
1. Pin *any* executable shortcut to the taskbar (for example, Notepad++)
2. Change the shortcut target to C:\batchfiles\cliptext.bat
That's it!
This is the current content of C:\batchfiles\cliptext.bat
@echo off
REM cliptext.bat seeds the clipboard for subsequent pastes
(for /l %%i in (1,1,10) do @echo &=============================================================================&echo.)|clip
I could have made a link to anything actually, but I was already using Notepad++ so I used that link (plus the icon is ok as it w/o changing it).
It's this simple:
1. Pin *any* executable shortcut to the taskbar (for example, Notepad++)
2. Change the shortcut target to C:\batchfiles\cliptext.bat
That's it!
It's this simple:
1. Pin *any* executable shortcut to the taskbar (for example, Notepad++)
But if you pin an exe (or a shortcut to an exe), which already has
an icon, to the taskbar, you can't later change the icon in the taskbar.
If you pin an exe without an icon, for example the renamed batch file (cliptext.bat -> cliptext.exe) to the taskbar, you can later add an
icon (for example the standard icon with 4 horizontal lines).
2. Change the shortcut target to C:\batchfiles\cliptext.bat
And change the icon to anything you like (but you can do this only
once).
On Fri, 8 Nov 2024 21:53:12 +0100, Herbert Kleebauer wrote:
I simply export the App Paths key from one machine & load it into another.
It just works.
You export from one machine. You import into the new machine.
And all your commands work the same on both machines.
I simple click into the task bar brings it to foreground
so you can enter the commands. But when using the AppPath method
to register 1.exe, 2.exe and 3.exe you have to type "start 1",
"start 2" or "start 3", 1, 2 or 3 works only with the PATH method.
Each method works. Neither is "abuse" of the mechanism Microsoft provided.
As the other guy already said, the best way to do this (using either
method) is to write a script that has as input which template you want.
command template1
command template2
command template3
On Fri, 8 Nov 2024 21:53:12 +0100, Herbert Kleebauer wrote:
What would be a neat trick, although I don't need it, is to populate the clipboard not with a "type file.txt | clip" but with a word document or an excel spreadsheet (where "type" won't likely work for those templates).
On Fri, 8 Nov 2024 21:53:12 +0100, Herbert Kleebauer wrote:
I never understood that (as it makes use of certificates) - but it works!
showwin.exe 5
del showwin.exe
goto :eof
-----BEGIN CERTIFICATE-----
TVpgAQEAAAAEAAAA//8AAGABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Some day I'll actually understand what you did in the above that works.
On Fri, 8 Nov 2024 21:53:12 +0100, Herbert Kleebauer wrote:
How the App Paths Registry Key Makes Windows Both Faster and Safer
https://helgeklein.com/blog/how-the-app-paths-registry-key-makes-windows-both-faster-and-safer/
I don't see why it will make Windows "Faster and Safer".
I don't either. All I know is when Microsoft gave us the System Registry, I studied how it works & one of the neat things I found was 'App Paths'. https://docs.revenera.com/installshield22helplib/helplibrary/IHelpAddAppPathsToComponent.htm
I latched on to the convenience of the App Paths subkey & its portability. https://learn.microsoft.com/en-us/windows/win32/shell/app-registration
This was so long ago that I don't remember if it was Windows XP or 95 or what, but I made scores of commands those days I'm still using today.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths
Used to register an application for a single user
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths
Used to register an application for all users of the computer
I simply export the App Paths key from one machine & load it into another.
It just works. And I've been using literally that same key for decades. https://superuser.com/questions/1642149/what-does-hklm-software-microsoft-windows-currentversion-app-paths-actually-do
You export from one machine. You import into the new machine.
And all your commands work the same on both machines.
Of course I also bring over my batch & link directories (which contain
almost every script ever proposed on the Windows newsgroups, by the way).
And, of course, you can screw with the PATH and they'd likely still work.
But I have never touched the PATH on Windows in decades as I don't need to.
There is nothing explained.Create a folder and add it to the PATH environment variable* (which is >>>> something you only need to do once). After that you can just drop any >>>> program or batch file into it and start it using the "run" dialog (or from a
command console) - no "app path" fumbling needed anymore.
The article cited explains why it's sophomoric to modify the PATH variable. >>
Agree with you.
You're different than that other guy who was just complaining so I didn't take him seriously. I take you seriously as you're not just complaining.
You're trying to be critically constructive. And that's good. So am I.
Many of my programs are those you wrote that I found on the archives for
this newsgroup whenever I search for things - like your spelling program.
I love that it gives me three chances to spell a word and if I get it
right, then it removes the word from my misspelled word list.
It's great! I think you wrote half the batch scripts that I've used,
although others wrote them too (like Zaidy036) as I copy them verbatim and then when they work for me verbatim, I then modify them as needed.
I think you wrote my sort program, for example, that sorts by microsecond. And I think you wrote the program I use that gets rid of the command
console when I run commands which leave an unnecessary console in place.
I never understood that (as it makes use of certificates) - but it works!
showwin.exe 5
del showwin.exe
goto :eof
-----BEGIN CERTIFICATE-----
TVpgAQEAAAAEAAAA//8AAGABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAoAAAAA4fug4AtAnNIbgBTM0hTmljZSB0byBtZWV0IHNvbWVi
b2R5IHdobyBpcyBzdGlsbCB1c2luZyBET1MsDQpidXQgdGhpcyBwcm9ncmFtIHJl
cXVpcmVzIFdpbjMyLg0KJFBFAABMAQEAUHmlNgAAAAAAAAAA4AAPAQsBBQwAAgAA
AAAAAAAAAADIEAAAABAAAAAgAAAAAEAAABAAAAACAAAFAAAAAAAAAAQAAAAAAAAA
ACAAAAACAAAAAAAAAwAAAAAAEAAAEAAAAAAQAAAQAAAAAAAAEAAAAAAAAAAAAAAA
GBAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAYAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALnRleHQAAAAmAQAAABAAAAACAAAAAgAA
AAAAAAAAAAAAAAAAIAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoEAAAAAAAAJQQAACmEAAA
uhAAAAAAAABgEAAAAAAAAAAAAABUEAAAABAAAIQQAAAAAAAAAAAAAHYQAAAIEAAA
AAAAAAAAAAAAAAAAAAAAAAAAAABVU0VSMzIuZGxsAABoEAAAAAAAAAAAU2hvd1dp
bmRvdwAAS0VSTkVMMzIuZGxsAACUEAAAphAAALoQAAAAAAAAAABHZXRDb21tYW5k
TGluZUEAAABHZXRDb25zb2xlV2luZG93AAAAAEV4aXRQcm9jZXNzAP8VCBBAADHS
SECAOAB0EYA4InUC99IJ0nXvgDggdepAMfa9BQAAAA+2EEAI0nQTgOowcvOA+gl3
7mv2CgHWMe3r5QntdAKJ7v8VDBBAAFZQ/xUAEEAAagD/FRAQQAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAA==
-----END CERTIFICATE-----
Some day I'll actually understand what you did in the above that works.
But for now, I just type "x" in my Runbox to open the directory and then I type the batch file that you wrote that runs what I need w/o the console!
(I never put the two together so that the Runbox command would do both
tasks of going to the directory and running the command - because it's NOT
in the PATH since I never mess with the path - which takes us full circle.)
The App Paths key provides a per-process PATH configuration which increases >>> security by eliminating the need to touch the global system PATH variable. >>Why does this increase security?
I don't know. I was just trying to get rid of the guy who was complaining about how Microsoft does the PATH. I told him to complain to Bill Gates.
I'm just using a feature of the PATH that I've been using for decades.
It's why I never have to modify the PATH.
A Windows App normally isn't just a single exe file but comes with a lot
of additional files, so it needs its own program directory. If you have
a lot of such Apps installed it would be indeed a stupid idea to add all
these program directories to the PATH variable. On the other side, if
you have dozens of single file utilities or batch files, then it would
be stupid, to spread them all over the disk and use a Registry entry
for each of them. Just put them all in a single command directory and
add it to the PATH variable.
That works too. But not every command is a batch file. Some are links.
Links do things easily that batch files don't do as easily, although both
can be made to do everything I'm sure.
Where I use links is when I have to bring up the Windows task scheduler.
Usually I do that only to run commands which need admin privileges.
Or when I want to pin something to the taskbar that won't pin otherwise.
I'm not using the App Paths for any other reason than convenience.
And portability.
Because the Windows App Paths key does more than just run batch files.
When setting up a new PC, the first thing I do, is to copy this command
directory to the new PC and modify the PATH variable. Then my collection
of helper utilities is immediately available.
Yup. I do something similar in that I set up all my concurrent machines and the new machine the same as I set it up on Windows XP and moved forward.
Over time, of course, there are tweaks (for example, the executable for %Windir%\System32\curl.exe ifconfig.me didn't exist in early Windows 10),
but essentially the App Paths key contains everything I run every day.
We both accomplish that portability in a very consistent way.
Only different.
I never mess with the PATH. You do.
You never mess with the App Paths subkey. I do.
The end result is similar and only slightly different from your approach. Your approach is typical. Mine is perhaps not as typical. Both work.
There are other methods also to find any given command on Windows. https://learn.microsoft.com/en-us/windows/win32/shell/app-registration
When I want template #1 for example, I type "1" in the Runbox.
When I want template #2, I type "2"; "3" for template #3, etc.
Instead of typing <WIN>-R I prefer to have a CMD window open all
the time.
Rest assured I *never* type "Win+R". I just type that because most people don't know anything about the runbox so it makes it clear for *them*.
I keep a runbox shortcut pinned to teh taskbar in a prominent spot.
(I just added "prominent" to my spelling list you created, as I had spelled it "prominant" by mistake and it got squiggled so I added it to your list.)
I simple click into the task bar brings it to foreground
so you can enter the commands. But when using the AppPath method
to register 1.exe, 2.exe and 3.exe you have to type "start 1",
"start 2" or "start 3", 1, 2 or 3 works only with the PATH method.
Each method works. Neither is "abuse" of the mechanism Microsoft provided.
As the other guy already said, the best way to do this (using either
method) is to write a script that has as input which template you want.
command template1
command template2
command template3
What would be a neat trick, although I don't need it, is to populate the clipboard not with a "type file.txt | clip" but with a word document or an excel spreadsheet (where "type" won't likely work for those templates).
I don't have that script but if someone posts it, I'll use it.
Most of my stuff is written by you & others like Zaidy03 <Eric@Bloch.com>.
On Fri, 8 Nov 2024 21:53:12 +0100, Herbert Kleebauer wrote:
Many of my programs are those you wrote that I found on the archives for
this newsgroup whenever I search for things - like your spelling program.
I have sometimes wanted to copy the whole contents of a command window
and save it in a file. A "tee" program is usually not sufficient. I
managed to do it with a mouse macro program, but a single command would
be ideal.
But with the new terminal window in WIN11 it is as simple as in
any GUI Windows program. Do a <SHIFT> mouse click on the
first character you want to copy, then scroll down the window
and do a <SHIFT> mouse click on the last character you want to
copy and then a <CTRL>-C to store it in the clipboard.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\1.exe
@Default = c:\path\seedclip_template1.bat
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\1.exe
@Default = c:\path\seedclip_template1.bat
What is this preoccupation with the abuse of that "app paths" registry key ?
Create a folder and add it to the PATH environment variable* (which is something you only need to do once). After that you can just drop any program or batch file into it and start it using the "run" dialog (or from a command console) - no "app path" fumbling needed anymore.
* or, if you do not mind making a mess of things, just pick a folder thats mentioned in that PATH environment variable.
The second nice thing about it is that, when you remove a program/batchfile from that folder, you not also need to remember to remove the "app paths" registry key for it.
Personally I've added a folder as a submenu to the "start" button. Easy to reach and I can just pick the program/batchfile/script/shortcut** I need, instead of having to remember its exact name - using one-letter filenames might be good to minimize keystrokes, but having a descriptive filename
helps you to remember what it actually does.
** which, ofcourse, allows you to execute a (single) program with
(different) arguments.
The article cited explains why it's sophomoric to modify the PATH
variable.
You mean this : "Getting more technical, modifying the system path is
not exactly best practice since it may slow down the system, break other applications and even create security holes." ? Thats mostly FUD.
If you don't know what you're doing* than /almost everything/ is a
security risk.
What is this preoccupation with the abuse of that "app paths" registry
key ?
How the App Paths Registry Key Makes Windows Both Faster and Safer
The article cited explains why it's sophomoric to modify the PATH
variable.
The App Paths key provides a per-process PATH configuration which
increases security by eliminating the need to touch the global
system PATH variable.
The App Paths registry key fixes itself when you remove its default
target.
I have all my menus pinned to the taskbar which access every program
that I need to access via organized shortcuts with specific target attributes.
You can tell the "new" menu entries to start a program* instead of copying the template file.
* which could be a (scripted?) menu allowing you to select whatever template you want for that specific filetype. Or dump it into the clipboard if thats your preference.
Using the "app path" method suffers the same security risk as what I
quoted in the above quote. If you "app path" a program and I
drop a program of the same name in any folder on the PATH than my program, instead of yours, will run.
On Fri, 8 Nov 2024 09:07:43 +0100, R.Wieser wrote:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\1.exe
@Default = c:\path\seedclip_template1.bat
What is this preoccupation with the abuse of that "app paths" registry key ?
How the App Paths Registry Key Makes Windows Both Faster and Safer https://helgeklein.com/blog/how-the-app-paths-registry-key-makes-windows-both-faster-and-safer/
Create a folder and add it to the PATH environment variable* (which is
something you only need to do once). After that you can just drop any
program or batch file into it and start it using the "run" dialog (or from a >> command console) - no "app path" fumbling needed anymore.
The article cited explains why it's sophomoric to modify the PATH variable.
The App Paths key provides a per-process PATH configuration which increases security by eliminating the need to touch the global system PATH variable.
When I want template #1 for example, I type "1" in the Runbox.
When I want template #2, I type "2"; "3" for template #3, etc.
You can tell the "new" menu entries to start a program* instead of
copying
the template file.
* which could be a (scripted?) menu allowing you to select whatever
template
you want for that specific filetype. Or dump it into the clipboard if
thats
your preference.
You seem inordinately upset about how Microsoft designed Windows paths.
Go write your complaint to Microsoft.
It's there to use by people who benefit from using it.
That's me. But not you.
Maybe they'll delete it in Windows 12.
But it has been around since the registry so don't hold your
breath.
Using the "app path" method suffers the same security risk as what
I quoted in the above quote. If you "app path" a program and I
drop a program of the same name in any folder on the PATH than my
program, instead of yours, will run.
Everyone who uses the App Paths method knows how the Windows path works.
But everyone runs a quick test *before* they create a new App Paths key.
If you're actually worried someone is sneaking on your system
writing executables that you then accidentally run,
You're just learning it now perhaps.
You seem inordinately upset about how Microsoft designed Windows paths.
Go write your complaint to Microsoft.
Lol ? I thought I was giving you another option there. One which would
give you the possibility to create a per-extension template choosing.
It's there to use by people who benefit from using it.
That's me. But not you.
You're not very bright, are you ?
That I would not use them like you do doesn't mean my machine doesn't use them at all. I mean, I even gave you the example of FireFox and how it
would not be a good idea to have its folder in the PATH. Yes, FireFox uses an "App Path" entry. Just as a number of other programs do.
Maybe they'll delete it in Windows 12.
But it has been around since the registry so don't hold your
breath.
I know. And your "it slows down everything" is from way-back-when too. You know, when processor speed was measured in MegaHertz and memory in
MegaBytes.
As for me holding my breath ? Why should I do that ? If you think that you /have/ to use that "app path" than please do so. All I did was to show you that its more work than a few of the alternatives.
And yes, you're abusing that "app path". The fact that you create the "app path" with an .EXE extension when you target a batch file should tell you that. But again, if you think you should use it anyway than be my guest.
Using the "app path" method suffers the same security risk as what
I quoted in the above quote. If you "app path" a program and I
drop a program of the same name in any folder on the PATH than my
program, instead of yours, will run.
Everyone who uses the App Paths method knows how the Windows path works.
Don't lie to me kid. If you would have you would not have pointed me to
some website claiming changing the PATH is dangerous - and not explain it yourself - while ignoring that using that "app path" has the same problem.
But everyone runs a quick test *before* they create a new App Paths key.
Lol. A "quick test" of *what* ? You're just throwing some empty - and therefore meaningless - crap around.
Also, When you throw that "Everybody" claim around you're signalling, with a bullhorn, that you're trying to blow some hot air in what you say, not that you have actually talked to just a fraction of that "Everybody" - not even
in your own city.
Just think of it: if you would talk with just 1 million persons (no doubt just a fraction of your countries inhabitants) for five minutes each with no pauses you would need 5.000.000 minutes. A workday is 8*60 => 480 minutes. You would need 5.000.000 / 480 => 10416.6~ workdays, which is 2083.3~ 5-day weeks, which is just over 40 years. You do not even sound that old - and yes, I'm ignoring that the first decade or two of a persons life (s)he's not really a working person.
If you're actually worried someone is sneaking on your system
writing executables that you then accidentally run,
:-) Funny: You point to a security problem in when someone would touch the PATH environment variable, but when I point out that that same problem already exists exists in your own situation you suffenly try to make it
sound as if I am pointing out some quite silly.
You're really not very bright, are you ? The example I gave was, as mentioned, valid for both situations. By telling me that a same-named executable being dropped into a folder on the PATH is rediculous you also shot down the whole "security risk" claim in that link of yours.
And no, you can't have it both ways.
Bottom line:
Yes, I'm annoyed with people who abuse(!) the "app path" method.
I have
shown you several ways to do without them and in the process make everything simpler (and also a suggestion to let a "new" item launch a menu from which you can chose your template - not /that/ simple).
You don't want to use them ? Thats fully upto you.
But do yourself a favour and don't try to push stuff you do not seem to know much of anything about* as the best thing since sliced bread.
* you have not even /tried/ to support the claims in that link of yours, nor where you aware that those claims where rather one-sided.
... Or, when you do and when you come to the realisation that you did so on incomplete and/or incorrect information (for whatever reason), be gracious about it. I'm not someone who has any urge to pummel someone who does so.
How the App Paths Registry Key Makes Windows Both Faster and Safer
https://helgeklein.com/blog/how-the-app-paths-registry-key-makes-windows-both-faster-and-safer/
I don't see why it will make Windows "Faster and Safer".
Create a folder and add it to the PATH environment variable* (which is
something you only need to do once). After that you can just drop any
program or batch file into it and start it using the "run" dialog (or from a
command console) - no "app path" fumbling needed anymore.
The article cited explains why it's sophomoric to modify the PATH variable.
There is nothing explained.
The App Paths key provides a per-process PATH configuration which increases >> security by eliminating the need to touch the global system PATH variable.
Why does this increase security?
A Windows App normally isn't just a single exe file but comes with a lot
of additional files, so it needs its own program directory. If you have
a lot of such Apps installed it would be indeed a stupid idea to add all these program directories to the PATH variable. On the other side, if
you have dozens of single file utilities or batch files, then it would
be stupid, to spread them all over the disk and use a Registry entry
for each of them. Just put them all in a single command directory and
add it to the PATH variable.
When setting up a new PC, the first thing I do, is to copy this command directory to the new PC and modify the PATH variable. Then my collection
of helper utilities is immediately available.
When I want template #1 for example, I type "1" in the Runbox.
When I want template #2, I type "2"; "3" for template #3, etc.
Instead of typing <WIN>-R I prefer to have a CMD window open all
the time.
I simple click into the task bar brings it to foreground
so you can enter the commands. But when using the AppPath method
to register 1.exe, 2.exe and 3.exe you have to type "start 1",
"start 2" or "start 3", 1, 2 or 3 works only with the PATH method.
Lol ? I thought I was giving you another option there. One which would
give you the possibility to create a per-extension template choosing.
Oh. I'm sorry. I thought you called the use of App Paths "abuse".
I agree it would be nice to have better methods.
But I've been using the App Paths key since Windows XP days.
Maybe even Windows 95 days. I don't remember when I started.
So I'm sorry if I assailed you.
I thought you said it was "abuse" to use it the way Microsoft designed it.
The App Paths key's capabilities are more complex than the way I
use them.
If you know more about those capabilities, that would be useful to
discuss.
Regarding how much "work" it is to add an app paths entry, it's no
work for me to add a new "command" simply by adding a new App Paths
entry to it.
But when it comes time to migrate to another machine, I just export
the App Paths key from one PC and load it into another PC & it's all
there for me.
Also, When you throw that "Everybody" claim around you're signalling,
with a
bullhorn, that you're trying to blow some hot air in what you say, not
that
you have actually talked to just a fraction of that "Everybody" - not
even
in your own city.
Just think of it: if you would talk with just 1 million persons (no doubt
just a fraction of your countries inhabitants) for five minutes each with
no
pauses you would need 5.000.000 minutes. A workday is 8*60 => 480
minutes.
You would need 5.000.000 / 480 => 10416.6~ workdays, which is 2083.3~
5-day
weeks, which is just over 40 years. You do not even sound that old - and
yes, I'm ignoring that the first decade or two of a persons life (s)he's
not
really a working person.
WTF?
When a Windows user wishes to create a new command for the Runbox,
he can choose to put it in the PATH (which is designed for general
purpose use)
or he can choose to put it in the App Paths key which was designed
for that specific purpose.
Yes, I'm annoyed with people who abuse(!) the "app path" method.
OK. I thought so. You think understanding how Windows works is
abuse. That's fine. Keep thinking that.
It doesn't change the PATH others take.
I took the PATH less traveled by.
And that has made all the difference.
Most of my stuff is written by you & others like Zaidy03 <Eric@Bloch.com>.
Thanks for the mention.
If I was doing something similar I would use one batch and its first
step would be to ask how many (0-9) , kill batch if 0 otherwise use the number to do what I want. Why have multiple batches when one will work
and take less file space? The make a shortcut to start the batch and
perhaps also a "Shortcut Key" which would give efficient activation.+
nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
On 09.11.2024 05:14, Wolf Greenblatt wrote:
Many of my programs are those you wrote that I found on the archives for
this newsgroup whenever I search for things - like your spelling program.
I love that it gives me three chances to spell a word and if I get it
right, then it removes the word from my misspelled word list.
Just found out, that it doesn't work properly in Win11, you have to
insert a small pause before the word is spoken:
cscript //nologo speak.vbs "<silence msec='700'/> %*"
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
:: you have to create spell.txt with the words to be spoken
:: enter x to terminate program
chcp 65001>nul
:: win11 Terminal doesn't support mode con
:: MODE CON: COLS=50 LINES=10
:: color f0
cls
::echo createobject("sapi.spvoice").speak wsh.arguments(0)>speak.vbs
:: or with rate/volume specified
echo Set sapi = createObject("sapi.spvoice") >speak.vbs
echo sapi.Rate = -3 >>speak.vbs
::echo sapi.Volume = 100 >>speak.vbs
echo sapi.Speak wsh.arguments(0) >>speak.vbs
for /f "tokens=*" %%i in (spell.txt) do call echo %%random%% %%i>>spellerr.txt
sort /o spelltmp.txt spellerr.txt
del spellerr.txt
set /a ok=0
set /a not_ok=0
for /f "tokens=1*" %%i in (spelltmp.txt) do call :sub %%j
:end
del speak.vbs
del spelltmp.txt
echo.
echo %ok% Wörter richtig, %not_ok% Wörter falsch
echo.
pause
exit
:sub
echo.
set /a n=0
:sub1
set /a n=n+1
if %n%==3 goto :sub2
:: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms717077(v=vs.85)
cscript //nologo speak.vbs "<silence msec='700'/> %*"
set a=
set /p a=
if /i "%a%"=="x" goto :end
if /i not "%*"=="%a%" goto :sub1
set /a ok=ok+1
goto :eof
:sub2
echo 0 %*>>spellerr.txt
echo ---------- %*
set /a not_ok=not_ok+1
timeout /t 2 >nul
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 508 |
Nodes: | 16 (2 / 14) |
Uptime: | 228:30:52 |
Calls: | 9,982 |
Files: | 13,833 |
Messages: | 6,359,570 |