Fran 0 Posted February 21, 2011 (edited) Hi there,I have a script that needs to compile another script... I've done this before without any problems. But this time, even though it compiles it, when I run the final exe it gives me the error "Error in Expression". When I compile the script normally (from within Scite) it works fine.The code I use to compile my script.$installappDir = @WorkingDir & '\RapidStudio Install Downloader' $Source_File = $installappDir & "\InstallDownloader.au3" $Target_File = @ScriptDir & "\_tmp\" & "InstallDownloader_" & $labcode[$i] & ".exe" $Icon_File = @WorkingDir & "\_resources\images\App_installer.ico" $command1 = '"' & @WorkingDir & '\_resources\Aut2Exe\Aut2exe.exe"' & " /in " & '"' & $Source_File & '"' & " /out " & '"' & $Target_File & '"' & " /icon " & '"' & $Icon_File & '"' RunWait(@ComSpec & " /c " & '"' & $command1 & '"') Edited February 21, 2011 by Fran Share this post Link to post Share on other sites
hannes08 39 Posted February 21, 2011 Hi Fran,Maybe you want to the RunWait() to:RunWait(@ComSpec & " /c " & "'" & $command1 & "'")If I run your original code with a ConsoleWrite instead of RunWait it gives me sth like:C:\WINDOWS\system32\cmd.exe /c ""C:\Programme\AutoIt3\Example...Regards,Hannes Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Share this post Link to post Share on other sites
Fran 0 Posted February 21, 2011 Nope... if I change that it doesn't create the exe at all. Share this post Link to post Share on other sites
Fran 0 Posted February 21, 2011 again... it's monday! The problem was with one of the variables I was updating in the script before compiling it. Case closed, problem solved. F Share this post Link to post Share on other sites