Question Modifier les propriétés d'un éxécutable

Plus d'informations
il y a 15 ans 9 mois #7023 par SiSMik
Bonjour tout le monde !
Vous allez peut être pouvoir me renseigner:
Je cherche un moyen de modifier par script les modes de compatibilité et niveau de privilège d'un exécutable.

Pour le moment, je n'ai rien trouver de bien concluant, peut être avez vous déjà rencontrer ce problème.

Merci d'avance ;)

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 15 ans 9 mois #7024 par Arthur
Je n'ai pas trop le temps de t'aider(Beaucoup boulot :laugh:) mais voilà une piste :

[code:1]PS D:\ahemon\Téléchargements> $prop1 = Get-Item .\LdapAdmin.exe
PS D:\ahemon\Téléchargements> $prop1.GetAccessControl() | gm


TypeName: System.Security.AccessControl.FileSecurity

Name MemberType Definition
----

Access CodeProperty System.Security.AccessControl.AuthorizationRuleCollection Access{get=...
Group CodeProperty System.String Group{get=GetGroup;}
Owner CodeProperty System.String Owner{get=GetOwner;}
Path CodeProperty System.String Path{get=GetPath;}
Sddl CodeProperty System.String Sddl{get=GetSddl;}
AccessRuleFactory Method System.Security.AccessControl.AccessRule AccessRuleFactory(System.Sec...
AddAccessRule Method System.Void AddAccessRule(System.Security.AccessControl.FileSystemAcc...
AddAuditRule Method System.Void AddAuditRule(System.Security.AccessControl.FileSystemAudi...
AuditRuleFactory Method System.Security.AccessControl.AuditRule AuditRuleFactory(System.Secur...
Equals Method bool Equals(System.Object obj)
GetAccessRules Method System.Security.AccessControl.AuthorizationRuleCollection GetAccessRu...
GetAuditRules Method System.Security.AccessControl.AuthorizationRuleCollection GetAuditRul...
GetGroup Method System.Security.Principal.IdentityReference GetGroup(type targetType)
GetHashCode Method int GetHashCode()
GetOwner Method System.Security.Principal.IdentityReference GetOwner(type targetType)
GetSecurityDescriptorBinaryForm Method byte[] GetSecurityDescriptorBinaryForm()
GetSecurityDescriptorSddlForm Method string GetSecurityDescriptorSddlForm(System.Security.AccessControl.Ac...
GetType Method type GetType()
ModifyAccessRule Method bool ModifyAccessRule(System.Security.AccessControl.AccessControlModi...
ModifyAuditRule Method bool ModifyAuditRule(System.Security.AccessControl.AccessControlModif...
PurgeAccessRules Method System.Void PurgeAccessRules(System.Security.Principal.IdentityRefere...
PurgeAuditRules Method System.Void PurgeAuditRules(System.Security.Principal.IdentityReferen...
RemoveAccessRule Method bool RemoveAccessRule(System.Security.AccessControl.FileSystemAccessR...
RemoveAccessRuleAll Method System.Void RemoveAccessRuleAll(System.Security.AccessControl.FileSys...
RemoveAccessRuleSpecific Method System.Void RemoveAccessRuleSpecific(System.Security.AccessControl.Fi...
RemoveAuditRule Method bool RemoveAuditRule(System.Security.AccessControl.FileSystemAuditRul...
RemoveAuditRuleAll Method System.Void RemoveAuditRuleAll(System.Security.AccessControl.FileSyst...
RemoveAuditRuleSpecific Method System.Void RemoveAuditRuleSpecific(System.Security.AccessControl.Fil...
ResetAccessRule Method System.Void ResetAccessRule(System.Security.AccessControl.FileSystemA...
SetAccessRule Method System.Void SetAccessRule(System.Security.AccessControl.FileSystemAcc...
SetAccessRuleProtection Method System.Void SetAccessRuleProtection(bool isProtected, bool preserveIn...
SetAuditRule Method System.Void SetAuditRule(System.Security.AccessControl.FileSystemAudi...
SetAuditRuleProtection Method System.Void SetAuditRuleProtection(bool isProtected, bool preserveInh...
SetGroup Method System.Void SetGroup(System.Security.Principal.IdentityReference iden...
SetOwner Method System.Void SetOwner(System.Security.Principal.IdentityReference iden...
SetSecurityDescriptorBinaryForm Method System.Void SetSecurityDescriptorBinaryForm(byte[] binaryForm), Syste...
SetSecurityDescriptorSddlForm Method System.Void SetSecurityDescriptorSddlForm(string sddlForm), System.Vo...
ToString Method string ToString()
AccessRightType Property System.Type AccessRightType {get;}
AccessRuleType Property System.Type AccessRuleType {get;}
AreAccessRulesCanonical Property System.Boolean AreAccessRulesCanonical {get;}
AreAccessRulesProtected Property System.Boolean AreAccessRulesProtected {get;}
AreAuditRulesCanonical Property System.Boolean AreAuditRulesCanonical {get;}
AreAuditRulesProtected Property System.Boolean AreAuditRulesProtected {get;}
AuditRuleType Property System.Type AuditRuleType {get;}
MSDN ScriptMethod System.Object MSDN();
AccessToString ScriptProperty System.Object AccessToString {get=$toString = \"\";...
AuditToString ScriptProperty System.Object AuditToString {get=$toString = \"\";...
[/code:1]

Regarde à AddAccessRule

Sinon ils en parlent ici : powershell-scripting.com/index.php?optio...iew=flat&catid=5

)<br><br>Message édité par: bilbao, à: 1/06/10 17:03

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 15 ans 9 mois #7032 par SiSMik
pÔ con le getaccesscontrol, j'étais rester sur itemproprety qui ne servait à rien du tout dans ce cas ^^

Je vais regarder ça de plus prêt ;)

Merci bilbao

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.042 secondes
Propulsé par Kunena