Citrix Logon Simulator

Yes sir..

David, can you think of anything else to try?

I see a new error now in the logs:

 

[06/11/2018 20:41:03.551]: *************** LAUNCHER SCRIPT BEGIN *************** [06/11/2018 20:41:03.583]: SiteURL: https://storefront.corp.local/Citrix/web [06/11/2018 20:41:03.586]: UserName: corp\svclogonsim [06/11/2018 20:41:03.588]: Password: ***** [06/11/2018 20:41:03.591]: ResourceName: Notepad ImageRight [06/11/2018 20:41:03.596]: Creating Internet Explorer COM object [06/11/2018 20:41:03.611]: Exception caught by script [06/11/2018 20:41:03.617]: Retrieving the COM class factory for component with CLSID {0002DF01-0000-0000-C000-000000000046} failed due to the following error: 800703fa Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA). [06/11/2018 20:41:03.624]: At C:\Monitoring\Citrix\Scripts\Test-CitrixApp.ps1:178 char:49 + … rer -Value (New-Object -ComObject “InternetExplorer.Application”) -Sc … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [06/11/2018 20:41:03.868]: *************** LAUNCHER SCRIPT END ***************

Hi there. I have an update here. It seems that after a reboot it'll run once successfully but it has a problem closing everything down. On the second and subsequent runs you just get the Waits...

When running manually, you see Notepad launch and then you see in the cli that the script has ended and IE has been closed as well as Citrix logging off. However, Notepad is still launched and never goes away. I think this is the problem.

graphic2.jpg

graphic1.jpg

These were taken from the same screen with Notepad staying open but according to the CLI, everything should be shut down.

graphic3.jpg

graphic4.jpg

ok update on this… I’ve been able to get it to work but only with the json. If I could use the json for multiple apps I would but I believe you can only do this with the csv. When I switch to the csv it bombs out with this error:

 

06/12/2018 14:36:44.371]: Setting Password [06/12/2018 14:36:44.449]: Clicking login button [06/12/2018 14:36:44.481]: Getting SF resources page… [06/12/2018 14:36:44.481]: Try #1: WAIT [06/12/2018 14:36:45.606]: Exception caught by script [06/12/2018 14:36:45.606]: SF recources page not found [06/12/2018 14:36:45.621]: At C:\Monitoring\Citrix\Scripts\Test-CitrixApp.ps1:282 char:9 + throw “SF recources page not found” + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [06/12/2018 14:36:45.621]: Quitting Internet Explorer [06/12/2018 14:36:45.637]: Releasing Internet Explorer COM object [06/12/2018 14:36:45.668]: *************** LAUNCHER SCRIPT END ***************

 

What a huge pain this has been. My csv looks like this:

 

name

storefrontUrl

resourceName

logFileName

Notepad Crystal

https://storefront.comp.local/Citrix/web

Notepad Crystal

sflauncher.log

 

My json looks like this with quotes and such. I’ve tried multiple combos of ’ and " in the csv and no go:

 

