Jump to content
Iznogoud

Script not working on other computers

Recommended Posts

Iznogoud

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
Radiance

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
rudi

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
rudi

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
Iznogoud

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
rudi

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

    • ammaul
      By ammaul
      Hi folks, I'm having problems with a screenshot capture script.
      Let me explain.
      Everyday I (and my colleagues at work) need to take some screenshots from a web-page. These screenshots are used to compile a report. Normally, I (and others) used to log in into the website and took screenshots of desired graphics and tables. This is tediuos and time consuming. To easy this task I made a script using autoit that basically logs into the website (user and password) and using some clicks, stroke send, coordinates, it is able to generate the graphics and save them to some folders into our network (this script saves arouund 50 pics. It works like a sharm.
      In order to make things easier, I tried to schedule this script (compiled to a Screnpics.exe file) using task scheduler from windows. We already use this (task scheduler) to run some vbs scripts, some vba excel scripts and so on. The computer used for this tasks is a windows 7 desktop computer. Due to security policies, the computer locks after some time. All this tasks run in the locked computer.
      My script screenpics.exe runs also from this locked computer. When the computer is unlocked, it does everything as expected. But, when it is locked, all the "pics" are BLACK. As I understand, it runs ok, but, as the "windows" are innactive, it prints what it "sees": a black rectangular.
      Some details: The web-page with hold the information I need, it only works in Firefox and, because of this it couldn`t be managed by vba or some "getobject" like commands. In fact, it has some flash things that make it impossible to control programatically. So my script is based on mouse move to coordinates, mouse click, screen capture and so one.
       
      So, I read many posts trying to figure out a way to overcome this, but... nothing came to mind. My first idea was try to unlock windows. Theses lead me to some posts with no solution. This is worse because I'm not a computer admin, so procedures that need to replace/change the register are not an option.
       
      If someone has any idea, I'll be gratefull.
    • therks
      By therks
      Has anybody else noticed that Windows 7 reacts ignorantly when you use the Windows key + arrow key shortcuts on a GUI with GUIEventMode set to 1? I discovered this recently when I was working on an app where I wanted complete control over the maximize/minimize buttons.
      Just give it a spin:
      #include <GUIConstants.au3> Opt('GUIEventOptions', 1) $hGUI = GUICreate('', 300, 200, Default, Default, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX)) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_MAXIMIZE ToolTip('Maximized') Case $GUI_EVENT_MINIMIZE ToolTip('Minimized') Case $GUI_EVENT_RESTORE ToolTip('Restored') Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Run that, then hit Win+Up or Win+Down. None of those events get triggered, and it still maximizes/minimizes. Although I can't get it to restore down from a maximize unless the window is also resizable ($WS_THICKFRAME in the style).
      Is there a way to stop Windows from doing what it wants or is the only option to check with WinGetState() and then change it back?
       
      Windows 10 seems to respect my settings, and I don't have any other versions to test on.
    • msd1994
      By msd1994
      I have a script that just adds some keyboard shortcuts for things like displaying the current song and artist, moving the window to the side so it won't pop up in my way, and play/pause, next song, previous song (these are the only 3 to still work since they don't need the window handle.)
      In some update recently, Spotify's window class swapped from "[CLASS:SpotifyMainWindow]" to "[CLASS:Chrome_WidgetWin_0]". Using the new class in my controls doesn't seem to work, I've tried getting the window handle from the process handle (_GetHwndFromPID($PID)) but that seems to fail as well.
      Does anybody have some idea of a way I could get this script working again?
       
      edit: seems like discord has the same window class name, so could be some issue with this? Still not sure of a way to solve the issue though, I added a function to get the handle of the active window and can just use that now, but it was able to find it on its own before on spotify startup or script startup which would be preferred.
       
      Thanks!
    • 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
×