Jump to content
Sign in to follow this  
ZFerrini

Not Running as logged in user

Recommended Posts

ZFerrini

Forgive me if I sound like I don't know what I am doing because I really don't. I created an AutoIT script to configure MS HIS 2004 to run on Windows 7 during a bare metal install. The script does run and if manually trigger with UAC turned off it will configure the software just fine. We are running LANDesk and I have tried everything to get this to run. I have even went as far as placing the file in the user start menu to run at logon with no success. I can see the GUI run and all the right buttons and drop down menus get set fine the only problem is that the software does not get configured. So as a test, right after the AutoIT script runs, I try to open the software to test the config, still not working. I go to the start menu and run the exact same exe and then test the software config and bam, it works. Is there a trick I am missing?

ZFerrini

Share this post


Link to post
Share on other sites
ZFerrini

Wow, not a very fast turn around? I was hoping for at least a direction to go in.

ZFerrini

Share this post


Link to post
Share on other sites
iamtheky

So I take it you just want us to start randomly guessing, as opposed to actually posting something worthwhile, like the code?

I'm game.

Does it have #requireadmin at the top?


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites
sleepydvdr

I go to the start menu and run the exact same exe and then test the software config and bam, it works. Is there a trick I am missing?

Like iamtheky said, we don't have a lot to go on. Some screenshots, code, etc would be very helpful.

The first thing I would check is this: go to the start menu item that runs the exe correctly and right click on it and go to properties. Under the target section, check to see if there are any parameters after the .exe.


#include <ByteMe.au3>

Share this post


Link to post
Share on other sites
Richard Robertson

AutoIt scripts have an issue with locked desktop sessions. Certain remote access systems do not unlock the desktop in a way AutoIt can interact with it. This is potentially a problem.

Also, if you need administrative access, it needs to be run by a user so the UAC prompt can be accepted.

Share this post


Link to post
Share on other sites
ZFerrini

Cool, thank you for the responses. Sorry if I offended anyone.

Here is a list of steps I have taken:

I have shut off UAC for the run through on this application in the registry and rebooted for this to take effect

Here is the uncompiled code for the exe I run:

======================Begin=============

Run("C:\Program Files\Microsoft Host Integration Server\ConfigFramework.exe /f")

WinWaitActive("Microsoft Host Integration Server 2004 Client Configuration Wizard")

ControlClick("Microsoft Host Integration Server 2004 Client Configuration Wizard", "", "Button2", "left")

WinWaitActive("Microsoft Host Integration Server 2004 Client Configuration Wizard")

ControlCommand ("Microsoft Host Integration Server 2004 Client Configuration Wizard", " ", "ComboBox1", "ShowDropDown")

WinWaitActive("Microsoft Host Integration Server 2004 Client Configuration Wizard")

ControlCommand ("Microsoft Host Integration Server 2004 Client Configuration Wizard", " ", "ComboBox1", "SelectString", 'Everyone (run as an application)')

ControlClick("Microsoft Host Integration Server 2004 Client Configuration Wizard", "", "ComboBox1", "left")

ControlClick("Microsoft Host Integration Server 2004 Client Configuration Wizard", "", "Button2", "left")

ControlClick("Microsoft Host Integration Server 2004 Client Configuration Wizard", "", "Button4", "left")

WinWaitActive("Microsoft Host Integration Server 2004 Client Configuration Wizard")

ControlClick("Microsoft Host Integration Server 2004 Client Configuration Wizard", "", "Button12", "left")

WinWaitActive("Microsoft Host Integration Server 2004 Client Configuration Wizard")

ControlClick("Microsoft Host Integration Server 2004 Client Configuration Wizard", "", "Button19", "left")

WinWaitActive("Microsoft Host Integration Server 2004 Client Configuration Wizard")

ControlClick("Microsoft Host Integration Server 2004 Client Configuration Wizard", "", "Button20", "left")

WinWaitActive("Microsoft Host Integration Server 2004 Client Configuration Wizard")

ControlClick("Microsoft Host Integration Server 2004 Client Configuration Wizard", "", "Button21", "left")

=====================End=============================================

If I just double click on this it runs fine goes through the steps and configures it to a working state. If I try to automate it at all the gateway it configures doesnt work. I have tried putting it in the startup menu. running it with system permissions. Putting in the run and run one reg key. Still refuses to configure the gateway what so ever. I even see it goes through the complete set GUI each time and not miss a the dropdown or any button through to Finish.

Thank you for the assist,

ZFerrin

Share this post


Link to post
Share on other sites
ZFerrini

Hi again all,

So do you see anything I have done wrong here? I am really puzzled by this and any help is appreciated.

Share this post


Link to post
Share on other sites
ZFerrini

Hi All,

I have added my code to this thread, once again, do you see anything I am doing wrong here? I have a real need for this to work and I have a very short time frame to get it solved, about one week left.

Share this post


Link to post
Share on other sites
Juvigy

Try #requireadmin in the beginning of the script as iamtheky suggested.

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  

×