Jump to content

please help!


Recommended Posts

Hi

sorry if you find some mistakes while reading this, english is my second language :)

I am new to autoit and all these stuff, I created an interface using Koda form designer, so that I can choose the software I want to install from it.

Also I recorded some software installations process using Au3recoder so that when I click on a button in the interface I created,

it starts the process by calling the compiled .exe file (once the resulting .au3 file is compiled)

If I try to run the interface I created,everything works fine but I would like to install software on another pc over the local network but I dont know how to do that... ;) I tried to share the folder where all files are contained.

but it didn´t work. I just get the interface with all buttons and when I click on any button nothing happens.

any advice?

Link to comment
Share on other sites

Yes, post the code you have.

HERE IS MY CODE

#include <ButtonConstants.au3>

#include <GUIConstantsEx.au3>

#include <IE.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Users\ziu7\Documents\AutoIT\Forms\Interface.kxf

$Form1_1 = GUICreate(" Easy-Installer V 1.0 -Paqueteria PINSA-", 688, 502, 233, 141)

GUISetBkColor(0x434E54)

$Button1 = GUICtrlCreateButton("Micosoft Office Estandar", 157, 168, 160, 35, $WS_GROUP)

$Button2 = GUICtrlCreateButton("Anti-Spyware McAffee", 339, 120, 160, 35, $WS_GROUP)

$Button3 = GUICtrlCreateButton("Agente OK", 518, 120, 160, 35, $WS_GROUP)

$Button4 = GUICtrlCreateButton("WinRAR", 518, 216, 160, 35, $WS_GROUP)

$Button5 = GUICtrlCreateButton("Foxit Reader V4", 339, 216, 160, 35, $WS_GROUP)

$Button6 = GUICtrlCreateButton("Microsoft Office Profesional", 339, 168, 160, 35, $WS_GROUP)

$Button7 = GUICtrlCreateButton("VNC", 518, 168, 160, 35, $WS_GROUP)

$Button8 = GUICtrlCreateButton("McAffee Antivirus", 157, 120, 160, 35, $WS_GROUP)

$Button9 = GUICtrlCreateButton("Winpopup", 157, 216, 160, 35, $WS_GROUP)

$Pic1 = GUICtrlCreatePic("C:\AutoIT (Easy-installer)\bg15.jpg", -8, 0, 150, 500, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

$Button10 = GUICtrlCreateButton("example", 338, 403, 160, 50, $WS_GROUP)

$Button11 = GUICtrlCreateButton("K-Lite Codec", 157, 264, 160, 35, $WS_GROUP)

$Button12 = GUICtrlCreateButton("WinaSO", 339, 264, 160, 35, $WS_GROUP)

$Button13 = GUICtrlCreateButton("WinaSO", 517, 264, 160, 35, $WS_GROUP)

$Pic6 = GUICtrlCreatePic("C:\AutoIT (Easy-installer)\BG2.jpg", 139, 0, 548, 500, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

$Link = GUICtrlCreateLabel("About", 640, 0, 47, 24)

$URL = "http://www.tufesa.com.mx/pasaje.html"

GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")

GUICtrlSetColor(-1, 0xB9D1EA)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

GUISetState()

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $button1

Run("C:\AutoIT (Easy-installer)\exes\StudentDOG_auto")

Case $msg = $button2

Run("C:\AutoIT (Easy-installer)\exes\winamp")

Case $msg = $button4

Run("C:\AutoIT (Easy-installer)\exes\winrar2")

Case $msg = $button5

Run("C:\AutoIT (Easy-installer)\exes\foxiit")

Case $msg = $button7

Run("C:\AutoIT (Easy-installer)\exes\vnc")

Case $msg = $button9

Run("C:\AutoIT (Easy-installer)\exes\winpopu")

Case $msg = $Button10

Run(@comspec & ' /c START "" "' & $URL & '"', @SystemDir, @SW_HIDE)

Case Else

;;;

EndSelect

WEnd

Link to comment
Share on other sites

Idon`t have to much idea but i know that the switch - select thing is not the problem, the folder that you use to run the other scirpts. exists when you share the program? what is the return of the Run() functions?

Edited by monoscout999
Link to comment
Share on other sites

Idon`t have to much idea but i know that the switch - select thing is not the problem, the folder that you use to run the other scripts. exists when you share the program? what is the return of the Run() functions?

I have a folder that contains all files,it is named "AutoIT (Easy-installer)" here I have my "interface .exe" file Also I have another folder named "exes", in this folder are all .exe files that are called by clicking any button in the interface I created ("C:\AutoIT (Easy-installer)\exes\program_name.exe")

If I run my interface locally everything works fine, but if I share it and then try to run it on another machine I get the interface but when any button is clicked no script is executed.

and If I copy the whole folder and place it on another machine local disk C: everything works fine but I don´t want to copy the content of the folder and place it on another machine everytime I need to install software.

did this give you a better view of my problem?

Link to comment
Share on other sites

The problem is in the path strings.

so try this for example.

Run(@Scriptdir&"\exes\StudentDOG_auto")

If you want to run trough the network i don`t have any idea but moybe someone else knows how to do it.

Edited by monoscout999
Link to comment
Share on other sites

The problem is in the path strings.

so try this for example.

Run(@Scriptdir&"\exes\StudentDOG_auto")

If you want to run trough the network i don`t have any idea but moybe someone else knows how to do it.

could you explain to me what the difference is between Run(@Scriptdir&"\exes\StudentDOG_auto") and Run("C:\AutoIT (Easy-installer)\exes\StudentDog_auto")?

what does Run(@Scriptdir&) does exactly?

Link to comment
Share on other sites

can anyone help me to run the application I´ve been talking about? I followed all advices you gave me but it hasn´t worked

I want my application to run over a local network so that I can acces from another computer to the folder where the application is and then run the application to start installing software.

any advice?

Link to comment
Share on other sites

  • Moderators

Use UNC paths instead of paths like: C:\

You have to remember it's running locally for them on their machines, so you need the actual path(s) back to where the installation executables are.

Edit:

This is provided that you're actually running from a properly configured network of course.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Use UNC paths instead of paths like: C:\

You have to remember it's running locally for them on their machines, so you need the actual path(s) back to where the installation executables are.

Edit:

This is provided that you're actually running from a properly configured network of course.

could you give an example about using UNC paths please?

Link to comment
Share on other sites

Maybe you should ask the person who helps you to switch your computer on ;-) And hey, does your keyboard have an F1 key?

But joking aside, before you start coding, don't you think you should learn how computers and networks are working, first? Eight days and no further answer, did you get it???

Try to use your browser and some kind of search engine, e.g. google or wikipedia to get some basics. I'm afraid your next question will be "how is a browser working" or "what is google".

The guys here did their best to help you, but every tecnical phrase they used in their explanation raised another question from your side.

I think that it is not fair to grab all the knowledge from those guys without cooperation from your side. We all have been newbies like you but most of us have spent hours, days or maybe weeks to solve a problem on our own before we asked for help in an act of utter desperation.

BTW, when I take a closer look at your code, is e.g. "winamp" in "Run("C:\AutoIT (Easy-installer)\exes\winamp")" pointing to your compiled executable (winamp.exe) or is "winamp" the folder where the exe is stored in? If the latter is right then I don't know how your script can work on a local computer.

It is never a good idea to work with static paths. Try to keep your paths dynamic by using macros like @ScriptDir or something. If you don't know what that means, type @ScriptDir within SciTE, move the curser into the word @ScriptDir and hit your F1 key. If you don't use SciTE right now, do it. And don't ask me what SciTE is, search for it!

Communication terminated!

Link to comment
Share on other sites

Maybe you should ask the person who helps you to switch your computer on ;-) And hey, does your keyboard have an F1 key?

