在程序里用winexec调用了一个.exe文件,执行完生成.exe文件之后,一运行发现其所在位置的所用文件均被删除了,只剩下文件夹了。

解决方案 »

  1.   

      begin
                    if MessageDlg('服务器上最新程序版本:'+serversion+',是否更新程序?'+#10+'更新程序前若需要保存数据,请点击NO,'+#10+'保存数据后关闭该系统再打开它'+#10+'如不需要保存数据直接点yes立即进行更新。',
        mtConfirmation, [mbYes, mbNo], 0) = mrYes then
                       begin
                          HWndEx := FindWindow(nil,nil);
                          While (HWndEx > 0 )do
                          begin
                            GetWindowText(HWndEx,str1,255);
                            HWndEx := GetNextWindow(hwndex,GW_HWNDNEXT);
                          end;                      ShellExecute(handle,'open', Pchar(g_path+'myftp.exe'), nil, nil, SW_SHOWNORMAL);
                       end
                     else
                       begin
                            ;
                       end; 
                end
                else
                   ///////////////////////////////////////////////////////////////////////////
                   begin               ShellExecute(handle,'open', Pchar('C:\\ORANT\\BIN\\F50RUN32.EXE '), Pchar('d:\\mxlist\\mx_list_start.fmx'), nil, SW_SHOWNORMAL);
                 
                   //////////////////////////////////////////////////////////////////////////
                   end;//end if StrToFloat(serversion) > StrToFloat(version) then