In a BTM, something like
Code:
ren fileA fileB
start /wait path_to_browser_exe http://...
ren fileB fileA
But if the browser is already opened and the URL is opened via DDE, I don't think the "/wait" will work.
Or maybe ...
Code:
ren fileA fileB
http://...
delay 3
do while isapp path_to_browser_exe
delay 1
enddo
ren fileB fileA
... or something like that.
The problem seems to be in the btm file, not the alias. Here's exactly what I'm trying to do (don't ask why the file rename; it works)
hosts is the alias that renames my hosts file to hosts.xxx if hosts.xxx doesn't exist, and the reverse if hosts.xxx exists.
https://myaccount.shaw.ca
hosts
as an alias, the first two commands work fine, but leave the hosts.xxx file in place of the regular hosts file.
If I separate the commands by putting them into a btm file, "hosts" is the only command that gets executed. Does the fact that "hosts" is an alias in a btm file fork the process out of the btm file, thus circumventing the rest of the btm file?
I just want to come up with a way to rename my hosts file, go to my ISP's website, and then when the browser closes, restore the original hosts file. As it stands now I have an alias that executes the first two commands, but I have to manually execute the hosts alias again to restore the original hosts file.