I have a code working for a while with no issues. Now suddenly the code is no longer working, as the URL is determined as a "trusted site" in IE.
What my code does, is to open a webpage (Citrix login page of my company), type username and password and submit on the button. All works great as long as the website URL are not set as trusted, but only as "internet" in IE. Can someone help to solve this issue. I need the site to be trusted in order for the "ica-file" to open automatically. If the site is not trusted, the script works, but I will then get a pop-up asking if I want to open or save the ica-file, instead of just launching the Citrix application directly.
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "URL"
IE.Visible = True
While IE.Busy
WScript.Sleep 6000
Wend
Set WshShell = CreateObject("WScript.Shell")
Set ipf = IE.document.all.user
ipf.Value = "my username"
Set ipf = IE.document.all.password
ipf.Value = "my password"
Set ipf = IE.document.all.btnLogin
ipf.Click
While IE.Busy
WScript.Sleep 5000
Wend
IE.Document.getElementById("ID of the link").Click