Q&A

  • alias 생성이 아니라 경로만 수정.....


안녕하세요...

말그대로 이미 알리아스는 생성되어있는데 알이아스 경로만 변경하고 싶습니다..

어떻게 하면 되죠...

고수님 브탁드림니다.....



2  COMMENTS
  • Profile
    최석기 2000.07.15 00:45
    장철진 wrote:

    >

    > 안녕하세요...

    > 말그대로 이미 알리아스는 생성되어있는데 알이아스 경로만 변경하고 싶습니다..

    > 어떻게 하면 되죠...

    > 고수님 브탁드림니다.....

    >



    고수는 아닌데요.



    델파이 헬프보니까 원하시는 기능이 샘플로 있네요..



    헬프를 잘 찾아보는것도 내공 증진에 도움이 되겠죠 ^^



    헬프에 예제를 그대로 올립니다.



    procedure TForm1.ChangeAlias;



    var

    AParams: TStringList;

    Dir: string;

    begin

    if not Session.IsAlias('MyAlias') then

    begin

    ShowMessage('Alias MyAlias does not exist');

    Exit;

    end;

    AParams := TStringList.Create;

    try

    // get the current PATH parameter

    Session.GetAliasParams('MyAlias',AParams);

    Dir := Copy(AParams.Strings[0],6,255);

    // get the new PATH parameter

    if InputQuery('MyAlias Alias Path','Path:' ,Dir) then



    begin

    // Update the alias parameters

    AParams.Clear;

    AParams.Add('PATH=' + Dir);

    Session.ModifyAlias('MyAlias',AParams);

    Session.SaveConfigFile;

    end;

    finally

    AParams.Free;

    end;

    end;

  • Profile
    장철진 2000.07.15 02:53
    최석기님 감사합니다 한방에 성공 했습니다.....

    헬프를 찾아봤는데 까막눈이라서 찾질 못했는가봐요...

    정말 감사합니다.