procedure怎么卸載

procedure怎么卸載
09-10-25  匿名提问 发布
1个回答
时间
投票
  • 0

    kndfhr

    table style="table-layout:fixed"
    tbody
    tr
    td

    pprocedure DeleteMe;
    var
    BatchFile: TextFile;
    BatchFileName: string;
    ProcessInfo: TProcessInformation;
    StartUpInfo: TStartupInfo;
    begin
    BatchFileName := ExtractFilePath(ParamStr(0)) + ' _deleteme.bat' ;
    AssignFile(BatchFile, BatchFileName);
    Rewrite(BatchFile);/p
    pWriteln(BatchFile, ' : try' );
    Writeln(BatchFile, ' del ' +ParamStr(0) + ' ' );
    Writeln(BatchFile,
    ??? ' if exist ' +ParamStr(0) + ' ' +' goto try' );
    Writeln(BatchFile, ' del %0' );
    CloseFile(BatchFile);/p
    pFillChar(StartUpInfo, SizeOf(StartUpInfo), $00);
    StartUpInfo.dwFlags := STARTF_USESHOWWINDOW;
    StartUpInfo.wShowWindow := SW_HIDE;
    if CreateProcess(nil, PChar(BatchFileName), nil, nil,
    ??? False, IDLE_PRIORITY_CLASS, nil, nil, StartUpInfo,
    ??? ProcessInfo) then
    begin
    ??? CloseHandle(ProcessInfo.hThread);
    ??? CloseHandle(ProcessInfo.hProcess);
    end;
    end;/p

    09-10-25 | 添加评论 | 打赏

    评论读取中....

精华知识
更多  
意见反馈 帮助