Iznogoud

Script not working on other computers

9 posts in this topic

Hello,

I have created a script on my own computer for uninstalling and installing a specific customer application. For some reason it works great on my own computer, but i doesn't run at all at the customer his or her computer.

I have a Windows 7 Professional - 64-bit machine and the first machine i have tested it at the customers location was a 32-bit machine, so ok, maybe that is the problem, but at an other computer with 64-bit it also doesn't work.

So i installed AutoIT with editior on both machines, but a simple RUN command doesn't work.

#RequireAdmin
Run("C:\TEMP\Setup2010\setup.exe")

With or without the RequireAdmin doesn't make a difference.

Could someone help me to understand why my script works great on my own computer, but when you move it to another computer it doesn't work? If you compile it or not.

Kind regards,

Remco

Share this post


Link to post
Share on other sites



If the script really runs with admin privileges, it's either the path is incorrect (check what FileExists() returns) or the program runs but immediately quits because of something else (check if Run() returns a Process ID).

Share this post


Link to post
Share on other sites

Hello.

 

What error message do you receive, or what happens, when you try to start your application?

 

A shot in the dark: Did you do the compilation of your AU3 script as 32bit or 64bit application? As your PC is x64 and the destination PC is 32bit you will have to compile it as a 32bit application

regards, Rudi.

 


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

Then use processmonitor.exe to check, what's failing.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

The problem was a Windows environment connect to a UNIX environment and appearantly it was some kind rights issue.

Nothing to do with the script. I copied the files to a local folder and it would work also.

But ControlClick and some other features where not working properly and i had to use the #AutoIt3Wrapper_UseX64=n switch on a 32-bit machine.

Do i really need to compile the script as a 32-bit AND a 64-bit version or can i just keep using a 32-bit compiled version for both systems?

Share this post


Link to post
Share on other sites

For almost 100% of all use, also on x64 machines you are fine using scripts, that are 32bit compiled.

 

Avoid using x64 compiled scripts, except you should really need to compile it as x64 executable.

 

If you need to have two versions of a script, 32bit and 64bit, then use a third script, distingish the @OSARCH, and depending on the result fileinstall() the appropriate compiled script (MyScript32.exe, MyScript64.exe), then run(), what's needed.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

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

  • Similar Content

    • steveeye
      By steveeye
      hey, can anybody enlighten on lesser known Windows hacks or uses ?
    • afallenhope
      By afallenhope
      Hello all! 
      I am having a bit of trouble and was wondering if anyone may have a workaround for my issue. I made a script that would automatically install a piece of software each night on a Windows 7 Box. Now I have been instructed to do the same with a Windows 10 box since the application is now being tested on Windows 10. 
      The way I did the win7 installation was that I made a script and then made an executable that I call with a batch file along with the Installer. So the process is 
      AutoitMainFile calls batch file, batch file opens Installer, and the automatedinstaller.exe  The automatedinstlaller waits 10-20 seconds to make sure the Installer has been fully loaded.
      When I try to do the same both get loaded but the automatedinstallation.exe does not send commands to the installer. The code does work and nothing from the program we are wanting to install has changed as our Windows 7 runs every night no problem. 
       
      Do I need to make a new automatedinstall script for windows 10? 
      Any advice is appreciated 
      Thanks,
      Richard
    • ur
      By ur
      I have enabled admin sharing in the remote machine so that I can copy files to the remote machine use PSEXEC to execute our application remotely.
        Now, if the machine is poweredoff we need to poweriton. So I checked whether the remote machine, it is of both VirtualBox or VMWare one. For VirtualBox or VMware, I have found command line utities to poweron.   But to autologon by skipping the login screen.Can anyone suggest how to do the same.If it is a physical machine, then there is no need to poweron but autologon is required.   I am trying for windows machines.Win 7 at present.   For VirtualBox I checked below link with help og guestadditions but not working. http://www.virtualbox.org/manual/ch09.html#autologon   The below procedure will save the password in that machine and it will logon automatically.   http://www.howtogeek.com/112919/how-to-make-your-windows-8-computer-logon-automatically/   But it will give access to everyne.But my opinion is he should access only if have credentias.I mean through any commandline from another machine he should trigger logon also by passing credentials.     Similarly this also   http://www.cnet.com/how-to/automatically-log-in-to-your-windows-10-pc/   http://superuser.com/questions/28647/how-do-i-enable-automatic-logon-in-windows-7-when-im-on-a-domain   http://pcsupport.about.com/od/windows7/ht/auto-logon-windows-7.htm   http://www.computerperformance.co.uk/windows7/windows7_auto_logon.htm   https://technet.microsoft.com/en-us/magazine/ee872306.aspx   Please guide me how to proceed.
    • AJB
      By AJB
      Hello,
      I've been using autoit for about a year now and overall it's been great despite my limited understanding of all of its features. I have several scripts that run on virtual machines that have been running smoothly for several months without any issues. Recently, I had to create new virtual machines and migrate my scripts over and now I am getting errors that I can't seem to repeat, but seem to happen at least once a day with all of my executables that were flawless before.
      The error that I keep getting is:
      Autoit Error
      Line [this number varies per script] (File "[path to my executable]"); Error: variable must be of type object.
      I  never received this error before until I moved everything to the new VMs, and when I rerun my scripts after clearing the error everything seems to work and run fine until hours later or sometimes the next day. I am assuming that that the root cause may be in some kind of settings on the VM itself since it is happening nearly across the board, but I have no idea where to even look. These are running on Windows 7, which is what they were running on before I had any errors.
      The only consistent include used in these scripts is  IE.au3
      Has anyone run into a similar problem or can maybe point me in the right direction. I am at the point of pulling hair out trying to resolve this. I have even rewritten and re-compiled the scripts to see if somehow the executables got corrupted, but that didn't help.
      Thank you.
    • tbohon
      By tbohon
      Loaded from latest releases of both AutoIt and SciTE and attempted to test by creating a simple SQLite script.  When trying to run the script I get an 'Error Opening File' error on line 45 of AutoIt3Wrapper.au3 which consists of the following code:
       
      #include <WinAPIFiles.au3>  
      Unable to find this file anywhere on my hard drive and unable to find any patch or similar error on the forum.
      Help?
       
      TIA ...   Tom