Why Flash can't be rendered in a Windows Service? - windows

I'm trying to solve a similar problem as was described here - to create a Windows Service for taking snapshots of rich webpages (html+js+flash) and saving them to a PDF file.
The bundle Firefox+cmdlnprint did the trick for me. I wrote a simple program running as a service that invokes Firefox to make a PDF. All seems well, the PDF gets created, but Flash is completely missing. Although, when started not as a service, Flash renders just fine.
Can anyone shed a light on what blocks Flash from rendering and if there's a workaround?
thanks!

I can only shoot into the dark here but two things come to mind:
Who (which user) is your service running as? What happens if you make the service run under the administrator user?
If your service is running on the local system account, have you enabled the "allow exchange of data between desktop and service" check box for the service (Don't know what it's named in english)? You never know what Flash may need to run.
If that doesn't work out, have you looked at Crowbar and XULRunner? I don't know for sure whether they do what you need - and if they do, whether Flash works with them - but they seem to be approaches to the same thing you are trying to do.

Related

UIPath Automation: Is it possible to perform click and UI interactions in cloud server in UI Path?

So I have created an xaml flow which clicks browser buttons downloads files and then does some basic operations. I setup a windows server and connected remotely to it and when I debug my process automation while staying on the screen it works smoothly, problem is that I can't keep my pc on forever so when I just minimize the file even though my system remains up and running:
The UI Path process kills as the button press times out. I was just curious to know if it's compulsory to keep screen up for the ui based process automation to run through or is there a way to initiate the process and then close the screen and let the system do its job?
This is the eror I get which is like first UI interaction:
Here are the steps I have performed:
Created an unattended robot with machine as the remote instance name.
Created an environment and connected with the robot created in step 1.
Setup UIPath Assistant using machine key and URL.
Published the files and then created the process in cloud console.
Ran it from cloud console.
The process faults at its first UI interaction. Even though it was running in unattended robot form.
Thanks in advance.
AFAIK this is intended by the licensing model of UiPath. So to solve the issue you need a license for the VM of your RDP connection that allows the unattended usage.
Another idea could be to start the process in the PIP (picture-in-picture) mode. But I have never tested that, so this might also not work.
But maybe you already have a license like that and could test that out.
These are our types:
Solution for UiPath Studio 20.4 or higher
For my Use Case Picture in Picture mode worked correctly. Thanks #kwoxer for the suggestions, though his answer was enough but I am adding it up here for those who may need future reference.
So If you're facing issues with automating user interactions in dynamic JavaScript Website over a cloud server that loads on demand (When you minimize or close your remote session, the process times out as it's not able to find the UI component), here are the simple steps to follow:
Goto Debug options on top and select picture in picture as shown below:
This basically lets the bot start the system from another node. Now when you run the system and even close the remote connection, the automation process including all sorts of UI interaction will work like charm. Please let me know in case someone faces the issues with the same. Would love to help!

ActiveX Flash-Player can't access web-content?

I have a ActiveX control hosting a flash-player which is in turn running a flash file trying to access data from a web-address.
In an old Windows Application version of my application everything works fine and the flash file is able to access the web-content.
However, in a newer Console Appliction version of the application it can no longer access the web-content.
Any ideas what might be causing this? Is there some kind of difference between a Windows Application and a Console application in terms of security/permissions that might affect an ActiveX hosted flash-player?
I'm using Windows 7.
First of all - how did you manage to get an ActiveX into a console application? :) I think ax needs window handles and all such things...
Anyways, there are different kinds of sandboxes from the Flash player perspective, what you are seeing is the "local not trusted" kind. In order to "trust" the SWF that issues the request you would need to use this page to confirm that the location where SWF comes from can communicate to the internet.
Doing so may be a hindrance for the user, but if this is the case, you could write the trust files on your own. Example

Windows Service Screen Shoot?

