- Код: Выделить всё
Set Reg = CreateObject("WScript.Shell")
Reg.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\MyPrg", Path
почему?
Set Reg = CreateObject("WScript.Shell")
Reg.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\MyPrg", Path
MSDN писал(а):When you call the RegOpenKeyEx function, the system checks the requested access rights against the key's security descriptor. If the user does not have the correct access to the registry key, the open operation fails. If an administrator needs access to the key, the solution is to enable the SE_TAKE_OWNERSHIP_NAME privilege and open the registry key with WRITE_OWNER access.
Source писал(а):В проге для автозагрузки прописано:при смене учётной записи пользователя вылетает ошибка - Неверный корень "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\MyPrg"
- Код: Выделить всё
Set Reg = CreateObject("WScript.Shell")
Reg.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\MyPrg", Path
почему?
Private Sub Form_Load()
Set Reg = CreateObject("WScript.Shell")
Reg.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\proga", "C:\Program Files\Myprogs\myprog.exe"
End Sub
Сейчас этот форум просматривают: SemrushBot и гости: 64