Windows service to dismiss legal disclaimer - windows-xp

Is there a way push a keystroke to the legal text dialog using a windows service?
I looked in the windows xp boot sequence wiki
http://en.wikipedia.org/wiki/Windows_NT_startup_process
These two items were of interest to me...
Starts the kernel-mode side of the Win32 subsystem (win32k.sys). This allows Windows to switch into graphical mode as there is now enough infrastructure in place.
Starts the user-mode side of the Win32 subsystem, the Client/Server Runtime Server Subsystem (csrss.exe). This makes Win32 available to user-mode applications.
I was thinking a windows service would start up soon enough to detect the open windows, but i do not seem to be able to grab that window handle...
Any ideas would be greatly appreciated.
The local security policy that displays the legal text is locked by AD and i do not have access to remove it, and IT does not want to move it into the "normal" location of the registry, and out of the local security policy.

The windows service does not get executed until the user accepts the legal dialog. It seems the entire computer is waiting on this modal dialog to the acknowledged before it continues the boot process.

Related

Start & display application's GUI from a headless Windows VM?

User clicks on a desktop icon that looks like the icon of the application
A script gets executed that starts a headless Windows VM if it isn't already running, or starts the application on it, if it doesn't run either
The application's GUI is proxied and displayed at the user's desktop environment
More descriptive:
I have a Windows application that is only operable through its GUI and I want to start it from a Windows VM without desktop-environment.
Similar to what X11 can do with display a window from a remote machine by Xming.
So in the end I can run applications from VMs where the normal user think the application runs locally on their Windows desktop computer, but are actually isolated in a VM.
Sounds a bit like a mixture of Docker and RDP, just for application windows, not a whole desktop env.
Searching the web I've found VRDP with headless VM (https://docs.oracle.com/en/virtualization/virtualbox/6.0/admin/vrde.html) but there isn't enough information if this can work only for application windows too.
Is that possible?

BluePrism runtime inside Citrix desktop

I am looking at an architecture where we have the BluePrism runtime running inside a Citrix Desktop.
I see plenty of articles that talk about processing a Citrix desktop as part of an automation process, but as far as I can see they talk about firing up a Citrix app from within a process. In other words they have a physical laptop that runs the BluePrism runtime, and part of the process requires it to run a citrix desktop, and automate that. I understand that this scenario is problemtic, and requires you to use Surface Automation.
In my case we have a set of physical laptops, and we would like to completely replace these laptops with VMs. So the runtime will be in the same desktop as the target apps.
Question is, does this work, or are we still faced with having to convert all our BluePrism processes to use Surface Automation to get this architecture to work?
This works with VMs and Surface Automation isn't necessary in that case. All your objects will be doing is attach the target apps by calling their runtime process names on the VM desktop, or launch them from the parent (i.e. folder in the root desktop/server) by providing the path in your application model, and then have your BP objects launch attach to them. Surface Auto may be necessary if you are planning to interact with the actual Citrix Receiver (e.g. icons), but not the apps themselves once they are active on the VM desktop. Of course, all this assuming BP will be also on the VM desktop environment.

Controlling Google Chrome via Perl script

I was looking for a way to check for changes in a specific URL provided by the user. I wrote a script that I ran at home that can do that successfully using WWW::Mechanize. The thing is, I need to run it in another computer network that has a group policy that blocks all $mech->get($url) requests (it's not firewall problems, I let Perl through), so I thought I'll try and work around this problem by letting Perl control the web browser.
The computers in the network run Google Chrome and IE8 only and I can't install Firefox due to another policy (thought of using WWW::Mechanize::Firefox). I don't want to invoke IE8 in the script because most of the URLs that will be provided will be of websites that don't work well with it, so that leaves me with Chrome only.
Searching for a module that can do that, I only found AnyEvent::Chromi:
which exposes all of the Chrome Extensions API via a websocket connection.
This doesn't work (the policy probably blocks that websocket as well).
Is there another way to work around this problem/control Chrome from within a Perl script?
Is there another way to work around this problem/control Chrome from
within a Perl script?
WWW::Mechanize::Chrome
Like WWW::Mechanize, this module automates web browsing with a Perl object. Fetching and rendering of web pages is delegated to the Chrome (or Chromium) browser by starting an instance of the browser and controlling it with Chrome DevTools.
You can also do this from scratch without using any CPAN modules.
I tested this on Linux (Ubuntu 16.04, Google Chrome version 53) using Unix Domain (UD)
sockets. Unfortunately, it seems Windows does not have UD sockets, but
it should be possible to do same from Windows using named pipes.
First, make sure google-chrome is running in the background. We will
need to create a Chrome App
that will communicate
with a native host through the native messaging
API. The
native host can be any script that reads messages from its STDIN and
returns replies through its STDOUT. I tested both a Python
script and a Perl script.
Now, in order for a standalone Perl script to communicate with the
Chrome browser, it will send request through a UD socket (created by
the native host) to the native host; the native host will then
forward the request to google-chrome through its standard output
pipe. Then the Chrome App (written in JavaScript)
will receive the request. The Chrome App will use the Chrome
JavaScript APIs to get the requested data and return it to the native
host. Finally, the native host forwards the result through the socket to
the Perl script.
As you can see, there are some details required for setting this up, but I can
confirm that it works on my Linux platform. Please let me know if you need more
details.
Since you mentioned IE8, I'm assuming that you're dealing with a Windows system. And since you mentioned that you had considered WWW:Mechanix::Firefox, it sounds like you are not being restricted to just core modules.
Based on that, the only way that I can think of to automate the Chrome broswer would be to use Win32::GuiTest to control the Chrome browser. If you can figure out how to manually drive your testing using only keyboard input (i.e. no mouse), that would make things easier than trying to figure out the mouse emulation to get the cursor to the correct position for various tasks.
I'm not sure if that's necessarily a route that you will like to use or not. It's just the only way that I can think of to accomplish what you want to do with the restrictions that you have to deal with.

Can't get Direct3d app to start in Windows 7 kiosk

We run our application in a kiosk environment of sorts, replacing Explorer with our application. Everything worked fine under Windows XP, but with Windows 7 we can't get it to work.
We set the registry key WinLogon to a custom user.bat batch script (no further registry tweaking) in which we wait for several services to start (SQLServer, for example), then launch our application.
This worked great in XP. However, in 7, all needed services are detected, but when our application starts, it fails when trying to load its .fx file. It's as if some service or component related to DirectX has not been yet initialized. Any hints on troubleshooting this?
We solved this by making our program which waits for services try to play an avi (without displaying it) using DirectX. We cover that code with a try-catch block inside a loop and insist on it until it succeeds, which means DirectX is available. A nasty hack, but since the user can't see it, it's good enough for us.

Virtual registry to Windows XP

What options for registry virtualization exist that will work with all Windows versions starting from XP? Basically what I need is a way to hijack some registry reads for a particular application and returned "virtualized" values.
Something that might add to the complexity of the solution need is the fact that this application can spawn additional processes, which also need to be virtualized.
I am afraid that there is no readily available Registry virtualization APIs or framework in Windows XP. You need to build one by making use of user mode or kernel mode Registry API hooks. Some approaches are:
- User mode hooking of RegXxxx APIs by using SDKs like Microsoft Detours or MadCodeHook.
- Kernel mode hooking (SSDT or inline) of ZwXxx or NtXxx APIs. Sysinternals Regmon and now Sysinternals Process Monitor does this to monitor system-wide Registry calls.
There is only one solution - to use boxedapp. it's sdk for creating virtual registry. It must help you. Goodluck.