Sikulix/Jython UAC automation - jython

I was wondering if anyone had any luck automating through UAC pop-ups during installer automation?
I have an existing Automated installer code but it fails at the UAC area due to Sikuli not using keyboard/mouse during this step...
Anyone had any luck here? or no a way to do this in Jython?
Thanks

The reason Sikuli doesn't work in this scenarios is because the UAC dialog is displayed in a "Secure desktop" which you can read more about here. Secure desktop prevents all interaction so even you attempt to take a screenshot of the UAC dialog itself, it will fail.
That being said, there is a workaround. You can disable switching to secure desktop by following these steps:
Run gpedit.msc
Under Computer Configuration\Windows Settings\Security Settings\Local Policies\SecurityOptions,
change "User Account Control: Switch to the secure desktop when prompting for elevation" to disabled.

Related

Git authentication not opening VSCode as "other user"

To set the scene: I work in a highly restricted SOE. I can only sign in as a standard user, but have administrative access through "Run as other user" or "Run as administrator".
When trying to setup GitHub access, VSCode running as administrator opens an authentication window in a browser that then wants to re-open VSCode. The issue is, reopening VSCode in this manner only opens as the standard user, not running as administrator. This happens connected to the internet through the work network, and via hotspot.
I am NOT permitted to sign-in directly as administrator.
My colleague has told me there used to be a way to sign in by copying and pasting a token directly into VSCode, but this appears to no longer be an option.
Is there another way to authenticate GitHub with VSCode, other than the web-based sign-in?
Thanks
I was able to work around this some time ago by getting a Personal Access Token working.
The environment I'm forced to work in made even this difficult, but got there eventually.

Bixby Developer Studio keeps asking me to login

When I first launched Bixby Developer Studio, it greeted me with a startup screen with a Login button. I clicked on it and it opened a login page in my browser. I logged in that page using my Samsung developer account. The login was successful and a pop-up appeared asking me if I will allow the page to launch Developer Studio (which was already open at that point). I allowed it, but nothing happened; Developer Studio was still showing the startup screen.
I restarted the application but it again showed me that startup screen with the login button. If I click on the login button, it will just take me again to the login page in the browser. And then nothing would happen if I login again.
I'd suggest verifying if your browser is configured to accept cookies. If that information is verified and the problem still exists, there might be additional information in the ide.log file that can provide more insight
To get that information, follow these steps:
Note the time when you begin the next steps.
Go through the login process until you hit the point of failure.
From the IDE menu, click on Help -> Create Diagnostics Report. This
will popup a dialog that will point you to the location of the
diagnostics report, by default this location is
C:\Users\'User'\bixby-workspace\
Unzip the diagnostics report and look at the ide.log file for any
errors at the time of login.
Feel free to post the errors here or if you prefer, you can open a ticket with Bixby Support too.
There are a couple of points you could work on here -
In this case, I suggest you to keep the browser open in the background while clicking on the login button. I was facing the same issue and somehow it worked for me like this. This has been an issue on a Windows machine. On a Mac this problem is not faced till now.
You could restart the Bixby studio itself for logging in again.
Also, I suggest removing the browser cookies as told by shahnawaz above.
Do let us know if this still persists !
Thank you all for your suggestions. For some reason, it just started working right after I received dozens of Windows updates (it's been a few days since I logged in to my Windows account as I have been using Linux; I rarely use my Windows account now and I wish Bixby Studio was available in Linux too). So, I actually haven't tried any of your suggestions yet. Thanks again, anyways!

Blue Prism Surface Automation over Citrix

We're experiencing problems spying a Citrix window.
Our team is not able to spy the outline of the Citrix application window once it is launched. We tried full-screen, on the desktop, on the laptop, closing all other windows, and numerous other scenarios. I believe that it is because the sign-in is via internet explorer and once the Citrix application is launched, the application detaches from Blue Prism.
We were working to troubleshoot this issue and are trying to set up a separate business object for the Citrix window. Another problem is that we cannot launch the Citrix .exe file because it does not allow us to input any parameters to log-in that way. We’re now looking into saving the Citrix file as an .ica file (see https://support.citrix.com/article/CTX804493).
Does anyone have any suggestions?
You'll need to use Surface Automation techniques in order to interact with applications launched via Citrix. Essentially bitmap mapping.
If you are having difficulty attaching to the citrix window itself, try using a dedicated application like citrix receiver and have Blue Prism launch that application.
You could also try checking the windows process running (.exe) once citrix is launched via IE, and then try attaching to that process.
Good Luck.
Try using System Internals process monitor to make sure you attach the correct application, download it for free from Microsoft
When you work with Citrix it depends on the mode you are using. Some of the windows will actually be separate windows, use the Active Accessibility mode to spy them. Some other "windows" or tabs are only visual and you will need to use the Region mode to interact with them.
You should probably be aware that BP has a known issue not flushing all unused memory until the process is finished. If you have a large scale SA process that requires a lot of image processing, OCR etc. it should be a design consideration.

How to achieve the click action of UAC window in UI automation

When automating with Selenium, a UAC (user account control) window pops up as shown in Figure, need accept the relevant license. I could not use the AutoIt tool to click that.
I am searching for a long time on Internet. But no use. Please help or try to give some ideas how to achieve this.
You can disable UAC on the machine you're running.
If you can't, try running as administrator.
BTW, this has nothing to do with Selenium. Maybe you meant the UI Automation framework by Microsoft.
There is a simple reason why you can't find any information on this topic - it is simply not possible. UAC is a security feature. The UI prompt runs on a secure desktop session. It cannot be automated. Allowing it would be a major security hole.

Testing install procedure of a program requiring administrative privileges

I'm trying to write automated test, to ensure that the installer for my program works okay.
The program can be installed for all users (requires admin privs), or for current user (does not require admin privs). The program can also autoupdate itself, which in some cases requires admin privileges, and in some cases doesn't.
I'm looking for a way where I can have an automated test click "Yes, Allow" on the UAC dialogs, so I can write tests for all different scenarios, on many different operating systems, so that I can be confident when I make changes to the installer that I didn't break anything.
Obviously, the installer process itself cannot do this. However, I control the complete machine, and could easily start some sort of daemon process with administrative rights, that the testprogram could make a socket connection to, to request it to "please click ok on the UAC now".
I actually figured out how to do this while looking to answer a similar question about UAC. Here is what you can do:
Write a service that runs as SYSTEM.
Open the process token of the winlogon.exe instance running in your logon session.
Use that token to launch a helper process on the Winlogon desktop via CreateProcessAsUser.
At this point, you have a helper process running as SYSTEM in your logon session on the Winlogon (secure) desktop. From here you can use some kind of IPC mechanism to communicate from your automated test program to the helper process. In the helper process you can EnumDesktopWindows to find the UAC prompt. This is as far as I took it; I didn't actually try to simulate clicking Yes or No, but I don't see any reason why it wouldn't work. Also, I only tested on Windows 7 32-bit; I believe the UAC architecture is identical to Vista, but I didn't test on it.
It took me a while to figure all this out; I can provide some code if you want.
EDIT: Just as a follow up I added code to use FindWindow() to find the "Yes" button and I was able to successfully send it a BM_CLICK message; the UAC prompt went away and the application was allowed to run.
An alternative solution might be to turn UAC off
The least bad solution I've found so far is to run the tests in a VMWare session, and control the mouse/keyboard trough the vmware sdk. Would love to hear about other solutions
Remote Desktop to it or run it as a guest VM (using Virtual PC or whatever, just don't boot to it.) This is also the best way to take a screenshot or video of the UAC prompt.