Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure Tsvc_dSMS.ServiceAfterInstall(Sender: TService);
const STR_REGKEY_SVC = '\SYSTEM\CurrentControlSet\Services\svc_dSMS';
var Reg : TRegistry;
ImagePath : string;
begin
// create needed registry entries after service installation
try
Reg:=TRegistry.Create;
Reg.RootKey:=HKEY_LOCAL_MACHINE;
// set service description
if Reg.OpenKey(STR_REGKEY_SVC,False) then
begin
ImagePath:=Reg.ReadString(STR_REGVAL_IMAGEPATH);
Reg.WriteString(STR_REGVAL_DESCRIPTION,STR_INFO_SVC_DESC);
Reg.CloseKey;
end;
// set message resource for eventlog
if Reg.OpenKey(STR_REGKEY_EVENTMSG,True) then
begin
Reg.WriteString(STR_REGVAL_EVENTMESSAGEFILE,ImagePath);
Reg.WriteInteger(STR_REGVAL_TYPESSUPPORTED,7);
Reg.CloseKey;
end;
// set installdir
if ImagePath <> '' then
if Reg.OpenKey(STR_REGKEY_FULL,True) then
begin
Reg.WriteString(STR_REGVAL_INSTALLDIR,ExtractFilePath(ImagePath));
Reg.CloseKey;
end;
FreeAndNil(Reg);
except
if Assigned(Reg) then FreeAndNil(Reg);
end;
end;