Code: Select all
"[RESULT_PROPERTY_SQLCMD_SEARCH]" -E -S "[SERVER_PROP]" -o "[TempFolder]sqllog.txt" -i "[AI_RESTORECRMGRSCRIPTED]" -v CRMGR_BACKUP="[AI_CRM.BAK]" PROG_FILES="[ProgramFilesFolder]"Code: Select all
RESTORE DATABASE [CRMgr] FROM DISK = N'$(CRMGR_BACKUP)' WITH FILE = 1, MOVE N'RS3' TO N'$(PROG_FILES)\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\CRMgr.mdf', MOVE N'RS3_log' TO N'$(PROG_FILES)\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\CRMgr_1.ldf', NOUNLOAD, STATS = 10
GO
Code: Select all
sqlcmd -E -S %COMPUTERNAME%\SQLExpress -o C:\temp\sqllog.txt -i C:\Temp\RestoreCRMgrScripted.sql -v CRMGR_BACKUP="C:\Temp\CRMgr.bak" PROG_FILES="C:\Program Files"Code: Select all
"Demo Setup Project.exe" /L*V installation.logMSI (c) (8C:80) [16:07:34:479]: PROPERTY CHANGE: Adding RESULT_PROPERTY_SQLCMD_SEARCH property. Its value is 'C:\Program Files\Microsoft SQL Server\100\Tools\Binn\sqlcmd.exe'.
MSI (c) (8C:80) [16:07:34:479]: PROPERTY CHANGE: Adding SERVER_PROP property. Its value is 'TEST-W2008SP2-3\SQLEXPRESS'.
MSI (c) (8C:80) [16:07:34:479]: PROPERTY CHANGE: Adding AI_RESTORECRMGRSCRIPTED property. Its value is 'C:\Users\mday\AppData\Local\Temp\RestoreCRMgrScripted.sql'.
MSI (c) (8C:80) [16:07:34:479]: PROPERTY CHANGE: Adding AI_CRM.BAK property. Its value is 'C:\Users\mday\AppData\Local\Temp\CRM.bak'.
I noticed that the TempFolder property is conspicuously missing from that section and isn't listed until much further down the log, so I tried the same command without the -o "[TempFolder]sqllog.txt" and it still didn't work.
The remaining properties on the Custom Action Properties page are as follows:
Execution Properties: Synchronous execution, ignore return code
Execution Options: Immediate execution
Scheduling options: Always execute
Execution stage condition: Install
We're running AI 9.6.1 on Windows 7.
Thanks in advance.
FOLLOW US
Get the latest news in Application Packaging