Jump to content

@ProgramFilesDir ?


Recommended Posts

  • Moderators

Run(@ProgramFilesDir & "\Mortgages\Conventional Loans\MortgageLite+.exe" & " " & GUICtrlRead($list))

Is there a reason why this wouldn't work on computer other than the one it was designed on?

One of my Loan Officers put it on their home computer with all the neccessarry files and it doesn't work on his puter. It's the same OS

But works on both of mine. :)

Funny thing is, i know it's reading the @ProgramFilesDir because it opened the program from that directory. Just not calling the Run on the other functions.

This is the first time I've used the @ProgramFilesDir or @SystemDir, but I decided to put it on all the office puters, and some of thier "C:" drives are "F:" and "E:".

Thanks

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

  • Moderators

would the fact that I compressed highest, and or zipped it do something?

I've installed after zip and no it doesn't work for me?

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

Installers give the option for choosing where to install. This program is probably installed somewhere else, rather then in program files directory.

Another option, is to read the installation directory from the registry?

:)

Link to comment
Share on other sites

  • Moderators

:) Could it be in the #include <GUIConstants.au3> ? I can't remember where or why, but I thought I read somewhere if you are going to use it on another Computer or mass produce it.

That you had to have #include "GUIConstants.au3"?? Am I losing my mind?

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

Since it sounds like the file existing isnt your problem you could try:

Run(@ProgramFilesDir & "\Mortgages\Conventional Loans\MortgageLite+.exe" & " " & Chr(34) & GUICtrlRead($list) & Chr(34))

to put quotes around the command line argument

This *could* be the problem if at home the $list has spaces in it, where at work it does not.

Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Link to comment
Share on other sites

I keep rereading your post, and there's missing info that could shed light on your problem.

1) Is the application installed in the location you think it is? i.e. does FileExists(@ProgramFilesDir & "\Mortgages\Conventional Loans\MortgageLite+.exe") return 1?

2) Is your Compiled Script and the MortgageLite+.exe in the same directory, @ScriptDir might be a better choice then

3) is $list files/directories, things that may have spaces?

4) Does the registry hold the install dir of the MortgageLite+ program? RegRead() would be a good option

5) Doesnt Work is too vague, what exactly happens, program runs but not right, Autoit Error message pops up...

Edited by Ejoc
Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Link to comment
Share on other sites

  • Moderators

Sorry, I got on a roll, and didn't come back:

Ejoc: Yes, all applications were in the same folder; therefore answer to 2. is yes also. 3. Yes, they had spaces (i fixed that). 4. Didn't bother to install in registry, wasn't intending on massing it out. 5. Program was installed from .zip, it had to be put in the right directory, because the "Registration program" i made came up, and it's called from the same directory.

Larry: I didn't do that: and I knew I had seen something like that b4. I bought an installer (cuz I don't have time to learn NSIS), let it set up the package, then zipped it, and it worked on my puter. I guess it lost integrity somwhere when I originally zipped it.

Anyway, my LO (loan officer), will install tonight and let me know w/ a phone call. If not, I will try your idea Larry.

Thanks to you both!!

Edited by ronsrules

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

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