i kind a newbie on windows service programing, my idea is that i want to create a windows service that will take a screen shoot of the desktop client,i mean i want to attach this to a aspx page, the screen shoot code is working 100% but problem is when i trigger windows service after install it, nothing happened.
I debugged it and there was not prp, after that i made a small screenCapture.exe file to do the job and try calling it from the service, all i got was a black screen, tried everything with it and no luck.
Then i read about desktops and stuff like that, but honestly i don't understand any of that, i goggled a lot but no luck so far, problem is that i saw a website that implement this function so it can be done. BUT HOW ??? please help me out cause i am stuck here, and if u do explain good, cause as i told u i am kinda new to this
A service does not have access to the desktop. You might want to create a program that runs when the user is logged in interactively.
Not sure which Windows you are using...but starting with Vista, the ability to interact with desktop from a service has been disabled.
A service will not have access to the desktop. This is done intentionally by Microsoft for better security. The other option you can try is, goto the service properties and give it option to interact with the desktop. This can be done using local user permissions.

Updated: Interacting with the user on the windows logon screen

#UPDATE:
OK FOR ANYONE ELSE WHO IS SEEKING ADVICE ON THIS ISSUE...
So far, the best thing I have found is to download yourself a copy of pGina and for 2k/XP modify the GINA, and for vista/win7 you will need to create custom login credentials (pGina have the tools/samples to interface with the Vista/Win7 architecture).
to confirm -- it appears that this is what Novell are doing with Vista/Win7 rather than the traditional method of replacing the GINA (like in 2k/XP)
If anyone else comes up with a way to run an application on the logon screen in Win7 please post it.
Ok I'm writing some vb6 software that requires input before the user logs on to the system.
Basically I want to run an application on the Windows logon screen where the user can interact with the program. At present I have the application running as a service allowing to interact with the desktop, but it is still now showing.
I know that "Allow service to interact with desktop" will work in Windows 2000 / XP, I'm running Windows 7 - I am also aware that services cannot directly interact with a user as of Windows Vista - saying this, are there any other methods to get my application running on the logon screen. Novell does it
Does anyone have any other ideas to get this working?
You can only do this if you are authenticating the credentials yourself. Prior to Vista, this was done via GINA, but since Vista, you need to write your own Credential Provider.
The reasons behind this are buried deep in the security principles -- Ctrl-Alt-Del will only ever bring up the window station associated with login (etc), and no other application can get to that window station (so you can't create a fake password box over the top to scrape passwords, for instance).
Without knowing why you think your service needs to interact with that desktop, it's difficult to advise further, but it might mean that your design is broken somehow.
Service isolation will probably prevent you doing this from a service.
Pre-vista Novell and the like would probably have used GINA, which was replaced in vista; http://msdn.microsoft.com/en-gb/magazine/cc163489.aspx
The only way I know of would be to write your own msgina.dll.
It can get dicey during testing though. Any mistakes can mess up your OS so bad that a complete reinstall becomes necessary.

Need to Unlock Win7 Desktop from C#

I am working on some Automation Project where one needs to perform some action related to display resolution.Change the Display resolution , Lock the Desktop and then Unlock Desktop again to check that resolution remained same.
I am able to perform LockWorkstation but unable to have any thing for Unlock Workstation.
Can any body help me regarding unlocking Display with help of C# and in Win 7 ?
I heard of GINA dll which can help ,but I dont know anything about it.Can this be used for Win7 and .NET 3.5?
Thanks
_Prat.
I don't think that doing this is technically feasible. GINAs were deprecated after XP and the new way to provide custom authentication in Vista/Win7 is to use the ICredentialProvider
interface. Even if you get this working you'll still have to somehow send the the secure attention sequence, i.e. ctrl-alt-delete, to initiate the logon. Sending ctrl-alt-delete programmatically is itself something that is difficult to do and not really supported.
This sounds like a lot of work for some automation and probably won't have much ROI. Can you test this by logging the user off completely and then logging back in? If so, then you could set your test machine to auto-logon the user. When you log-off it will shut down the session and then promptly log the user back in and you could check if the resolution is what you expect.

Resources