![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
![]()
Tutorial on how to create a free cclip (clear clipboard) command on Windows
(As always, please improve so that everyone benefits from your input.) Given that, at least on mobile devices, free software that should NOT be reading your clipboard _is_ reading your clipboard, it behooves us to consider automatic and/or manual deletion of the clipboard contents. o Copy, paste catastrophe: how Apple's iOS 14 disrupted clipboard espionage https://groups.google.com/forum/#!topic/misc.phone.mobile.iphone/NehSRB4Ka-8 For clipboard contents manual deletion: o Win+R cmd echo off | clip For clipboard contents auto deletion freewa o https://www.majorgeeks.com/files/details/clipttl.html *Here's a method I just implemented & documented for others to benefit*. 1. Create a shortcut named cclip.lnk (i.e., clean clipboard): Use any hierarchy you like; I put mine in my system "Run" directory: C:\data\sys\run\cclip.lnk TARGET = %comspec% /c "echo off | clip" START IN: C:\Windows\system32 2. If desired, create a "cclip" command using the AppPaths key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Ap p Paths\ New Key === cclip.exe Default === C:\data\sys\run\cclip.lnk Note: The key name can be anything you want it to be (as long as it ends with ".exe") Note: There could be, but on my system, there is no file actually named 'cclip.exe' (as it's just a keyword). Now you can easily execute the command using the Run window: o Win+R cclip 3. If desired, set the link icon to something easily distuinguished. Use any hierarchy you like; I put mine in my system "Icon" directory: C:\data\sys\icon\cclip.ico For example, I created this icon in a minute using Irfanview: https://i.postimg.cc/cCQsDxy3/cclip01.jpg Note: You can obtain free icons from a billion locations on the net: https://stock.adobe.com/search?filters[orientation]=square&k=clipboard https://www.iconspedia.com/search/clipboard/ https://www.flaticon.com/free-icons/copy-clipboard https://www.iconfinder.com/search/?q=clipboard https://icons8.com/icon/set/no-clipboard/win10 https://iconarchive.com/tag/window-clipboard etc. 4. If desired, pin that icon to the taskbar for quick access. 5. If desired, you can combine multiple commands as needed, e.g., TARGET = %comspec% /k [1st command] & [2nd command] & [3rd command]... For example (based on "killall.bat" examples found in alt.msdos.batch): SHORTCUT = killall.lnk TARGET = %comspec% /c "echo off | clip" & veracrypt /dismount /force /q & taskkill /f /fi "USERNAME eq %COMPUTERNAME%\%USERNAME%" /IM * See also: o What syntax combines 2 commands into a single shortcut TARGET line? https://groups.google.com/forum/#!topic/alt.msdos.batch/azQbz6D_v0Y See also this (untested by me) ctask.bat found in alt.msdos.batch when I searched for pre-existing solutions before writing this tutorial: o http://tinyurl.com/alt-msdos-batch === cut below for ctask.bat === @echo off REM alt.msdos.batch Todd Message-ID: title Kill all running apps - Bharat Balegere - AgniPulse.com cd c:\windows\System32 for /f "skip=3 tokens=1" %%i in ('TASKLIST /FI "USERNAME eq %userdomain%\%username%" /FI "STATUS eq running"') do ( if not "%%i"=="svchost.exe" ( if not "%%i"=="explorer.exe" ( if not "%%i"=="cmd.exe" ( if not "%%i"=="tasklist.exe" ( if not "%%i"=="VBoxTray.exe" ( echo. taskkill /f /im "%%i" echo. ) ) ) ) ) ) cd \ntutil rem pause === cut above for ctask.bat === As always, please improve this nascent tutorial with purposefully helpful suggestions so that everyone benefits from every action you take on Usenet. -- Usenet is a web searchable archive of useful tutorials & solutions. |
Ads |
#2
|
|||
|
|||
![]()
Arlen,
You have a Subject line which doesn't match the first line of your tutorial. Why now do I get the feeling that the "Killing users tasks" is something that was added in a hurry ? Also, its again not /tutoring/ - no clear reasons given for most steps. Though you still leave it upto the person to make choices. And as there are no clear reasons given, on what grounds should he make those ? This also means that it won't work a "step plan". [crossposted newsgroups] The tutorial doesn't work for (MS)DOS, yet you crossposted it into there too. Your second paragraph (starting with "Given that, at least on mobile devices") has nothing to do with Windows (or DOS). It has no place. 1. Create a shortcut named cclip.lnk (i.e., clean clipboard): /How/ is the reader supposed to create a shortcut ? Or do you presume he's just born with that knowledge ? And if you think that he already knows that than what is the chance he also knows how to select another icon and that he can pin it to the taskbar, making your steps in that regard superfluous. IOW, either you write as if he knows nothing, or you assume he already knows everything. Mixing them is not a good idea (irritating to the guy who already knows it, confusing the the person who doesn't) Also, you mention that name as if it /must/ be that one, while both of us know that any name will do (and its a bad name for something that kills tasks too). Use any hierarchy you like; I put mine in my system "Run" directory: "Use any hierarchy you like" ? What is that supposed to mean ? Yeah, I know what, in relation to filesystems, a hierarchy is. What makes you think that a novice knows what you mean there ? What is he supposed to /do/ ? "I put mine in my system "Run" directory:" I think the Windows term is "folder", not "directory". And what should someone do when he doesn't have that folder ? You make no mention of that. START IN: C:\Windows\system32 Irrelevant to the "clip" command (or anything in the below) and may be left blank. 2. If desired, create a "cclip" command using the AppPaths key: On which grounds should the novice make the "desired" choice ? You only mention /a/ reason at the end. Actually, the /only/ reason you want/need this to be done is because you prefer the "run" dialog way of starting stuff... 3. If desired, set the link icon to something easily distuinguished. Irrelevant if they use the, by you preferred, "run" dialog (they will never see the icon anyway). If not that step 2. is irrelevant. No info about that is provided either. Worse: if they use the "run" dialog method there is no reason to create a shortcut to begin with : a simple .BAT file (like the examples you included) would be enough. For example, I created this icon in a minute using Irfanview: That does not belong there, as it only serves to confuse the novice "should I first go do that" ? At best put it into a "remarks" section after the tutorial itself has already concluded. Than again, the whole step 2. belongs there ... Its inconsequential to the functioning of the shortcut. 4. If desired, pin that icon to the taskbar for quick access. So, /two/ ways to "quick access" it - with this one being quicker-and-easier than Win-R ... And by the way: You pin the /shortcut/, not the icon (doubt that you can do the latter, but it will confuse the heck outof a novice trying to follow your directions) 5. If desired, you can combine multiple commands as needed, e.g., Should also at best be in the "remarks" section, but preferrably in a seperate "how to create a shortcut and do interresting stuff with it" tutorial. TARGET = %comspec% /c "echo off | clip" & veracrypt /dismount /force /q & taskkill /f /fi "USERNAME eq %COMPUTERNAME%\% Bad example, as only one the first of the three command parts has yet been mentioned, and you spend zero in regard to an explanation to what the other parts are for. And yes, /I/ recognise that last part as being the "killing users' tasks" that you mentioned in your subjectline. I wonder how many novices would be able to do the same... And that leaves the middle part, which is irrelevant to anything, and again only serves to confuse the hapless novice who hasn't got any idea that it may be removed. tl;dr: Your whole tutorial consists outof : 1) Create a shortcut 2) Set the "target:" to %comspec% /c "echo off | clip" & taskkill /f /fi "USERNAME eq %COMPUTERNAME%\%USERNAME%" /IM * Than there is a subsection describing ONE way (outof at least three that I know of) to make the command work from withing the "run" dialog - where that way is the only one that needs maintenace (the other two need none). .... which can be fully skipped when the user rather clicks the shortcut (on the taskbar or elsewhere) The rest is fluff which has little-or-nothing to do with the subjectline. And I have to ask : Why create a shortcut /at all/ when all *you* want to do is to use the "run" dialog ? A simple batchfile would be way easier. As always, please improve this nascent tutorial with purposefully helpful suggestions so that everyone benefits from every action you take on Usenet. I think you have gotten enough "purposefully helpful suggestions" to be able to improve upon it. :-) Go git. Regards, Rudy Wieser |
#3
|
|||
|
|||
![]()
Stop crossposting every time you post.
A.k.a. "Good Guy"... -- Arlen Holder wrote: Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.mixmin.net!.POSTED!not-for-mail From: Arlen Holder Newsgroups: alt.comp.os.windows-10,alt.comp.microsoft.windows,alt.msdos.batch Subject: Tutorial for creating cclip & killall clearing the Windows clipboard & killing users' tasks in one fell swoop Date: Tue, 1 Sep 2020 05:04:43 -0000 (UTC) Organization: Mixmin Message-ID: Injection-Date: Tue, 1 Sep 2020 05:04:43 -0000 (UTC) Injection-Info: news.mixmin.net; posting-host="7c176b9a0a2740ff1ffdc8c543f0a33c3c57b379"; logging-data="19306"; " Xref: reader01.eternal-september.org alt.comp.os.windows-10:125915 alt.comp.microsoft.windows:921 alt.msdos.batch:5459 Tutorial on how to create a free cclip (clear clipboard) command on Windows (As always, please improve so that everyone benefits from your input.) Given that, at least on mobile devices, free software that should NOT be reading your clipboard _is_ reading your clipboard, it behooves us to consider automatic and/or manual deletion of the clipboard contents. o Copy, paste catastrophe: how Apple's iOS 14 disrupted clipboard espionage https://groups.google.com/forum/#!topic/misc.phone.mobile.iphone/NehSRB4Ka-8 For clipboard contents manual deletion: o Win+R cmd echo off | clip For clipboard contents auto deletion freewa o https://www.majorgeeks.com/files/details/clipttl.html *Here's a method I just implemented & documented for others to benefit*. 1. Create a shortcut named cclip.lnk (i.e., clean clipboard): Use any hierarchy you like; I put mine in my system "Run" directory: C:\data\sys\run\cclip.lnk TARGET = %comspec% /c "echo off | clip" START IN: C:\Windows\system32 2. If desired, create a "cclip" command using the AppPaths key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Ap p Paths\ New Key === cclip.exe Default === C:\data\sys\run\cclip.lnk Note: The key name can be anything you want it to be (as long as it ends with ".exe") Note: There could be, but on my system, there is no file actually named 'cclip.exe' (as it's just a keyword). Now you can easily execute the command using the Run window: o Win+R cclip 3. If desired, set the link icon to something easily distuinguished. Use any hierarchy you like; I put mine in my system "Icon" directory: C:\data\sys\icon\cclip.ico For example, I created this icon in a minute using Irfanview: https://i.postimg.cc/cCQsDxy3/cclip01.jpg Note: You can obtain free icons from a billion locations on the net: https://stock.adobe.com/search?filters[orientation]=square&k=clipboard https://www.iconspedia.com/search/clipboard/ https://www.flaticon.com/free-icons/copy-clipboard https://www.iconfinder.com/search/?q=clipboard https://icons8.com/icon/set/no-clipboard/win10 https://iconarchive.com/tag/window-clipboard etc. 4. If desired, pin that icon to the taskbar for quick access. 5. If desired, you can combine multiple commands as needed, e.g., TARGET = %comspec% /k [1st command] & [2nd command] & [3rd command]... For example (based on "killall.bat" examples found in alt.msdos.batch): SHORTCUT = killall.lnk TARGET = %comspec% /c "echo off | clip" & veracrypt /dismount /force /q & taskkill /f /fi "USERNAME eq %COMPUTERNAME%\%USERNAME%" /IM * See also: o What syntax combines 2 commands into a single shortcut TARGET line? https://groups.google.com/forum/#!topic/alt.msdos.batch/azQbz6D_v0Y See also this (untested by me) ctask.bat found in alt.msdos.batch when I searched for pre-existing solutions before writing this tutorial: o http://tinyurl.com/alt-msdos-batch === cut below for ctask.bat === @echo off REM alt.msdos.batch Todd Message-ID: title Kill all running apps - Bharat Balegere - AgniPulse.com cd c:\windows\System32 for /f "skip=3 tokens=1" %%i in ('TASKLIST /FI "USERNAME eq %userdomain%\%username%" /FI "STATUS eq running"') do ( if not "%%i"=="svchost.exe" ( if not "%%i"=="explorer.exe" ( if not "%%i"=="cmd.exe" ( if not "%%i"=="tasklist.exe" ( if not "%%i"=="VBoxTray.exe" ( echo. taskkill /f /im "%%i" echo. ) ) ) ) ) ) cd \ntutil rem pause === cut above for ctask.bat === As always, please improve this nascent tutorial with purposefully helpful suggestions so that everyone benefits from every action you take on Usenet. -- Usenet is a web searchable archive of useful tutorials & solutions. |
#4
|
|||
|
|||
![]()
John doe,
Stop crossposting every time you post. And you thought the best way of action would be to *add another newsgroup* to that list and *quote the full message, inclusive headers* into all those newsgroups ? Really ? And there is something strange about that newsgroup you added : When I fold the message sub-trees than you seem to be the "starter" of all but one of them (three months worth of messages). How come ? Regards, Rudy Wieser |
#5
|
|||
|
|||
![]()
I do not crosspost every time I post original.
Adding an extinct special-purpose group doesn't bother anybody. I use that group for archiving headers. It comes in handy especially when solving mysteries to do with nym-shifting posters. Any other questions... -- "R.Wieser" wrote: Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!goblin3!goblin.stu.neva.ru!news.netf ront.net!.POSTED.62.194.202.140!not-for-mail From: "R.Wieser" Newsgroups: alt.comp.os.windows-10 Subject: Tutorial for creating cclip & killall clearing the Windows clipboard & killing users' tasks in one fell swoop Date: Wed, 2 Sep 2020 13:37:23 +0200 Organization: Netfront http://www.netfront.net/ Lines: 16 Message-ID: References: Injection-Date: Wed, 2 Sep 2020 11:37:28 -0000 (UTC) Injection-Info: adenine.netfront.net; posting-host="62.194.202.140"; logging-data="37961"; " X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-RFC2646: Format=Flowed; Original Xref: reader01.eternal-september.org alt.comp.os.windows-10:126005 John doe, Stop crossposting every time you post. And you thought the best way of action would be to *add another newsgroup* to that list and *quote the full message, inclusive headers* into all those newsgroups ? Really ? And there is something strange about that newsgroup you added : When I fold the message sub-trees than you seem to be the "starter" of all but one of them (three months worth of messages). How come ? Regards, Rudy Wieser |
#6
|
|||
|
|||
![]()
John doe,
I do not crosspost every time I post original. Good for you. Now, explain to me (us) why crossposting (to just three newsgroups) should bother you. Adding an extinct special-purpose group doesn't bother anybody. Lol. I just mentioned that I am, effectivily, bothered by whatever game you are playing with that newsgroup and you than respond by telling me that I, as a part of "anybody", am in fact /not/ bothered. Which is rather offensive. I use that group for archiving headers. Really ? I thought that most, if not all newsgroup readers cache whole messages (body and header) as a matter of doing their jobs. Better yet, you can set your own newsreader to not, or much later, let such messages expire, something you have no control over with that newsgroup. Besides, you didn't add just the headers, but instead the whole fricking message. It comes in handy especially when solving mysteries to do with nym-shifting posters. Really ? Any self-respecting nym-shifter will change his name as well as NNTP server at the same time - making it rather hard for you to make certain that the "new" guy is the same as the old nym-shifter. Feel free to educate me on that behalf though. Any other questions... No. But as you now know that what you do is bothering me I expect you to stop with it this instant. And don't complain, as that is exactly what you expect the OP to do, right ? :-) Besides, as I already mentioned, you have the same info available in your own newsgroup reader, so there is no reason to continue with it anyway. Also, you have not bothered to explain why /you did exactly that which you agitated against/, which is crossposting. Thats like a vegetarean wearing leather shoes. Any other questions... Yeah, I forgot to ask : what was that 'A.k.a. "Good Guy"...' line about ? Any questions from you ? Regards, Rudy Wieser |
#7
|
|||
|
|||
![]()
This babbling troll's concerns will be addressed by my complaint department,
soon... -- "R.Wieser" wrote: Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!goblin3!goblin.stu.neva.ru!news.netf ront.net!.POSTED.62.194.202.140!not-for-mail From: "R.Wieser" Newsgroups: alt.comp.os.windows-10 Subject: Tutorial for creating cclip & killall clearing the Windows clipboard & killing users' tasks in one fell swoop Date: Wed, 2 Sep 2020 18:13:29 +0200 Organization: Netfront http://www.netfront.net/ Lines: 56 Message-ID: References: Injection-Date: Wed, 2 Sep 2020 16:14:07 -0000 (UTC) Injection-Info: adenine.netfront.net; posting-host="62.194.202.140"; logging-data="76880"; " X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-RFC2646: Format=Flowed; Original Xref: reader01.eternal-september.org alt.comp.os.windows-10:126023 John doe, I do not crosspost every time I post original. Good for you. Now, explain to me (us) why crossposting (to just three newsgroups) should bother you. Adding an extinct special-purpose group doesn't bother anybody. Lol. I just mentioned that I am, effectivily, bothered by whatever game you are playing with that newsgroup and you than respond by telling me that I, as a part of "anybody", am in fact /not/ bothered. Which is rather offensive. I use that group for archiving headers. Really ? I thought that most, if not all newsgroup readers cache whole messages (body and header) as a matter of doing their jobs. Better yet, you can set your own newsreader to not, or much later, let such messages expire, something you have no control over with that newsgroup. Besides, you didn't add just the headers, but instead the whole fricking message. It comes in handy especially when solving mysteries to do with nym-shifting posters. Really ? Any self-respecting nym-shifter will change his name as well as NNTP server at the same time - making it rather hard for you to make certain that the "new" guy is the same as the old nym-shifter. Feel free to educate me on that behalf though. Any other questions... No. But as you now know that what you do is bothering me I expect you to stop with it this instant. And don't complain, as that is exactly what you expect the OP to do, right ? :-) Besides, as I already mentioned, you have the same info available in your own newsgroup reader, so there is no reason to continue with it anyway. Also, you have not bothered to explain why /you did exactly that which you agitated against/, which is crossposting. Thats like a vegetarean wearing leather shoes. Any other questions... Yeah, I forgot to ask : what was that 'A.k.a. "Good Guy"...' line about ? Any questions from you ? Regards, Rudy Wieser |
#8
|
|||
|
|||
![]()
"R.Wieser" wrote:
John doe, Adding an extinct special-purpose group doesn't bother anybody. Lol. There's someone in your head, but it's not you. I just mentioned that I am, effectivily, bothered...you th[e]n respond by telling me that I, as a part of "anybody", am in fact /not/ bothered. Which is rather offensive. Yeah, but... Which bothers you more... Adding the extinct group, or posting your header information? |
#9
|
|||
|
|||
![]()
John doe,
This babbling troll's concerns will be addressed by my complaint department, soon... With a name and attitude like that and a "run away from uncomfortable questions (and remarks)" behaviour together with that threat, what is the chance you are exactly what are you accuse me of being - and a nym-shifter/sockpuppet too ? Definitily a non-zero chance. In fact, probably quite a bit above it. Kiddo, go play in a literal sandbox or something. Regards, Rudy Wieser |
#10
|
|||
|
|||
![]()
Okay, have a nice day...
-- "R.Wieser" wrote: Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!goblin3!goblin.stu.neva.ru!news.netf ront.net!.POSTED.62.194.202.140!not-for-mail From: "R.Wieser" Newsgroups: alt.comp.os.windows-10,free.spam Subject: Tutorial for creating cclip & killall clearing the Windows clipboard & killing users' tasks in one fell swoop Date: Wed, 2 Sep 2020 19:09:50 +0200 Organization: Netfront http://www.netfront.net/ Lines: 17 Message-ID: References: Injection-Date: Wed, 2 Sep 2020 17:10:06 -0000 (UTC) Injection-Info: adenine.netfront.net; posting-host="62.194.202.140"; logging-data="83859"; " X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-RFC2646: Format=Flowed; Original Xref: reader01.eternal-september.org alt.comp.os.windows-10:126030 free.spam:13307 John doe, This babbling troll's concerns will be addressed by my complaint department, soon... With a name and attitude like that and a "run away from uncomfortable questions (and remarks)" behaviour together with that threat, what is the chance you are exactly what are you accuse me of being - and a nym-shifter/sockpuppet too ? Definitily a non-zero chance. In fact, probably quite a bit above it. Kiddo, go play in a literal sandbox or something. Regards, Rudy Wieser |
#11
|
|||
|
|||
![]()
Are you aware that every time you reply to me, Arlen Holder flips out
because I'm in his kill file and he isn't technically savvy enough to ignore thread branches? |
#12
|
|||
|
|||
![]()
John,
Are you aware that every time you reply to me, Arlen Holder flips out because I'm in his kill file Don't count on that, I'm quite likely in there too. :-) and he isn't technically savvy enough to ignore thread branches? Not every newsgroup reader has that capability. For instance, I'm using OE6 and it didn't have it either. But, you might be right there. He heavily depends on other people spoon-feeding him what he wants/needs to know. Regards, Rudy Wieser |
#13
|
|||
|
|||
![]()
On Wed, 2 Sep 2020 10:50:37 +0200, R.Wieser wrote:
I think you have gotten enough "purposefully helpful suggestions" to be able to improve upon it. :-) Go git. Holy ****, Rudy Wieser. o I'm shaking my head in serious amazement. I have never before, not even once, thought you ever added any value. o Nor, that you posted for any other reason than to toot your own horn. But this time, for God's sake, you added value! o And, this time, for heaven's sake, you actually comprehended the topic. Dammit' Rudy. You actually _can_ add value! o Hooray! I mean this. To me, past posts are water under the bridge; everyone can be rehabilitated o Well, everyone except Snit... but I digress. Almost everything you wrote was apropos, and which I agree with. o You even realized the hastily written tutorial had afterthoughts added. For example, you are completely correct in surmising that I added the killall _after_ I hastily wrote the initial tutorial, simply because I was testing the tutorial out on a new system, which _needed_ the killall. So I figured I'd add the multi-command shortcut, after the fact. o But that's not all that you were correct in surmising. For example, you're correct in intuiting I do everything from the Run command, where, interestingly enough, I did since Windows 95 days. o Win+R cclip That clears the clipboard. o It's easier than finding and then clicking on a shortcut. Hence, you're correct that it doesn't matter _where_ the user puts the shortcut; and you're correct that a novice might not know how to _create_ a shortcut; and you're correct that the STARTIN is meaningless in most cases with shortcuts; and you're correct that the Subject line, which was the last thing added in that late-night post, doesn't fully match the main point of the tutorial; and you're correct that I don't define, in this tutorial (but I do define in others, but they're not mentioned) how to go about choosing the logic for the file system hierarchy; and you are correct that the AppPaths key can be any name, but my point was that whatever name you give it must end with ".exe", which your point is that I wasn't clear about that point; and you are correct that I use the terms "folder" and "directory" interchangeably; and you are correct that you can omit the shortcut altogether, since the AppPaths key works fine for commands; and you are correct that creation of the icon isn't an important part of the tutorial (I have posted _plenty_ of icon-creation & modification tutorials); and you are correct that pinning the shortcut (not the icon) to the taskbar is the correct terminology as is pointing out that it's also quickly accessed that way; and you are correct that the example I gave of a multi-command shortcut is a "bad example" (but... but... you missed one thing, and one thing only, AFAICT)... ![]() The one thing you missed, interestingly, is that the multiple line command fails to work for some syntactical reason, unknown to be at the moment: o What syntax combines 2 commands into a single shortcut TARGET line? https://groups.google.com/forum/#!topic/alt.msdos.batch/azQbz6D_v0Y Specifically this, as yet unanswered query on the killall syntax: https://groups.google.com/d/msg/alt.msdos.batch/azQbz6D_v0Y/qeTHydqyAQAJ ==cut below for the question about multi-line shortcut target syntax== QUESTION about TARGET multi-line-command syntax 1. This works from the Windows command line to kill all the users' tasks: Win+R cmd {ctrl+shft+enter} taskkill /f /fi "USERNAME eq %COMPUTERNAME%\%USERNAME%" /IM * 2. That also seems to work just fine from a shortcut TARGET line: TARGET = taskkill /f /fi "USERNAME eq %COMPUTERNAME%\%USERNAME%" /IM * 3. It also seems to work in a comspec cmd (needed for multiple commands): TARGET = %comspec% /c taskkill /f /fi "USERNAME eq %COMPUTERNAME%\%USERNAME%" /IM * 4. But it doesn't seem to work in multi-command shortcut comspec syntax: TARGET = %comspec% /c "echo off | clip" & veracrypt /dismount /force /q & taskkill /f /fi "USERNAME eq %COMPUTERNAME%\%USERNAME%" /IM * Q: What syntax change is needed for that multi-line comspec cmd to work? See also: o Tutorial for creating cclip & killall clearing the Windows clipboard & killing users' tasks in one fell swoop https://groups.google.com/forum/#!topic/alt.msdos.batch/DqBXiTJ6FA0 -- Sometimes you need just a little bit of syntactical help to get it working. ==cut above for the question about multi-line shortcut target syntax== Rudy, Do you, or anyone else, know what's syntactically wrong in the query above? -- Usenet is a wonderfully public discussion of varying people's views. |
#14
|
|||
|
|||
![]()
Arlen,
Holy ****, Rudy Wieser. o I'm shaking my head in serious amazement. .... Dammit' Rudy. You actually _can_ add value! o Hooray! I mean this. Cut it kid. We both know that you acting all surprised is fake (I've posted pretty-much the same before, IIRC even about the same subject), and the only reason you're currently sucking up to me is because you want me to do something for you. The one thing you missed, interestingly, is that the multiple line command fails to work for some syntactical reason, unknown to be at the moment: Thats really you, isn't it ? You've build a tutorial in which the single most important item *does not actually work* (read: you either didn't use it yourself or forgot(?) to test it before writing the "tutorial"), and than trying to blame someone else for not double-checking it. Than again, you already did the same with your "change an executables icon" tutorial ... And no, thats not "interrestingly". You've made that part very specific to your own situation (veracrypt - which I do not have) which ofcourse means I /couldn't/ test it. And yes, I did think of doing it. Q: What syntax change is needed for that multi-line comspec cmd to work? .... Do you, or anyone else, know what's syntactically wrong in the query above? And there we are, the reason of your sucking-up. 4. But it doesn't seem to work in multi-command shortcut comspec syntax: Kiddo, after having written 10.137 tutorials (or thereabout) and you *still* do not seem to realize that "it doesn't seem to work" is an empty, wortless statement ? Really ? But, here goes the spoon-feeding again.: #1: what is it supposed to do ? #2: what does it do instead ? Although I can make a fair /guess/ to what that "veracrypt" is supposed to be doing, I would still be guessing - and that with the person who actually uses it and knows for sure is talking to me. Also, I've met a fair number of people who simply expected something quite different than what could possibly be happening as a result of what they where doing. Like those numbsculls who expect a "pull here" door to open when they push against it, and get all confused when the door stays shut. Thats two reasons why you should always include #1 As for #2 ? You did not include that *at all*, robbing us of the possibility to zero-in on the problem. You know, like how a car mechanic can just listen to the sounds a (stationary running) car makes and from it determine whats likely to be wrong with it. Thats the reason you should *ALWAYS* include /how/ something doesn't work. But, lets go on with the show - bughunting : 1. This works from the Windows command line to kill all the users' tasks: In points 1. thru 3. you have made sure that the "taskkill" command works when used on its own. Good. Thats at least something. In point 4. you have determined that it /doesn't/ seem to work in combination with *two, at the same time present* sub-commands. Congrats. You jumped from "lets check /one/ command" to "lets check three of them together!". Where is your checking with just the first and the last, and the second and last ? Do you spot any differences ? And how did you determine those differences ? Also, what happens when you precede that "taskkill" command with something else (to make sure its actually the syntax that is to blame) ? What can you conclude from that ? And there is something else : If its a syntax problem than normally you get an error message about it somewhere. I have not seen you mention getting any... What does that tell you ? In short, there is a /lot/ you could have done yourself. Q: What syntax change is needed for that multi-line comspec cmd to work? .... Do you, or anyone else, know what's syntactically wrong in the query above? There is nothing wrong with that syntax. Its *your expectation* that is to blame here. Yes, I think I've got a pretty-good idea to what "goes wrong" (it doesn't, it does /exactly/ what you told it to do) and how to "fix" it. (though I have to be carefull there, as I do not run W10). And no, I'm not going to present it to you on a silver platter. You lost that privilege long ago. Lets first see you put some effort into clarifying that "does not work" blurb (what is it supposed to do and what does it do instead) as well as a bit more tests and conclusions thereof. .... Or you can wait for someone else to tell you. :-p Strike that "tell". Replace with "fix it for". I do not think you actually care about how something works, as long as it does. :-( Regards, Rudy Wieser P.s. Did you know that most of the current OSes multi-task ? |
#15
|
|||
|
|||
![]()
Arlen,
Quote:
your problem or have decided that such a task is too mundain for you to be bothered with it. Either way, you're out of an answer (here as well as in the "What syntax combines 2 commands ..." thread), meaning that you can't use that combined command for yourself nor can you finish your current tutorial. Oh well, it must not have been too important to you ... Regards, Rudy Wieser |
Thread Tools | |
Display Modes | Rate This Thread |
|
|