Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 尝试从.nsi脚本读取.ini文件时出错_Reporting Services_Installation_Nsis_Ini - Fatal编程技术网

Reporting services 尝试从.nsi脚本读取.ini文件时出错

Reporting services 尝试从.nsi脚本读取.ini文件时出错,reporting-services,installation,nsis,ini,Reporting Services,Installation,Nsis,Ini,我必须为在服务器上部署报告编写NSIS脚本。当我使用localhost时,它工作正常 现在我想把这个包发送给我的客户机,但问题是我不知道客户机的服务器IP,为此我写了.ini文件。ini文件的内容是 DeployReport.ini DeployReport.nsi 问题是DeployReport.nsi脚本工作正常,直到我不使用GetIP 0部分,并且我无法在脚本中找到错误。您应该使用.ini(“$exedir\DeployReport.ini”)的完整路径。很难从您的描述中理解问题是什么。您

我必须为在服务器上部署报告编写NSIS脚本。当我使用localhost时,它工作正常

现在我想把这个包发送给我的客户机,但问题是我不知道客户机的服务器IP,为此我写了.ini文件。ini文件的内容是

DeployReport.ini

DeployReport.nsi


问题是DeployReport.nsi脚本工作正常,直到我不使用GetIP 0部分,并且我无法在脚本中找到错误。

您应该使用.ini(
“$exedir\DeployReport.ini”
)的完整路径。

很难从您的描述中理解问题是什么。您是否遇到编译器错误?您的.ini文件具体位于哪里?如果在目标计算机上,则应使用目标路径:$INSTDIR\DeployReport.ini作为函数ReadINIStrNo,.ini文件是当前工作目录。。
[SETTINGS]
ServerIp=localhost
UserName=
PassWord= 
# Script generated by DeepSofts - NSIS Script Generator
# Beginning Basic Section Script ...

Name 'DeployReport'
Icon 'modern-install-full.ico'
OutFile 'DeployReport.exe'
SilentInstall Normal
CRCCheck On

Section GetIP 0
ReadINIStr $ip "DeployReport.ini" "SETTINGS" "ServerIp"
MessageBox MB_OK "$ip"
SectionEnd    

Section Command 1
Exec '"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\rs.exe" -i PublishSampleReports.rss -s http://localhost/reportserver"'
SectionEnd


ComponentText 'A few details about the application that you have created'

AutoCloseWindow True

SetCompress Auto
SetDateSave On
SetDataBlockOptimize On