Sheritlw
03-28-2007, 08:45 PM
I have created a setup that downloads, unpacks and installs sql server express from the command line in Setup Factory. That works great.
My problem is after I install sql server I need to run a custom console program using command lines and this does not work. The dos screen pops up but it doesn't do anything except close (it's suppose to create a user, database etc.).
I tried running the program through Windows command line and it works.
The code I use is below. I also tried running another console program from the File.run in sf7 and have the same problem.
result = File.Run(_TempFolder.."\\ScriptRunner.exe", "server:.\EZEXPRESS script:".._TempFolder.."\\create_user.sql", "", SW_SHOWNORMAL, true);
--create db
result = File.Run(_TempFolder.."\\ScriptRunner.exe", "server:.\EZEXPRESS uid:ezuser pwd:p@ssw0rd db:ScheduleEz script:".._TempFolder.."\\create_db.sql", "", SW_SHOWNORMAL, true);
--import data
result = File.Run(_TempFolder.."\\ScriptRunner.exe", "server:.\EZEXPRESS uid:ezuser pwd:p@ssw0rd db:ScheduleEz script:".._TempFolder.."\\new_data.sql", "", SW_SHOWNORMAL, true);
My problem is after I install sql server I need to run a custom console program using command lines and this does not work. The dos screen pops up but it doesn't do anything except close (it's suppose to create a user, database etc.).
I tried running the program through Windows command line and it works.
The code I use is below. I also tried running another console program from the File.run in sf7 and have the same problem.
result = File.Run(_TempFolder.."\\ScriptRunner.exe", "server:.\EZEXPRESS script:".._TempFolder.."\\create_user.sql", "", SW_SHOWNORMAL, true);
--create db
result = File.Run(_TempFolder.."\\ScriptRunner.exe", "server:.\EZEXPRESS uid:ezuser pwd:p@ssw0rd db:ScheduleEz script:".._TempFolder.."\\create_db.sql", "", SW_SHOWNORMAL, true);
--import data
result = File.Run(_TempFolder.."\\ScriptRunner.exe", "server:.\EZEXPRESS uid:ezuser pwd:p@ssw0rd db:ScheduleEz script:".._TempFolder.."\\new_data.sql", "", SW_SHOWNORMAL, true);