Hi Nikos,
Thanks for your Reply
[3] your solution of replacing the Second-parameter "$Q" with "$G" works Brilliantly
[1] my attempts to avoid using the console-window have not worked
using the AddressBar:
$ "C:\Users\mjb17\Documents\vbs__test__changeIcon.vbs" "$F" "$G"
.......... works OK - for single target-Scortcut.lnk-file and single source.ICO file (but opens console window)
$$ "C:\Users\mjb17\Documents\vbs__test__changeIcon.vbs" "$F" "$G"
.......... works OK - for MULTIPLE target-Scortcut.lnk-file and single source.ICO file (but opens console window)
> "C:\Users\mjb17\Documents\vbs__test__changeIcon.vbs" "$F" "$G"
......... Fails to change Icon for target-Scortcut.lnk-file ... and gets error message - CPU tried its best but this command is ineffable
>"C:\Users\mjb17\Documents\vbs__test__changeIcon.vbs" "$F" "$G"
......... Fails to change Icon for target-Scortcut.lnk-file ... and gets error message - CPU tried its best but this command is ineffable
>> "C:\Users\mjb17\Documents\vbs__test__changeIcon.vbs" "$F" "$G"
......... No Console opens, but... Fails to change Icon for MULTIPLE target-Scortcut.lnk-file ... and gets error message - CPU tried its best but this command is ineffable
>>"C:\Users\mjb17\Documents\vbs__test__changeIcon.vbs" "$F" "$G"
......... No Console opens, but... Fails to change Icon for MULTIPLE target-Scortcut.lnk-file ... and gets error message - CPU tried its best but this command is ineffable
From what I tried, can you see what I am doing wrong?
[2] I copy&pasted your macro code into a new macro ( now named "Nikos Macro"
)
But it does not change the Icons.
Sometines the Macro ends ok, but does not change the icon;
Note in this example
$G = T:\__shared Icons\diagonalarrow_116413.ico
$F = T:\1957-08-25__XXXX-XX-XX__BROOKES Mark Jeremy\__sb2__##self##__1957-08-25__XXXX-XX-XX__BROOKES Mark Jeremy - Shortcut.lnk
other times
the Macro Fails & I get 2 popup windows:
Note in this example
$G = T:\__shared Icons\diagonalarrow_116413.ico
$F = C:\Users\mjb17\Documents\ShortcutTest.lnk
(i)
---------------------------
Windows Script Host
---------------------------
Script: c:\users\mjb17\documents\vbs__test__changeicon.vbs
Line: 66
Char: 1
Error: The shortcut pathname must end with .lnk or .url.
Code: 80020009
Source: WshShell.CreateShortcut
---------------------------
OK
---------------------------
(ii)
---------------------------
xplorer²
---------------------------
Macro stopped execution with error 1 Line: 6 Last argument: 59395
Do you want to debug the macro?
---------------------------
Yes No
---------------------------
I did notice that the Macro code said ... '>wscript "C:\Users\mjb17\Documents\vbs__test__changeIcon.vbs" "$F" "$G"'
but the macro's address bar says......... >wscript "c:\users\mjb17\documents\vbs__test__changeicon.vbs" "$f" "$g"
differences (a) lowercase parameters (b) no enclosing '' commas
my reading of your web page (
https://www.zabkat.com/x2h_7.htm) suggests that this should be having no effect, but I did think it was interesting that the parameters got changed.
Thanks for your attention