A shortcut targeting two locations...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
I am working as system administrator in a medium size firm. We are hosting
some of the applications on a central server, and we creat shortcut for users
on there desktop. What I am looking for is redunduncy of the application... I
want to host the same application on another server and if the primary server
becomes unavailable for maintainance or any other reason the shortcut shoud
automaticaly point to the alternate server...

Thanks in advance for any solution/comments

Regards,

Rustum
 
I would suggest running the app through a drive-mapping, this is often
preferable for a number of reasons anyway. If the mappping is established by
a logon-script, then a test for the existence of any known file in the share
could be used to redirect the mapping if there is a fault.

net use /persistent: no

net use h: \\mainserver\appshare

if exist h:\app\myapp.exe goto mainok

net use h: /delete /yes

net use h: \\standbysrv\appshare

:mainok

(- Actually on Windows servers you can test for the . or .. files to confirm
the presence of a share if you don't know what files are in the share. )

This would presume of course that users will re-logon if the app doesn't
work.. but I think it's a fair bet they will do that anyway.

The other thing you might want to do is to make the shortcut a static one,
otherwise it could end-up resetting itself to point at notepad (or summat
equally silly) if the app isn't there.
 
Alternatively, just thinking, if you prefer to work through shares rather
than mappings you could use a script something like this as a direct
replacement for the shortcut:

; Adjust to suit network:
Local $MainExecutable = '\\mainsrv\share\app\myapp.exe'
Local $StandbyExecutable = '\\sbsrv\share\app\myapp.exe'

select
case FileExists($MainExecutable)
Run($MainExecutable)
case FileExists($StandbyExecutable)
Run($StandbyExecutable)
case else
msgbox(48,"Error","Unable to launch program.")
endselect

Adjust to suit, compile with AutoIt 3 from http://autoitscript.com and place
on desktop.

You might possibly want to set a working-folder in the Run statements,
though many apps will work without.
 
Thanks a lot Ian,

Now I got a direction to work on...
Yes I will write a VB Script to check availability & then call the program,
Then all I need is to deploy it on all desktops (one mail to all will do it).

Thanks Again

Rustum
 
Back
Top