Jump to content

GUI based automation while running from SYSTEM without a user logged in


Go to solution Solved by argumentum,

Recommended Posts

Thanks for reading this post, I'll try to cover all the relevant information in what I am trying to do.

I have a customer that uses a program called Lacerte Tax, courtesy of Intuit. As of right now, the only way to update the program is one of three.

  1. Launch the program and login with Intuit credentials and manually install updates.
  2. Run the update scheduler program provided to download the updates, and then still launch the program and enter credentials to then install the updates.
  3. Finally, run a WebsetupXX.exe file that will "repair and reinstall while downloading and installing the latest updates"

My team currently wastes quite a bit of time in this program as it runs on a terminal server and has to have everyone out of the program while doing these updates that on average take 15-30 minutes to complete, at very late hours in the night every couple of nights.

My Goal, make it so I can run WebSetupXX.exe for all "current" years of the program without any user interaction.

The servers in question are a mix of the following running as VMs


Old Server 2012 R2 servers running RDS as a test environment
New Server 2022 servers that are production and where this will hopefully run if it works.

I'm looking to have this script be called by a larger powershell file that will do some other quality of life things surrounding the update.

So far I have the following script that works with a user logged in.

 

#RequireAdmin
#First Parameter when running script should be filled in with the Executable wanting to be Ran for Lacerte
Run(@ScriptDir & $CmdLine[1])

#Inital Window of the program after program verifies licensing
Local $hWnd = WinWait("ProConnect Lacerte")
ControlSend($hWnd ,"&Next", "", "n")

#Making sure network install is selected as it defaults to local always
Local $hWnd = WinWait("ProConnect Lacerte", "Network")
ControlSend($hWnd,"Network install","","{TAB}")
ControlSend($hWnd,"Network install","","{TAB}")
ControlSend($hWnd,"Network install","","{RIGHT}")
ControlSend($hWnd ,"&Next", "", "n")

#Making sure next window is selected, if the program is installed all the correct boxes are auto checked.
Local $hWnd = WinWait("ProConnect Lacerte", "IND")
ControlSend($hWnd ,"IND", "", "n")

#Same as last
Local $hWnd = WinWait("ProConnect Lacerte", "Federal")
ControlSend($hWnd ,"Federal", "", "n")

#Install time
Local $hWnd = WinWait("ProConnect Lacerte", "Lacerte Tax")
ControlSend($hWnd ,"Lacerte", "", "i")

#Sleep added due to potential issues with a confirmation Window appearing if program is already up to date ~2 seconds to open window
Sleep(10000)
If WinExists("Confirm","OK") Then 
    Local $hWnd = WinWait("Confirm")
    ControlSend($hWnd ,"", "", "{Enter}")
EndIf

#Final Window only has the Close button as unique
Local $hWnd = WinWait("ProConnect Lacerte", "&Close")
ControlSend($hWnd ,"&Close", "", "C")

#Creating a text file for verification that it has finished to then clean things up with powershell
Local $Done = FileOpen(@ScriptDir & "\Finished.txt", 1)
FileClose($Done)


This fully works and I've even made some quick power shell to install multiple years of this that waits on the creation of the file at the end and deletes it to wait for another.

My current problem is getting it to run without a user session logged in. I'm a novice at this and have spent about a dozen hours looking at various solutions and misinterpreting them. Is there a way to get this to work at all?

I've tested as a console user (we have remote tools that login as if at the "keyboard" of the machine) - This works
Remote desktop user logged in and running script - This works
Connected to the server with just RDWeb (presents applications only, no full remote desktop) - Does not work (intended)
Connected via a "backstage" using one of our remote tools (presents a limited GUI with several features for doing background management tasks) - Does not work

I've attempted running it with ServiceUI.exe and throwing the bundle in task scheduler. (Works while directly logged in, but not otherwise)

This is where I've left off, I did some reading as potentially launching the script as a service, but I'm not sure if I am barking up the right tree.

Please let me know if you need any further information of if I have overlooked something.

Thanks for your time!

Link to comment
Share on other sites

  • Solution

>GUI based automation while running from SYSTEM
That's a no

>running from SYSTEM without a user logged in
Another no. Part of the first answer above.

What you did is very well done and the limitations you've found can not be overcame by using ... anything.

You either load the hive of each user and re-invent intuits installers ( a big "don't go there" ) or schedule something, so that at login your automation does the install ( while the users finishes the coffee because that's what they are doing anyway ) when an update is needed.

I'd ask intuit if they have a corporate/enterprise update system.

My 2 cents, I don't use intuit

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

1 hour ago, SufferingJack said:

Old Server 2012 R2 servers running RDS as a test environment

Not a good base as "updates won't install on unsupported Operating Systems such as Windows 7, 8, 8.1, and 2012. See here for what operating systems are supported by Lacerte", to replicated later on a different environment. 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Thanks for your help,

Sadly intuit themselves doesn't even have a better update system, they rely on the users themselves to install the updates even in their hosted environment.

I'm sure Rightworks has something since they also do hosting but I've felt it would be rude to ask how a companies sauce is made.

Link to comment
Share on other sites

  • 1 month later...

You're in the same boat as us. We're currently looking at RightWorks, but I think we're going to move our RDS to Azure over the physical server we have located in one of our offices. We've always had someone log in very late at night nearly every night during tax season in order to push Lacerte updates out and if this step could be automated without having to pay 2-3x the price for RightWorks over Azure it would be amazing. Shocked Intuit hasn't came up with a solution for this because it has to be a common issue for tax preparers with multiple users.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...