/build/static/layout/Breadcrumb_cap_w.png

Need a script to run once when a particular user logs on?

Hi

Need to have a script run once when a certain user logs on not when anyone logs on, so for example

C3PO is the user
I need C:\Support\Utils\Setup-amended.exe to run when only C3PO logs on and only once

Would appreciate any advice on this

Thanks

0 Comments   [ + ] Show comments

Answers (2)

Posted by: anonymous_9363 12 years ago
Red Belt
0
I'd hive off this activity to a script which gets called by the log-in script.

Add a check in the script for the username (checking the %USERNAME% environment variable seems easiest), then check for the installed state of the program. How you do that depends on whether or not it records its state in the usual place, i.e. HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall[ProductCode or Product Name]. If not, you could check the existence of the EXE, a configuration file or registry entry.
Posted by: Arminius 12 years ago
Second Degree Green Belt
0
What are you looking to have the script do? Some folks like to use check files to see if a script has run; I prefer to set registry flags into HKLM\[company] as those are not only harder for the user to get rid of, they take up less space on the hard drive.

Also, is it an existing or new user on the computer? One PC or multiple? If you're looking at doing this for a container or enterprise, than your main login script with a check of the registry would be good, especially for new user profiles.
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