Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Custom Action Batch File Execution Error


1 reply to this topic

gesh_007

gesh_007
  • Full Members
  • 4 posts

Posted 29 October 2008 - 14:23

Hi Techie,

We are installing SQL Express and same Execute the SQL scripts
that scripts all are available in one folder that bunch of file we are executing
in Batch file.

This scenario we are trying out but that batch file is not executed.

What is the steps where to i used kindly help me roll out this issue.

my bat file code

sqlcmd -S (local) -i CreateDB.sql

In CreateDB.sql having the following line

SET NOCOUNT ON
GO
use master

PRINT 'CREATING DB'
IF EXISTS (SELECT 1 FROM SYS.DATABASES WHERE NAME = 'MyDB')
DROP DATABASE MyDB
GO
CREATE DATABASE MyDB
GO

ohmy.gifn Error exit

-- Create Database objects
:r CrTable.sql
:r CrSP.sql

PRINT 'Process Completed'
GO



Thanks with Regards
Gesh


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 31 October 2008 - 18:00

If you really need to use .bat: Start with a simple batch file (like some echo and pause commands) to see if that batch file is launched at all.