Lorenzen Posted August 26, 2014 Share Posted August 26, 2014 Hi Im getting an "Unable to open the script file" msg when I try to run my script on MS 2008 R2 server (64-bit). Because of this I have made a simple test script that just launches a MsgBox displaing a static text string. The script is 1 line: MsgBox(0, "ww", "123") I've tried to compile to both 32 and 64 bit, but with no luck. Strange thing is that I have actually gotten the script to run a few times (1/30), but it generally fails. There is no AV installed on the server. I cant see anything from the system logs. I have just installed the latest version of AutoIT. Googling the problem a bit, I can see that others have had the same problem, but usually due to some complicated coding. A simple MsgBox is ofc as simple as it gets. Do you guys have any clue as to what is going on? Thanks Christian Link to comment Share on other sites More sharing options...
Solution careca Posted August 26, 2014 Solution Share Posted August 26, 2014 That is a weird one, as i don't know how to solve it, i would try installing SciTe and compile with and without UPX Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Lorenzen Posted August 26, 2014 Author Share Posted August 26, 2014 I will give it a go. I was actually looking at this UPX option, but as I dont know what it is, I chose not to mess about with it. Thanks for the input - if anyone has anything to add it would be much appreciated! Link to comment Share on other sites More sharing options...
Lorenzen Posted August 26, 2014 Author Share Posted August 26, 2014 Careca, you are the man! Disabling UPX did the trick. Still not sure what UPX is - gonna have to do some reading up on this at some point. Thanks a bunch mate Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 26, 2014 Moderators Share Posted August 26, 2014 Lorenzen,upx is a file compressor whch makes the on-disk size of the exe as small as possible - and it is often flagged by AV packages as malware, so not using it is a good idea. Back in the old days when disk space was tight every byte counted, but now hard drives are sooo big it is not really worth the risk. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Lorenzen Posted August 26, 2014 Author Share Posted August 26, 2014 Ah, ok. Nice to know - thx for the info! Really appreciate your info/help guys Link to comment Share on other sites More sharing options...
Lorenzen Posted August 27, 2014 Author Share Posted August 27, 2014 Hmmm, I am still having problems :/ After removing UPX yesterday, my compiled script ran just fine, but now I am having problems again. The .exe I compiled yesterday is still able to run on the server with no problems, but if I compile the exact same script (the simple msgBox script) again, in the exact same way as yesterday, the resulting .exe file will not run! I've been working locally on my PC so I have only just realized that there are still problems running scripts on the server. I am now suspecting that the problem could be related to system privileges. Still it does not make sence why the .exe compiled yesterday can run with no problems :/ Any ideas? Link to comment Share on other sites More sharing options...
Lorenzen Posted August 27, 2014 Author Share Posted August 27, 2014 Closing this one again - I can run scripts compiled to x86 on the server. In the midst of confusion, I forgot to check if that could be the problem. Link to comment Share on other sites More sharing options...
Lorenzen Posted August 27, 2014 Author Share Posted August 27, 2014 For anyone experiencing the same problems as I did, let me just add that there was apparently something wrong with my compiler. I had problems again after the last post, and after some troubleshooting, I found that UPX was not being disabled on compilation, eventhough the box was unchecked. I noticed that the filesize of the compiled .exe was the same as the UPX-complied .exe - thats the only reason I was able to resolve the problem. After checking/unchecking the checkbox a few times, with compiles in between, the .exe file was finally compiled to a file-size that was about 10% larger than the UPX compiled .exe. The compiled .exe was able to run without any problems. So in short, AutoIt can apparently have problems registering whether or not UPX is enabled (is my guess at least). Link to comment Share on other sites More sharing options...
AdamUL Posted August 27, 2014 Share Posted August 27, 2014 Include one of the following at the top of all your script to disable UPX. #pragma compile(UPX, false) #AutoIt3Wrapper_UseUpx=n I have added it to my AutoIt script template, so when ever I create a script, it is there. Adam Link to comment Share on other sites More sharing options...
Lorenzen Posted August 28, 2014 Author Share Posted August 28, 2014 Thats a great suggestion - I will do the same. Thanks for sharing. Link to comment Share on other sites More sharing options...
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