But joking aside, before you start coding, don't you think you should learn how computers and networks are working, first? Eight days and no further answer, did you get it???

Try to use your browser and some kind of search engine, e.g. google or wikipedia to get some basics. I'm afraid your next question will be "how is a browser working" or "what is google".

The guys here did their best to help you, but every tecnical phrase they used in their explanation raised another question from your side.

I think that it is not fair to grab all the knowledge from those guys without cooperation from your side. We all have been newbies like you but most of us have spent hours, days or maybe weeks to solve a problem on our own before we asked for help in an act of utter desperation.

BTW, when I take a closer look at your code, is e.g. "winamp" in "Run("C:\AutoIT (Easy-installer)\exes\winamp")" pointing to your compiled executable (winamp.exe) or is "winamp" the folder where the exe is stored in? If the latter is right then I don't know how your script can work on a local computer.

It is never a good idea to work with static paths. Try to keep your paths dynamic by using macros like @ScriptDir or something. If you don't know what that means, type @ScriptDir within SciTE, move the curser into the word @ScriptDir and hit your F1 key. If you don't use SciTE right now, do it. And don't ask me what SciTE is, search for it!

Communication terminated!

Why being so rude in your first public post? you have right in some parts, but maybe there is someone that still want to teach something to a noob user.
Link to comment
Share on other sites

If I'm reading this right, then maybe this will help.

Firstly, do you have a network with proper name resolution (ie DNS(preferably) or WINS servers). If so you can use paths such as \\computername.domain\sharename(DNS) or \\computername\sharename (WINS) (these are UNC paths).

If you aren't using name resolution do you have static IP addresses assigned? If this is the case you can use \\10.58.1.2\sharename (still UNC path)

So, asuming If you have DNS or WINS running, create a share on a device that all your clients can see, put all your install .exe's in here and then make sure that your script paths point to this location.

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Link to comment
Share on other sites

  • 2 weeks later...

Maybe you should ask the person who helps you to switch your computer on ;-) And hey, does your keyboard have an F1 key?

But joking aside, before you start coding, don't you think you should learn how computers and networks are working, first? Eight days and no further answer, did you get it???

Try to use your browser and some kind of search engine, e.g. google or wikipedia to get some basics. I'm afraid your next question will be "how is a browser working" or "what is google".

The guys here did their best to help you, but every tecnical phrase they used in their explanation raised another question from your side.

I think that it is not fair to grab all the knowledge from those guys without cooperation from your side. We all have been newbies like you but most of us have spent hours, days or maybe weeks to solve a problem on our own before we asked for help in an act of utter desperation.

BTW, when I take a closer look at your code, is e.g. "winamp" in "Run("C:\AutoIT (Easy-installer)\exes\winamp")" pointing to your compiled executable (winamp.exe) or is "winamp" the folder where the exe is stored in? If the latter is right then I don't know how your script can work on a local computer.

It is never a good idea to work with static paths. Try to keep your paths dynamic by using macros like @ScriptDir or something. If you don't know what that means, type @ScriptDir within SciTE, move the curser into the word @ScriptDir and hit your F1 key. If you don't use SciTE right now, do it. And don't ask me what SciTE is, search for it!

Communication terminated!

Thanks for your advice...

I´m starting to learn and I already solved that problem, and know that I´m a completely noob to autoit and all these stuff and I needed an answer in no time.

Link to comment
Share on other sites

can anyone help me to run the application I´ve been talking about? I followed all advices you gave me but it hasn´t worked

I want my application to run over a local network so that I can acces from another computer to the folder where the application is and then run the application to start installing software.

any advice?

If you read my PM what I gave you does EXACTLY what you are asking for. All you need to do is read the instructions.

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