Custom Action to fail for SYSTEM Account
I have a custom action that must not be running for the SYSTEM Account.(while deploying thruogh AD).
I tried reading the current UserName with a VBScript(by reading the Environmental Variable - USERNAME) and associating to property used in the CA.
But this doesn't help as the value gets resolved to (%USERNAME%). On manual Install it works fine.
Is there any in-built property that i can use for the custom action or is there any other way by which i can suppress this CA for the SYSTEM Account ???
I tried reading the current UserName with a VBScript(by reading the Environmental Variable - USERNAME) and associating to property used in the CA.
set wshell = createobject("wscript.shell")
strUserName = wshell.ExpandEnvironmentStrings("%USERNAME%")
But this doesn't help as the value gets resolved to (%USERNAME%). On manual Install it works fine.
Is there any in-built property that i can use for the custom action or is there any other way by which i can suppress this CA for the SYSTEM Account ???
0 Comments
[ + ] Show comments
Answers (7)
Please log in to answer
Posted by:
cygan
15 years ago
Posted by:
Inabus
15 years ago
Posted by:
rayz_0020
15 years ago
Posted by:
anonymous_9363
15 years ago
Posted by:
rayz_0020
15 years ago
check for the built-in property 'IsAdmin' or 'Privileged'
If i am right, this property checks if the current user has the elevated/admin privileges or not...
But my requirement is that i need to know the currently logged-in User's name. And if it is "SYSTEM"(Only for this specific account), i should disable a CA and if not(be it Admins or Standard users), the CA should run. Anything more that i can look-out for ??
PS: Assuming the AD install runs in "SYSTEM" account.....
Posted by:
jcarri06
15 years ago
Posted by:
jmcfadyen
15 years ago
i think the last option is your way forward, the priviledged / admin user properties are not likely to be of any use as your issues seems to stem from running on an account without a profile loaded.
u could also reference the UserSid property which is available during deferred.
if NOT UserSID = "s-5-1-8"
u could also reference the UserSid property which is available during deferred.
if NOT UserSID = "s-5-1-8"
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.