npocmaka
I've made few tools that use shell.application invoke verb , to perform actions that rather impossible to be performed in pure batch.
If somebody is interested here they are:
pinnerJS.bat - pins/unpins items in startmenu/taskbar.
printJS.bat - emulates right click -> print if applicable.Uses default printer (print command uses PRN port which could be inactive ).Default printer can be changed with runDLL command.
deleteJS.bat - send item to recycle bin.Could be achieved also with shell.application moveHere() method but it was easiest for me to do it this way.
----------------------------
#2 21 Apr 2015 19:06
Simon Sheppard
I've moved this over to the VBScript sub-forum
Also, heres an alternative for pinning/unpinning to the start menu
https://ss64.com/vb/syntax-pin.html
One possible problem with scripting against verbs is that I think they are region specific, so the script may only work on English versions of Windows.
----------------------------
#3 21 Apr 2015 20:53
npocmaka
Simon Sheppard wrote:
One possible problem with scripting against verbs is that I think they are region specific, so the script may only work on English versions of Windows.
scheisse. Forgot about that.Will rewrite these.
----------------------------
#4 22 Apr 2015 09:40
npocmaka
At least the delete/send-to-recycle-bin is fixed as the delete verb is always the forth from the bottom .
Last edited by npocmaka (06 Jun 2015 17:22)
original thread: https://ss64.org/oldforum/viewtopic.php?id=1993