Jump to content
Sign in to follow this  
JaredStroeb

Session 0 with no Controls

Recommended Posts

JaredStroeb

I need to open an application and send it keys in Session 0.  I have exe's working locally, I can see the application open in session 0 through interactive services, but my send commands do not go to the application.  The following article running-autoit-session-0, directs me to use ControlSend() however my application has no controls that can be identified by AutoIt v3 Window Info.  Get All Windows Controls also returned nothing for the application's handle.  

What are my options?  

Can this be done with AutoIt?

Is there a different "relatively simple" library/tool to use? (I am familiar with C# if there is a viable library there )

Capture.PNG

 

Share this post


Link to post
Share on other sites
Earthshine

Why session 0?  Do you know why Microsoft banned it in the first place? 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
JaredStroeb

I know very little about session 0 except that it is where my automation tool(JAMS) starts this application since it needs interaction.  My understanding was Session 0 Isolation first showed up in Windows Vista / Server 2008 in order to mitigate a variety of security risks.  I am not aware of Microsoft banning session 0.  

I do however need to work within the confines of my organization and the existing workflows, so session 0, unless there is a reasonable workaround. 

Share this post


Link to post
Share on other sites
Earthshine

Starting with Windows Vista in 2007 and continuing with every subsequent release, Microsoft has banned users from logging in to the first session created as Windows boots.

right off the first link you gave. did you read it?

so not only violating most basic security laws and if it crashes can bring down ring 0. brilliant.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
JaredStroeb

I am not logging into session 0.  I am scheduling a program to run autonomously.  All other jobs are run as a background process, in this particular situation the UI could not be removed.  In order to automate this the UI is displayed using interactive services and session 0.  

Are there other options to run this cobol program and go through a progression of button presses? 

 

Edited by JaredStroeb
  • Like 1

Share this post


Link to post
Share on other sites
Earthshine

cobol. hmmmmm man, haven't heard of that in a while. good question. good luck, hope someone more qualified has something to say


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
jdelaney

https://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F

This also applies to 'Session 0'.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
JaredStroeb

I have read that FAQ unfortunately the solution is to use ControlSend().  That has proven not effective when there are no Controls present in the window. 

Is there a way to use ControlSend() without specifying a control to interact with?

Edited by JaredStroeb

Share this post


Link to post
Share on other sites
jdelaney

Nope.

You can create a scheduled task that runs as a specific logged in user, to run interactively...login that user, remove all logout timers.  When you want to start it, remotely execute the scheduled task.

What kind of a window is it?

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
JaredStroeb

 

On 12/1/2017 at 0:52 PM, jdelaney said:

What kind of a window is it?

I don't quite understand what you are asking.  Here is my window information:

>>>> Window <<<<
Title:    LifePRO - LPTEST THIN for V16
Class:    HwndWrapper[lpdrvr.exe;;614f3eaa-fb0b-4c5a-aa24-9babb17b07b7]
Position:    43, 28
Size:    940, 700
Style:    0x16CF0000
ExStyle:    0x00040100
Handle:    0x00300ABE

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • therks
      By therks
      Does SciTE have string or number ids for the recent file menu items?
      I was hoping to add shortcuts (using the user.shortcuts properties) to the most recent item, but the documentation doesn't list any id's for those items (unless I overlooked?).
      Also, did anyone else notice that the index listing for the SciTE doc doesn't work properly?
      It appears it's linking to this: mk:@MSITStore:C:\Program%20Files\AutoIt3\SciTE\Scite4AutoIt3.chm::/SciTEDocumentation.html
      When it should be this? mk:@MSITStore:C:\Program%20Files\AutoIt3\SciTE\Scite4AutoIt3.chm::/Scitedoc/SciTEDoc.html
    • DynamicRookie
      By DynamicRookie
      Hey There!
       
      So, what i need to do is an app that can read text in a image (I.e. a png that has text saying "This is a png" and return the text to a variable)
      I'm pretty much a newbie on AutoIt, my purpose is doing that but i don't know any function that can

      Any help is much appreciated
    • santoshM
      By santoshM
      How can i exit from a procedure in auto
      Func test() if x=o then     return endif endFunc  
    • Valnurat
      By Valnurat
      Hi
      Small question.
      I trying to find all index in an array with value higher than 7.
      How can that be possible?
    • TrashBoat
      By TrashBoat
      Could someone help me create or give an idea of how to do a incrementing for loop that would do this: https://i.imgur.com/YFUt47H.gifv
      I'm having a hard time figuring it out :S
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.