rlake5 Posted Tuesday at 04:56 PM Posted Tuesday at 04:56 PM I have a tiny script - 6 lines - that I have used before without issue. ; Script Start - Add your code below here Local $sUserName = "UserName" Local $sDomain = "" Local $sPassword = "Password" ; RunAsWait($sUserName, $sDomain, $sPassword, 0, 'msiexec /i "c:\InstallPathTo.msi"') My older scripts that have been compiled with older versions of AutoIT install and work without issue. Going into the .au3 file and changing it to get a new file to install with a new path, and when I compile it with the latest version, I immediately get notifications that my AV is scanning. It does compile, but the resultant .EXE won't work. I get a flash and then a message on the screen from Windows Installer saying that the package could not be opened. How do my old scripts and EXE files work fine, but this new/updated one will not? What can I do to this one to make it function properly? I'm actually trying to distribute a deployment app to 500~ish machines that are all islands - no domain, no centralized management - by having them download a package and then run this.
Andreik Posted Tuesday at 05:18 PM Posted Tuesday at 05:18 PM Have a look here and see if any method suggested there works for you.
rlake5 Posted Tuesday at 06:00 PM Author Posted Tuesday at 06:00 PM Thanks @Andreik - it's similar, but not the same. I can compile the app, it just won't run when I do. And turning off Defender on 500+ machines individually isn't going to be time-efficient... I could remote into them and install the app myself quicker than that. I just don't get it why the newer versions get tagged as a problem and the old ones are fine.
argumentum Posted Tuesday at 06:56 PM Posted Tuesday at 06:56 PM I strongly dislike the technic but try the au3Tocmd I put together, see if that does it for you. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
rlake5 Posted Wednesday at 01:13 PM Author Posted Wednesday at 01:13 PM Thanks @argumentum - I did see this on the page where Exit had his script posted. I was trying to follow the logic of yours, but I'm a little lost. Sorry for being a noob with this (it's not a place I work in often, I just write small BAT files for installs and things) but could you give me a quick "how-to" to convert or incorporate my script?
argumentum Posted Wednesday at 03:47 PM Posted Wednesday at 03:47 PM 2 hours ago, rlake5 said: Sorry for being a noob with this Oh, ..that's you and me too. I don't do batch files because I use AutoIt as a batch file ( of sorts ). The code is very friendly. The function "_extract_b64_batch_chunk()" will extract all these files that have the tag "::filename:". Adding one more file, is a matter of adding another: ... ; we do the same for the other file(s) FileWriteLine($sWorkingDir & "\" & $sBatchFileToMake, "::filename:" & $sMyScript & ".b64" & @CRLF) RunWait(@ComSpec & ' /c type "' & $sWorkingDir & '\' & $sMyScript & '.b64" >>"' & $sWorkingDir & '\' & $sBatchFileToMake & '"', $sWorkingDir, @SW_HIDE) FileWriteLine($sWorkingDir & "\" & $sBatchFileToMake, @CRLF) ; again, add a separator for, the heck of it ... that at the end of the b64 to binary rebuilding/extraction, will run the rest of the batch file: ... ; then we add the run/start command, in this case autoit3.exe MyScript.au3 FileWriteLine($sWorkingDir & "\" & $sBatchFileToMake, @CRLF & ':runThem' & @CRLF & _ 'start ' & $sAutoItExe & ' "' & $sMyScript & '"' & @CRLF) ... May look as bit hard to wrap your head around it, but is as simple and straight forward as it can be. Be patient with the code. What I posted here as an explanation is chunks from that same script. I don't like the hacky idea of this solution but you only have 500 installs to do and this should work. Not that it will without a doubt but, give it a try. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted Wednesday at 04:11 PM Posted Wednesday at 04:11 PM ...the batch file is just the basics, to extract the files within it and a "run" command at the end. The rest of the cleanup ( delete the temp *.b64 files, etc. ) will have to be coded in the running script. In the example the command starts with "start" to free the batch file and exit it ( the batch file ) but you can just execute and by the nature of it ( a batch file ) it will wait until the last command executed. Therefore, add the deletion of every file other than itself ( the batch file ) after the run command. I bet you know these things but I wanted to clear my head Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
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