Hi
I built a setup wizard using delphi 5. This setup wizard prompts some informations before launching MSDE 2000 (SP3a) installation.
Before launching the MSDE setup.exe, I must use DMO the list servers, just to make sure that there is no other servers on the network (i'm looking for a specific instance name) so my clients does not install two servers by mitake (you know how users can be...)
The problem : since I "used" DMO, my setup app is flagged as "using" DMO and now MSDE setup tells me I must close my setup wizard before continuing. But I can't ! My setup wizard HAS to wait for the MSDE installation to finish, so I can "guide" the users once the installation is over.
The question : How can I "detach" from DMO ? The most obivous answer would be to free the DMO com objects I used, but it doesn't work (see my code below). Another answer would be to isolate the DMO call in another application, and call that app in my setup wizard, so that this app is terminated when the MSDE setup starts, but I'll keep that as a very last ressort.
Here's my code, please, tell me what I could add so that my setup wizard stops "using" DMO and MSDE can install witout complaining.
Thanks !
procedure PopulateServerList;
var
app: _Application;
nl: NameList;
i: integer;
begin
//Clear list
ServerList.Clear;
//Create COM Objects
app := CoApplication.Create;
try
nl := app.ListAvailableSQLServers;
try
//Cycle trough items
for i := 1 to nl.Count do
ServerList.Add(nl.Item(i));
finally
nl := nil;
end;
finally
app := nil;
end;
end;
I built a setup wizard using delphi 5. This setup wizard prompts some informations before launching MSDE 2000 (SP3a) installation.
Before launching the MSDE setup.exe, I must use DMO the list servers, just to make sure that there is no other servers on the network (i'm looking for a specific instance name) so my clients does not install two servers by mitake (you know how users can be...)
The problem : since I "used" DMO, my setup app is flagged as "using" DMO and now MSDE setup tells me I must close my setup wizard before continuing. But I can't ! My setup wizard HAS to wait for the MSDE installation to finish, so I can "guide" the users once the installation is over.
The question : How can I "detach" from DMO ? The most obivous answer would be to free the DMO com objects I used, but it doesn't work (see my code below). Another answer would be to isolate the DMO call in another application, and call that app in my setup wizard, so that this app is terminated when the MSDE setup starts, but I'll keep that as a very last ressort.
Here's my code, please, tell me what I could add so that my setup wizard stops "using" DMO and MSDE can install witout complaining.
Thanks !
procedure PopulateServerList;
var
app: _Application;
nl: NameList;
i: integer;
begin
//Clear list
ServerList.Clear;
//Create COM Objects
app := CoApplication.Create;
try
nl := app.ListAvailableSQLServers;
try
//Cycle trough items
for i := 1 to nl.Count do
ServerList.Add(nl.Item(i));
finally
nl := nil;
end;
finally
app := nil;
end;
end;