Setup Factory 设置开机启动项

tech2025-06-07  7

--将打印功能在注册表修改为开机启动 isExist = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");

if (isExist) then Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "WorkerService.Printer", SessionVar.Expand("%AppFolder%\\Printer\\WorkerService.Printer.exe"), REG_SZ); else Registry.CreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"); Registry.SetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "WorkerService.Printer", SessionVar.Expand("%AppFolder%\\Printer\\WorkerService.Printer.exe"), REG_SZ); end --将打印功能在注册表修改为开机启动

最新回复(0)