scwoobles Posted July 19, 2016 Posted July 19, 2016 I have compliled my script and I try to execute the program but I get a message box with the title of Autoit Error, with the contents saying "Unable to open the script file". this appears to happen when i try to run the x86 version on a 64bit os which should work. I'm just not sure why. expandcollapse popup#RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\..\..\Downloads\Mysitemyway-Clean-3d-Glossy-3d-blue-hourglass.ico #AutoIt3Wrapper_Outfile=C:\work\Hospitallity\Script files\Oem\Company_Info_Install.exe #AutoIt3Wrapper_Outfile_x64=C:\work\Hospitallity\Script files\Oem\Company_Info_Installx64.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <FileConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Oem Config", 385, 119, 192, 124) $Group1 = GUICtrlCreateGroup("Model", 8, 8, 369, 73) $Input1 = GUICtrlCreateInput("Input1", 16, 48, 153, 21) $Input2 = GUICtrlCreateInput("Input2", 200, 48, 169, 21) $Label1 = GUICtrlCreateLabel("Model Number", 56, 24, 73, 17) $Label2 = GUICtrlCreateLabel("Serial Number", 248, 24, 70, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("OK", 312, 88, 65, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 FileInstall("C:\Users\Aaron.Kennedy\Documents\Logo.bmp","C:\Windows\System32\Logo.bmp") FileInstall("C:\work\Hospitallity\Script files\Oem\TBMOEM.reg",@TempDir &"\Tbmoem.reg") ShellExecute("TBMOEM.reg","",@TempDir) WinWaitActive("Registry Editor") Send("{enter}") sleep(100) WinWaitActive("Registry Editor") Send("{enter}") sleep(100) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation","Model","REG_SZ", ""& GUICtrlRead($Input1) & " S\N:" & GUICtrlRead($Input2)) MsgBox(64,"Oem Information","OEM Information has been installed!",0,0) Send("#{pause}") Exit EndSwitch WEnd
BrewManNH Posted July 19, 2016 Posted July 19, 2016 Show the contents of the output pane of SciTE when you compile it. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
scwoobles Posted July 19, 2016 Author Posted July 19, 2016 >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /prod /in "C:\Users\Aaron.Kennedy\AppData\Local\Temp\test.au3" +>09:13:33 Starting AutoIt3Wrapper v.16.306.1237.0 SciTE v.3.6.2.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 # detect ascii high characters and if none found set default encoding to UTF8 and do not add BOM +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\Aaron.Kennedy\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\Aaron.Kennedy\AppData\Local\AutoIt v3\SciTE -> 1 Change(s) made. >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\Aaron.Kennedy\AppData\Local\Temp\test.au3 +>09:13:39 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe /in "C:\Users\Aaron.Kennedy\AppData\Local\Temp\test.au3" /out "C:\Users\Aaron.Kennedy\AppData\Local\AutoIt v3\Aut2exe\~AU6F42.tmp.exe" /nopack /icon "..\..\..\Downloads\Mysitemyway-Clean-3d-Glossy-3d-blue-hourglass.ico" /comp 2 +>09:13:40 Aut2exe.exe ended.C:\Users\Aaron.Kennedy\AppData\Local\AutoIt v3\Aut2exe\~AU6F42.tmp.exe. rc:0 +>09:13:40 Created program:C:\work\Hospitallity\Script files\Oem\Company_Info_Install.exe +>09:13:41 AutoIt3Wrapper Finished. >Exit code: 0 Time: 9.005
Developers Jos Posted July 19, 2016 Developers Posted July 19, 2016 Probably an AV interfering in the compilation process. You could try the latest version of SciTE4Autoit3 of exclude the Temp directory used by AutoIt3. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now