noiseman Posted October 21, 2008 Posted October 21, 2008 Dear All, I'm new to AutoIt and I've already looked for it in the internet, but I could not find anything. I have and application that must be executed under administrator credential. I know that it's possible, because I saw a guy doing it. I'd like to embed this .exe to a compiled script and run this embedded application using RunAs. So it's two questions. 1) How can I embed an .exe to a AutoIt script and create a final .exe (with the script and .exe inside) I need to add this .exe file to the scritp and them use the Aut2exe to create a final .exe file with the script and the .exe embedded. 2) How can I run this application using RunAs util. It must be added to the script. I just want to execute the compiled script and the application run without intervention. Regards,
Richard Robertson Posted October 21, 2008 Posted October 21, 2008 (edited) FileInstall("C:\path\program.exe", @TempDir & "\program.exe") RunAsWait(..., @TempDir & "\program.exe") FileDelete(@TempDir & "\program.exe") Just a quick example. @oMBra: #include is for script files, not executables. Edited October 21, 2008 by Richard Robertson
raz Posted February 17, 2009 Posted February 17, 2009 I am also new to auto it and have been looking for a way to do this. Would you be willing to share the entire code with me. raz noiseman said: Dear All,I'm new to AutoIt and I've already looked for it in the internet, but I could not find anything.I have and application that must be executed under administrator credential. I know that it's possible, because I saw a guy doing it. I'd like to embed this .exe to a compiled script and run this embedded application using RunAs. So it's two questions.1) How can I embed an .exe to a AutoIt script and create a final .exe (with the script and .exe inside) I need to add this .exe file to the scritp and them use the Aut2exe to create a final .exe file with the script and the .exe embedded.2) How can I run this application using RunAs util. It must be added to the script. I just want to execute the compiled script and the application run without intervention.Regards,
Inverted Posted February 17, 2009 Posted February 17, 2009 Look at the FileInstall function and Richard's example in the post above yours, couldn't be easier. The file will be included/embedded in your compiled script.
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