Part II -- How to cancel without error if filename doesn't exist

  • Thread starter Thread starter KatB
  • Start date Start date
K

KatB

Hi again,

Further to my last post, here is more specifically what I'm trying to
do. In my onclick event, I first want to look to see if a certain user
file (.ica) exists on the client pc. Then I open an .hta page (as a
pop-up window) if it does exist which contains the following:

<script language="javascript">
var oShell=new ActiveXObject("WScript.Shell");
var file="C:\\Progra~1\\Citrix\\ICACli~1\\vbciq.ica"
oShell.Run("C:\\Progra~1\\Citrix\\ICACli~1\\wfica32 " + file,1);
window.close();
</script>

QUESTION: Some PCs use thin client so if the file isn't found at c:\ I
also need to check m:\. If neither exists, I want to close the .hta
window without an application error, just a user message that the
desktop file wasn't available.

So if I am unable to check for the file on the user pc, any suggestions
on how to handle the .hta window opening if the file turns out not to
exist?

TIA, Kat
 
Back
Top