【问题标题】:NSIS - Copy the installer itselfNSIS - 复制安装程序本身
【发布时间】:2011-10-20 01:12:40
【问题描述】:

我想将安装程序复制到安装位置。

我正在运行文件:Installer.exe 我希望它将自己复制到 $INSTDIR

我试过了:

CopyFiles "Installer.exe" "$INSTDIR\Installer.exe"

我在安装日志中看到“复制失败”。

试过开源,读源码,开dest,写dest:

  FileOpen $4 "Installer.exe" r
  FileRead $4 $1 80000
  FileClose $4

  FileOpen $4 "$INSTDIR\Installer.exe" w
  FileWrite $4 $1
  FileClose $4

它创建 $INSTDIR\Installer.exe 但在安装完成后,它得到了 0 个字节。

你还有其他方法吗?

谢谢!

【问题讨论】:

    标签: windows-installer nsis


    【解决方案1】:

    您应该使用完整路径,$ExePath 是安装程序本身的完整路径...

    CopyFiles "$ExePath" "$InstDir\"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-30
      • 1970-01-01
      • 2017-05-25
      • 1970-01-01
      • 2011-08-17
      • 1970-01-01
      相关资源
      最近更新 更多