2010-02-12 67 views

回答

4

這裏的對於.NET的例子:

Function GetDotnet ;// looks for local copy before downloading, returns path in $0 
    Pop $0 
    ${If} ${FileExists} "$InitDir\dotnetfx35.exe" 
     StrCpy $0 "$InitDir\dotnetfx35.exe" 
    ${ElseIf} ${FileExists} "$InitDir\dotnetfx35setup.exe" 
     StrCpy $0 "$InitDir\dotnetfx35setup.exe" 
    ${Else}   
     Call DownloadDotnet 
     StrCpy $0 $0 
    ${EndIf} 
    Push $0 
FunctionEnd 

Function DownloadDotnet ;// downloads .Net, returns download path in $0 
    NSISDL::download "${DotnetDownloadUrl}" "${TempDir}\dotnetfx35setup.exe" 
    Pop $0 
    ${If} $0 == "cancel" 
     Quit  
    ${EndIf} 
    StrCpy $0 "${TempDir}\dotnetfx35setup.exe" 
    Push $0 
FunctionEnd 

Function InstallDotnet ;// kicks off the .Net installer 
    Pop $0 
    Push $1 
    ExecWait '"$0" /norestart' $1  
FunctionEnd 
0
+0

我想下載安裝過程中的文件,不包括DirectX或在我的8MB安裝了.NET框架。 – Kevin 2010-02-12 21:19:44

+0

這裏引用的文件是** not **完整的安裝程序,它是** web **安裝程序。 – Dave 2010-02-12 21:22:02