set filename="C:/Program files/ Cisco System/ Clean Access Agent/ CCAAgent.exe" If exist %filename% (rename %filename% CCAAgent.exe.old) else (rename %filename%.old CCAAgent.exe)I am trying to change the extension of a .exe file . I would like to know if on execution of the .bat file which contains the above code , the color of the icon must be changed. so basically the icon must toggle between 2 colors . Is this possible ???
yes, (of course), it's possible...
the question is how much amount of horse-manooky you want to wade throught to achieve it. batch alone cannot do it, but batch can use other native utilities, especially vbscript/javascript langs. I would suggest google to:
vbscript change icon
vbscript desktop
or last resort: change icon
then you need to set up the altered icon somewhere.
and, of course, if you have more guts and time, and really
want to get thrashed, debug.
I have worked a small amount with very simple gifs, but not ico files as yet.
is it possible to create a prompt with a message displayed when each time the .bat file is run . If yes how do you create a prompt . the prompt will be displayed each time the .bat is run on the desktop .
@echo off
echo Hello World!!
pause
or if you need it on desktop, create a dummy link:
set n=%date%
set %n:~4%
set %n:/=-%
>> \%userprofile%\desktop\n.lnk echo "x"
