gregajesih
asked on
How to set a user permission within a DCOM Config trough a batch procedure
Hi,
In dcomcnfg\component services\computers\My Computer\dcom config\ propreties on one of the components
Security tab\costomize add user. Is there any way to add users and set permission using an automatic procedure or utility, on that component.
In dcomcnfg\component services\computers\My Computer\dcom config\ propreties on one of the components
Security tab\costomize add user. Is there any way to add users and set permission using an automatic procedure or utility, on that component.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The link from the topic that you found for me, has a script that works excactly as I want it to.
So, thank you very much dave
On Error Resume Next
'TRUE = 1
'FALSE = 0
DCP_ACL_LAUNCH = 1
DCP_ACL_ACCESS = 2
DCP_E_NO_ACCESS = &H8004a001
DCP_E_NO_ACL = &H8004a002
DCP_E_INVALID_OBJECT = &H8004a003
DCP_E_INVALID_TYPE = &H8004a004
DCP_E_MUST_BE_ADMIN = &H8004a005
DCP_E_NO_MORE_ENTRIES = &H8004a006
DCP_E_INVALID_VERSION = &H8004a007
DCP_E_OBJ_IS_A_SERVICE = &H8004a008
DCP_E_UNSUPPORTED = &H8004a009
DCP_E_NO_VALUE = &H8004a00a
DCP_E_UNKNOWN_USER = &H8004a00b
DCP_E_NO_APPID = &H8004a00c
Dim GOSh
Dim dcomperm
Set GOSh = CreateObject("WScript.Shel l")
Set dcomperm = CreateObject ("DCOMPerm")
If Err Then
Err.Clear
GOSh.run "dcpinst.exe",0,True
Set dcomperm = CreateObject ("DCOMPerm")
If Err Then
WScript.Echo "Unable to install DCOM Permissions! They will have to be set via DCOMCNFG.",,"DCOM Permmissions"
WScript.Quit(1)
End If
End If
dcomperm.AddPrincipal "Appid:{0737E50A-4C76-4ff7 -BB21-A855 96F0D004}" ,DCP_ACL_A CCESS, "YOURDOMAIN\YourGroupORUse r", "1"
If Err Then
WScript.Echo "Unable to install DCOM Permissions! They will have to be set via DCOMCNFG.",,"DCOM Permmissions"
WScript.Quit(2)
End If
dcomperm.AddPrincipal "Appid:{0737E50A-4C76-4ff7 -BB21-A855 96F0D004}" ,DCP_ACL_L AUNCH, "YOURDOMAIN\YourGroupORUse r", "1"
If Err Then
WScript.Echo "Unable to install DCOM Permissions! They will have to be set via DCOMCNFG.",,"DCOM Permmissions"
WScript.Quit(2)
End If
So, thank you very much dave
On Error Resume Next
'TRUE = 1
'FALSE = 0
DCP_ACL_LAUNCH = 1
DCP_ACL_ACCESS = 2
DCP_E_NO_ACCESS = &H8004a001
DCP_E_NO_ACL = &H8004a002
DCP_E_INVALID_OBJECT = &H8004a003
DCP_E_INVALID_TYPE = &H8004a004
DCP_E_MUST_BE_ADMIN = &H8004a005
DCP_E_NO_MORE_ENTRIES = &H8004a006
DCP_E_INVALID_VERSION = &H8004a007
DCP_E_OBJ_IS_A_SERVICE = &H8004a008
DCP_E_UNSUPPORTED = &H8004a009
DCP_E_NO_VALUE = &H8004a00a
DCP_E_UNKNOWN_USER = &H8004a00b
DCP_E_NO_APPID = &H8004a00c
Dim GOSh
Dim dcomperm
Set GOSh = CreateObject("WScript.Shel
Set dcomperm = CreateObject ("DCOMPerm")
If Err Then
Err.Clear
GOSh.run "dcpinst.exe",0,True
Set dcomperm = CreateObject ("DCOMPerm")
If Err Then
WScript.Echo "Unable to install DCOM Permissions! They will have to be set via DCOMCNFG.",,"DCOM Permmissions"
WScript.Quit(1)
End If
End If
dcomperm.AddPrincipal "Appid:{0737E50A-4C76-4ff7
If Err Then
WScript.Echo "Unable to install DCOM Permissions! They will have to be set via DCOMCNFG.",,"DCOM Permmissions"
WScript.Quit(2)
End If
dcomperm.AddPrincipal "Appid:{0737E50A-4C76-4ff7
If Err Then
WScript.Echo "Unable to install DCOM Permissions! They will have to be set via DCOMCNFG.",,"DCOM Permmissions"
WScript.Quit(2)
End If
In HKEY_CLASSES_ROOT\AppID\{7