Mac OS X: User prompt for program installation after system deployment
In an enterprise environment, after the system is re-installed in a variety of ways-generally reimaging-the administrator must perform system configuration and software installation, which is not only required to install the system, it is also required for rapid enterprise deployment.
Generally, the operating system needs to be re-installed for new or damaged computers. The system deployment personnel should do the initial work of the deployment (START, select the deployment process, and enter necessary computer information such as computername) then, you can ignore it. After the deployment system writes the image to the target Mac machine, it restarts and the computer displays a normal picture, at the same time, let the computer execute subsequent installation and configuration work in the background. After these are completed, the user can use them normally. Let's talk a little more about it. In Windows, most programs can be installed without a user environment, but not all of them are. The problem is that, during the installation process, You need to log on to an administrator to complete the installation and configuration of the program. However, the MAC system does not have such a program, or you can re-package the program, it is easy to install in a non-user environment. For repackaging, it seems that only Adobe CS software is the most troublesome currently.
However, if the user does not know whether to use the machine after the subsequent work is completed, the subsequent configuration may fail. Therefore, there are measures to prohibit or remind the user to wait until the system configuration is completed successfully. This problem should be considered here.
I:
One method is to prohibit normal users from logging on. Generally, you can disable login window startup to achieve the goal.
First, run the following command to enable the verbos mode of the system:
Sudo/usr/sbin/NVRAM boot-ARGs = "-V"
Then, Disable login window startup:
Find the following two lines in the/etc/TTYs file:
#console "/usr/libexec/getty std.9600" vt100 on secure
console "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow"
II:
This method has a "risk", that is, in an environment that is not particularly cautious, if your subsequent configuration work encounters problems, the system will not be able to change back to the normal state, then your system deployment will completely fail, and you still need to manually Perform troubleshooting. therefore, in a loose environment, especially in the education industry, the "Remind users" approach can be fully implemented.
The three simple methods have their own advantages and disadvantages.
The method for changing the system desktop background is simple. You only need to create a system background image in advance to display the information that needs to be told to the user that the system installation is not complete, so that the user can wait patiently for a moment.
This background image file is stored in/system/library/coreservices/defaultdesktop.jpg. Or you can use the following command to change it:
defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture /System/Library/CoreServices/DefaultDesktop.jpg
Display information in the login window. This is simpler. You can use commands to add and change the display content at any time.
defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText ”it's reconfiguring your system, please wait until it restarts.”
Use login window plugins. This requires certain programming capabilities. login window plugins are stored in the/system/library/coreservices/securityagentplugins directory. For details, see the examples in the development kit:
/Developer/examples/security/bannersample
III:
The above steps are automatically completed in many ways. Here, only apple is currently being improved.
, Recommendations, and are becoming a standard method.
For example, the following plist file:
<? XML version = "1.0" encoding = "UTF-8"?> <! Doctype plist public "-// Apple // DTD plist 1.0 // en" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version = "1.0"> <dict> <key> disabled </key> <false/> <key> label </key> <string> deployment post-restoration script </string> <key> OnDemand </key> <false/> <key> Program </key> <string>/usr/local/bin/finalizing. sh </string> <key> runatload </key> <true/> <key> launchonlyonce </key> <true/> </dict> </plist>
Save it to the/library/launchdaemons directory, so that the system will automatically execute the finalizing. Sh script in the specified directory/usr/local/bin.
Tony Liu, in Calgary, May 29,201 0