Sheritlw
03-17-2007, 02:51 AM
I have spent the last two days trying to figure out what I am doing wrong. I have search through help,knowledgebase... everything.
What I am trying to do is create a conditional setup that is dependent on what package(s) are selected.
I have created the packages, but have been trying to figure out how to detect (I've looked at the On Ctrl.. no real help there) whether a package is selected.
If a particular package is selected (sql express) then I need to see if SQL EXpress is installed. If it is, then I need to run my database creation tool (and exe). If it's not then I need to first install sql express then install the database.exe.
So what I've tried thus far (I have erased many other attempts)
sdbInstall = SetupData.GetPackageProperties("Database");
bdbInstall = Database.Install;
bKeyExists = false
if bdbInstall then
bKeyExists = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Microsoft SQL Server\\SQLEXPRESS");
If bKeyExists then
InstallDB = File.Install(SessionVar.Expand("%AppFolder%\\DB\\ScheduleEZDB.exe"), "_TempFolder", FILE_INSTALL_SAMEOLDER, false, false, nil, nil);
result = File.Run(_TempFolder.."\\ScheduleEZDB.exe", "", "", SW_SHOWNORMAL, true);
else-- I need to run sqlexpress and then run db
end
end
Screen.Next();
I always get an error on this line that it is expecting =
If bKeyExists then
Really frustrated, your help is greatly appreciated.
btw.. there is no space in ScheduleEZDB.exe (the message isn't displaying exactly as it is written)
Thanks
Sheri
What I am trying to do is create a conditional setup that is dependent on what package(s) are selected.
I have created the packages, but have been trying to figure out how to detect (I've looked at the On Ctrl.. no real help there) whether a package is selected.
If a particular package is selected (sql express) then I need to see if SQL EXpress is installed. If it is, then I need to run my database creation tool (and exe). If it's not then I need to first install sql express then install the database.exe.
So what I've tried thus far (I have erased many other attempts)
sdbInstall = SetupData.GetPackageProperties("Database");
bdbInstall = Database.Install;
bKeyExists = false
if bdbInstall then
bKeyExists = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Microsoft SQL Server\\SQLEXPRESS");
If bKeyExists then
InstallDB = File.Install(SessionVar.Expand("%AppFolder%\\DB\\ScheduleEZDB.exe"), "_TempFolder", FILE_INSTALL_SAMEOLDER, false, false, nil, nil);
result = File.Run(_TempFolder.."\\ScheduleEZDB.exe", "", "", SW_SHOWNORMAL, true);
else-- I need to run sqlexpress and then run db
end
end
Screen.Next();
I always get an error on this line that it is expecting =
If bKeyExists then
Really frustrated, your help is greatly appreciated.
btw.. there is no space in ScheduleEZDB.exe (the message isn't displaying exactly as it is written)
Thanks
Sheri