{ “name”:“Notepad-ImageRight”, “storefrontUrl”:“https://storefront.comp.local/Citrix/web”, “resourceName”: “‘Notepad ImageRight’”, “logFileName”:“sflauncher.log”, “timeoutForSFLoginPage”: 30, “timeoutForSFResourcesPage”: 30, “timeoutForSessionLogin”: 60, “timeoutForOther”: 10, “interval”: 300, “syncTime”: “00:01” }

Hi Gary for CSV you need to use just ’NotePad ImageRight’ and the CSV should look like this (its easier to format it in Excel)

 

name,storefrontUrl,resourceName,logFileName,timeoutForSFLoginPage,timeoutForSFResourcesPage,timeoutForSessionLogin,timeoutForOther,interval,syncTime
Notepad-ImageRight,https://storefront.comp.local/Citrix/web,’NotePad ImageRight’,sflauncher.log,30,30,30,30,2700,00:00

I feel like we’ve taken a step back now with csv. Is there a way to use json but have it run multiple apps? I can run the script manually and it works every single time with the json working more consistently. However, with the csv I get the SF Resource err:

 

SF recources page not found [06/12/2018 14:36:45.621]: At C:\Monitoring\Citrix\Scripts\Test-CitrixApp.ps1:282 char:9 + throw “SF recources page not found” +

with multiple apps i hav found its very important to get the spacing right to make sure you don’t have them interacting at the same time, i’ve also added some additional code to test the logout button first and log out to accommodate if a previous session leaves it logged in

we have the problem that the ps script wont launch the app.

manually all works fine.

 

any idea ?

 

[08.16.2018 13:45:20.547]: *************** LAUNCHER SCRIPT BEGIN ***************
[08.16.2018 13:45:20.547]: SiteURL: https://storefront
[08.16.2018 13:45:20.547]: UserName: …
[08.16.2018 13:45:20.547]: Password: …
[08.16.2018 13:45:20.562]: ResourceName: Word 2016 Citrix
[08.16.2018 13:45:20.562]: Creating Internet Explorer COM object
[08.16.2018 13:45:20.844]: Setting Internet Explorer visible
[08.16.2018 13:45:20.890]: Navigating to 'https://storefront
[08.16.2018 13:45:20.922]: Internet Explorer: WAIT
[08.16.2018 13:46:22.488]: Accessing DOM
[08.16.2018 13:46:22.488]: Detecting NetScaler Gateway or StoreFront login form…
[08.16.2018 13:46:22.503]: Try #1: WAIT
[08.16.2018 13:46:23.659]: Try #2: SUCCESS
[08.16.2018 13:46:23.659]: STOREFRONT DETECTED
[08.16.2018 13:46:23.800]: Getting Login button
[08.16.2018 13:46:23.816]: Getting UserName textbox
[08.16.2018 13:46:23.816]: Getting Password textbox
[08.16.2018 13:46:23.956]: Setting UserName ‘…’
[08.16.2018 13:46:24.113]: Setting Password
[08.16.2018 13:46:24.253]: Clicking login button
[08.16.2018 13:46:24.269]: Getting SF resources page…
[08.16.2018 13:46:24.269]: Try #1: WAIT
[08.16.2018 13:46:25.425]: Try #2: SUCCESS
[08.16.2018 13:46:25.566]: Getting resource ‘Word 2016 Citrix’…
[08.16.2018 13:46:25.597]: Try #1: SUCCESS
[08.16.2018 13:46:25.597]: Found 0 session(s) before clicking ‘Word 2016 Citrix’
[08.16.2018 13:46:25.613]: Clicking resource ‘Word 2016 Citrix’
[08.16.2018 13:46:25.628]: Verifying that session launched…
[08.16.2018 13:46:25.628]: Try #1: WAIT
[08.16.2018 13:46:26.628]: Try #2: WAIT
[08.16.2018 13:46:27.628]: Try #3: WAIT
[08.16.2018 13:46:28.628]: Try #4: WAIT
[08.16.2018 13:46:29.644]: Try #5: WAIT
[08.16.2018 13:46:30.644]: Try #6: WAIT
[08.16.2018 13:46:31.660]: Try #7: WAIT
[08.16.2018 13:46:32.660]: Try #8: WAIT
[08.16.2018 13:46:33.660]: Try #9: WAIT
[08.16.2018 13:46:56.457]: Try #10: WAIT
[08.16.2018 13:46:57.473]: Try #11: WAIT
[08.16.2018 13:46:58.473]: Try #12: WAIT
[08.16.2018 13:46:59.473]: Try #13: WAIT

I’ve had to shelve this until Squared Up has improved the pack. According to them keep an eye on this space as they will update it in time. I never could get it to work here. It fails on the verify for me too.

Gary

What version of NetScaler and StoreFront/Web Interface are you running?

David, When using the csv did you put the same “” or ’ syntax in the values in excel as well?

For Notepad Crystal:

{ “name”:”Notepad-Crystal”, “storefrontUrl”:”https://storefront.domain.local/Citrix/domainweb”, “resourceName”: “’Notepad Crystal’”, “logFileName”:”sflauncher.log”, “timeoutForSFLoginPage”: 30, “timeoutForSFResourcesPage”: 30, “timeoutForSessionLogin”: 60, “timeoutForOther”: 10, “interval”: 300, “syncTime”: “00:01” }

For Notepad ImageRight:

{ “name”:”Notepad-ImageRight”, “storefrontUrl”:”https://storefront.domain.local/Citrix/domainweb”, “resourceName”: “’Notepad ImageRight’”, “logFileName”:”sflauncher.log”, “timeoutForSFLoginPage”: 30, “timeoutForSFResourcesPage”: 30, “timeoutForSessionLogin”: 60, “timeoutForOther”: 10, “interval”: 300, “syncTime”: “00:01” }

Awesome. Thank you David. I’ll give that a shot now.

Also, do you change sync times for each one in the list or keep each line at 00:00?

Hi i change all mine so they sync separately every two mins so 00:00, 00:02, 00:04 etc, the script runs into issues if one instance logs out while one is still running etc so best to have them all running separately

ok good deal.

Now I’m seeing the no logon button errors again for each app now that we’ve moved to csv. I didn’t get this with the json set up.

[06/13/2018 09:14:01.549]: *************** LAUNCHER SCRIPT BEGIN ***************
[06/13/2018 09:14:01.705]: SiteURL: https://storefront.comp.local/Citrix/web
[06/13/2018 09:14:01.799]: UserName: comp.local\svclogonsim
[06/13/2018 09:14:01.861]: Password: *****
[06/13/2018 09:14:01.939]: ResourceName: \Notepad HP
[06/13/2018 09:14:02.002]: Creating Internet Explorer COM object
[06/13/2018 09:14:02.455]: Setting Internet Explorer visible
[06/13/2018 09:14:02.533]: Navigating to ‘https://storefront.comp.local/Citrix/web
[06/13/2018 09:14:44.363]: Accessing DOM
[06/13/2018 09:14:44.706]: Detecting NetScaler Gateway or StoreFront login form…
[06/13/2018 09:14:44.941]: Try #1: SUCCESS
[06/13/2018 09:14:44.941]: STOREFRONT DETECTED
[06/13/2018 09:14:45.003]: Getting Login button
[06/13/2018 09:14:45.019]: Getting UserName textbox
[06/13/2018 09:14:45.019]: Getting Password textbox
[06/13/2018 09:14:45.207]: Setting UserName ‘comp.local\svclogonsim’
[06/13/2018 09:14:45.285]: Setting Password
[06/13/2018 09:14:45.347]: Clicking login button
[06/13/2018 09:14:45.394]: Getting SF resources page…
[06/13/2018 09:14:45.410]: Try #1: WAIT
[06/13/2018 09:14:46.550]: Exception caught by script
[06/13/2018 09:14:46.566]: SF recources page not found
[06/13/2018 09:14:46.566]: At C:\Monitoring\Citrix\Scripts\Test-CitrixApp.ps1:282 char:9

  •     throw "SF recources page not found"
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

[06/13/2018 09:14:46.582]: Quitting Internet Explorer
[06/13/2018 09:14:46.707]: Releasing Internet Explorer COM object
[06/13/2018 09:14:46.769]: *************** LAUNCHER SCRIPT END ***************

Also have this error too for some:

06/13/2018 09:22:47.954]: Clicking login button
[06/13/2018 09:22:47.997]: Getting SF resources page…
[06/13/2018 09:22:48.009]: Try #1: WAIT
[06/13/2018 09:22:49.137]: Exception caught by script
[06/13/2018 09:22:49.142]: SF recources page not found
[06/13/2018 09:22:49.150]: At C:\Monitoring\Citrix\Scripts\Test-CitrixApp.ps1:282 char:9

  •     throw "SF recources page not found"
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

[06/13/2018 09:22:49.157]: Quitting Internet Explorer
[06/13/2018 09:22:49.285]: Releasing Internet Explorer COM object
[06/13/2018 09:22:49.299]: *************** LAUNCHER SCRIPT END ***************

sorry no \ that is a weird thing this portal adds when you use certain characters

updated the answer above