Jump to content

script to compile another script


 Share

Recommended Posts

To compile you'll have to Fileinstall() the compiler ;), but as a work-around look up "AutoIt specific command Line Switches" in the help-file on how to start uncompiled scripts from within a compiled one...

Link to comment
Share on other sites

Wow, that was quick! I don't think I explained my problem correctly.

What I am doing is making a script that will write another script and then compile it. It sounds like a strange way of going about it but the reason behind it is that one admin has a service account with exceptional rights and he wants a script that uses it and will have the password encoded and compiled into itself. That in itself would be simple but I do not want to ever see the password (no chance of misuse accusations) so I can write a script and give it to him to run. It asks him for the password, encrypts it, and adds it to the second script. What I want to do is compile the second script after I add the password line to it.

here's a snippet:

#Include <String.au3>

$passIn = InputBox("Password", "enter password:", "", "*")
$passEnc = _StringEncrypt(1,$passIn,"encrypt",1)
$File = FileOpen("test2.au3",1)
FileWriteLine($File,"$Password = " &  "_StringEncrypt(0,""" & $passEnc & """,""encrypt"",1)")
FileClose($File)
;here I want to compile $File
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...