/build/static/layout/Breadcrumb_cap_w.png

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.

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)

Posted by: cygan 15 years ago
Fifth Degree Brown Belt
0
hi rayz

just to give you a pointer here

you can run deffered custom actions in user or system content

user content - has the same permissions as the standard user

system content - has elevated privileges

what is your CA for
Posted by: Inabus 15 years ago
Second Degree Green Belt
0
Ill be nice and tell you a reg key which works to retrieve the currently logged in user when running under the system account ;)

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName

Enjoy.

P
Posted by: rayz_0020 15 years ago
Senior Purple Belt
0
This custom action checks for a registry in HKCU and aborts installation if not available.(The reason why i don't want it to run for "SYSTEM" account.)

This CA runs at the start of the installation (Immediately after Appsearch). So i don't have an option of using Deferred action.

Thanks,
Rajesh.
Posted by: anonymous_9363 15 years ago
Red Belt
0
Keep it simple and check for the built-in property 'IsAdmin' or 'Privileged'. One supercedes the other: I can't recall which but I think 'Privileged' is the one to use.
Posted by: rayz_0020 15 years ago
Senior Purple Belt
0
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
Senior Purple Belt
0
Ray,

Add the following condition to your CA: If NOT %USERNAME = ""

The USERNAME environment variable is nonexistant/blank when the system account is "logged on" so you can use that as your determining factor. Try it out and see if it does what you need it to do.

Jay
Posted by: jmcfadyen 15 years ago
5th Degree Black Belt
0
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"
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