Discussion:
Seedclip.bat batch file to seed Windows clipboard with known text (for subsequent pasting)
Add Reply
Wolf Greenblatt
2024-10-16 21:40:08 UTC
Reply
Permalink
Below is a process for seeding the Windows clipboard with text
such that the clipboard can easily be pasted into new text files.

The code was kindly proposed by Herbert Kleebauer on the Windows newsgroup
in response to this "New | Text Document" context thread earlier this week.
<https://www.novabbs.com/computers/article-flat.php?id=82159&group=alt.comp.os.windows-10#82159>

1. Create this sample/template "seedclip.bat.exe" exactly as shown below:
@echo off
REM seedclip.bat seeds the Windows clipboard for subsequent pastes
(for /l %%i in (1,1,10) do @echo =====================&echo.)|clip

2. Rightclick "seedclip.bat.exe" & select "Pin to taskbar".

3. Rightclick on the pinned icon & rightclick again to select "Properties"
& click the "Change icon" button to choose any desired available icon.

4. In the Windows file explorer, rename the batch file from
"seedclip.bat.exe" to "seedclip.bat" by removing the ".exe".

This step was needed because you can't pin a batch file to the taskbar.

5. Rightclick on the pinned icon & rightclick again to select "Properties"
to change the pinned icons's TARGET from "C:\whatever\seedclip.bat.exe"
to "C:\whatever\seedclip.bat".

6. Click on the pinned taskbar icon to seed the clipboard with text.
Then open a new text file and paste the clipboard to that file.

You're done.
Now you can see any new text file with the desired contents.

If desired, create a custom "seedclip" command for the Windows RunBox.

a. Rightclick on the App Paths key in the system registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
b. Create a new key called "seedclip.exe" & set the string value
Value =
c. To seed the Windows clipboard, just press the "Windows+R" sequence
to bring up the Windows RunBox and type "seedclip" & then hit Enter.

Please test this out and let me know what improvements you suggest.
Wolf Greenblatt
2024-10-17 14:23:24 UTC
Reply
Permalink
Post by Wolf Greenblatt
If desired, create a custom "seedclip" command for the Windows RunBox.
a. Rightclick on the App Paths key in the system registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
b. Create a new key called "seedclip.exe" & set the string value
Value =
c. To seed the Windows clipboard, just press the "Windows+R" sequence
to bring up the Windows RunBox and type "seedclip" & then hit Enter.
Oops. I had saved a spot for pasting the value but forgot to paste it.

If desired, create a custom "seedclip" command for the Windows RunBox.

a. Rightclick on the App Paths key in the system registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
b. Create a new key called "seedclip.exe" & set the string value
Key = seedclip.exe (note that the keyword must end with ".exe"
Value = C:\whatever\seedclip.bat
c. To seed the Windows clipboard, just press the "Windows+R" sequence
to bring up the Windows RunBox and type "seedclip" & then hit Enter.

Note that the "App Paths" key can point to more than just a batch file.
It can point to a shortcut or executable or any registered document type.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
Key = keyword1.exe (note that the keyword must end with ".exe"
Value = C:\whatever\file.lnk (the file doesn't have to match the keyword)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
Key = keyword2.exe (note that the keyword must end with ".exe"
Value = C:\whatever\file.exe (the file doesn't have to match the keyword)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
Key = keyword1.exe (note that the keyword must end with ".exe"
Value = C:\whatever\file.docx (the file type should be registered)

<https://helgeklein.com/blog/how-the-app-paths-registry-key-makes-windows-both-faster-and-safer/>
<https://docs.revenera.com/installshield22helplib/helplibrary/IHelpAddAppPathsToComponent.htm>
<https://superuser.com/questions/1642149/what-does-hklm-software-microsoft-windows-currentversion-app-paths-actually-do>
Loading...