Jump to content

Run Command or ShellExecute Command to start a servers side app from the client using absolute/relative path


 Share

Recommended Posts

I am new to AutoIT and need help and a fresh perspective on how to code either a 'RUN' command or ShellExecute statement to open our server side applcation.

My objective is for our system admins to execute the AutoIT script which first display's the prompt notifying him/her the script will beging running in 5 seconds (unless they choose no), Next Run the command to start the server application located in \\servername\DOCEX\_docex.hvw.

There is a shortcut on the desktop of the client for this application with the following target properties are : \\servername\DOCEX\_docex.hvw") Start in: C:\DOCEX\

Everything works until I try to run the application that resides on the server in the AutoIT Script.

Code Snippet:

; Location of the application running on the server I am trying to run. [\\Servername\directory\filename.extension]

$application = ("\\servername\DOCEX\_docex.hvw")

; Prompt the user to run the script - Y/N

$answer = MsgBox(4, "Application Test Script", "This script will activate the Application Script. Click Yes to Run",5)

; Check the user's answer to the prompt

; If "No" was clicked (7) then exit the script

If $answer = 7 Then

MsgBox(0, "Application Test Script", "OK. Bye!")

Exit

EndIf

;Run the DHDS Login Script

Run($application)

; Application Main Window opens on client workstation where AutoIT script is being executed.

Thank you please help:(

Link to comment
Share on other sites

What is the error message you get from your AutoIt script? Can you start the application properly from server when you run it from Start->Run on the client?

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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...