Ver Mensaje Individual
  #10  
Antiguo 13-12-2006
kalisto kalisto is offline
Miembro
 
Registrado: jul 2004
Posts: 62
Reputación: 20
kalisto Va por buen camino
otra forma de hacer lo mismo

Manipulando el registro de windows:

Código Delphi [-]

Procedure WriteRegData(RootKey: HKEY; Key,Name:String; Value: variant);
var
  Reg : TRegistry;
begin
  Reg := TRegistry.Create;
  try
    Reg.RootKey := RootKey;
    if Reg.OpenKey(Key, True) then
        Reg.WriteString(Name, Value );
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;
 
 
 
 
 
 

 
WriteRegData (HKEY_LOCAL_MACHINE ,'\SYSTEM\CurrentControlSet\Services
\SharedAccess\Parameters\FirewallPolicy\StandardProfile\
AuthorizedApplications\List',
MiDirectorio+'\Miprograma.exe',
MiDirectorio+'\Miprograma.exe:*:Enabled:Entorno UPnp');
Responder Con Cita