2010-08-16 19 views
18

के साथ सेटअप से पहले फ़ाइल को कैसे चलाएं सेटअप सेटअप शुरू होने से पहले, इनो सेटअप के साथ फ़ाइल चलाने के लिए संभव है? Documentationइनो सेटअप

उत्तर

21

हां यह है। [code] अनुभाग में फ़ाइल को InitializeSetup() फ़ंक्शन में चलाएं। यह उदाहरण सेटअप चलाने से पहले नोटपैड लॉन्च करता है।

function InitializeSetup(): boolean; 
var 
    ResultCode: integer; 
begin 

    // Launch Notepad and wait for it to terminate 
    if Exec(ExpandConstant('{win}\notepad.exe'), '', '', SW_SHOW, 
    ewWaitUntilTerminated, ResultCode) then 
    begin 
    // handle success if necessary; ResultCode contains the exit code 
    end 
    else begin 
    // handle failure if necessary; ResultCode contains the error code 
    end; 

    // Proceed Setup 
    Result := True; 

end; 
+0

यह वही है जो मुझे चाहिए! धन्यवाद। –

+13

यह प्रारंभिक सेटअप में नहीं किया जाना चाहिए यदि यह उपयोगकर्ता कंप्यूटर पर कुछ भी बदलता है। यह उपयोगकर्ता द्वारा "इंस्टॉल" दबाए जाने के बाद किया जाना चाहिए, यानी PrepareToInstall() या CurStepChanged (ssInstall) दबाएं। – Deanna

संबंधित मुद्दे