Budde420 Posted November 11, 2007 Posted November 11, 2007 I would like to have a Welcoming Message to every user when they log on to my computer. But, I would like it to be different for each member. Also could I have the Loading Message everytime too.Thanks.
Idontwantspam Posted November 11, 2007 Posted November 11, 2007 Well, the built-in message that you apply via group policy cannot be configured per-user. However, you might be able to write a VBscript that uses a msgbox to display that user's mesage, and if they say "Yes" let them continue and if they say "No" log them off. No, I can't write it since I'm not very proficient at all with VBS.
Idontwantspam Posted November 15, 2007 Posted November 15, 2007 (edited) OK, by kludging together some bits and pieces of scripts from all over the web, I have made a logon script to do what you desire. Here's the instructions:Create a new folder somewhere on your computer, for example, C:/scripts. Right-click it and choose the sharing tab. Enable sharing, and make sure to make the share name be netlogon. Place the attached script or your rendition of it in that folder. Log on as an administrator. Run LUSRMGR.MSC. Find the user you want this to apply to and double-click them. Under the profile tab, enter the name of the script for the logon script field. When the user next logs on, the script should run.For best results, you should disable simple file sharing, and in group policy (gpedit.msc) under User Config > Administrative Templates > System > Scripts, set "Run logon scripts synchronously" and "run logon scripts visible" to enabled. Note that this whole procedure will NOT work under windows xp home. For XP home, you'll be stuck putting a shortcut to the VBS file in the user's startup folder. If you have any questions, let me know. logon.zip(zipped 'cause it won't let me upload VBS files)Here's the text of the file if you want to just copy and paste: (see below)------------------EDIT: Since you want this to be different for multiple users, make a different script for each (i.e. script1.vbs, script2.vbs, etc.) and put the all in that network share. Then, make sure to configure it right for each user.------------------MORE EDIT: Note that while this is being displayed, the user can press Ctrl+Alt+Del and get the task manager, then end wscript.exe (which is the scripting host that runs the script) and therefore bypass it. You could add a clause to the agreement stating that if you circumvent the notice, you are agreeing to it by taking that action.------------------EVEN MORE EDIT: OK, I made a version that will disable ALL options in the Ctrl+Alt+Del box, including task manager. This way, there is no way to circumvent the process. Note that this requires the user to have read/write access to their Policies key, which you will have to do manually. Not all users have this access by default, and you may not want them to, so use the old version if you'd rather. If they don't have this access, the script will fail with an error, and nothing will be done. However, in this edition, I did make it so that it will disable registry editing for that user. Editing from the logon script works, but they can't run regedit.exe or open .reg files. 'This script is to prompt the user with a policy to agree to, 'an ask them if they agree or not. If they click yes, then 'the logon will complete successfully. If they click no, then 'they will be automatically logged off. Set Shell = CreateObject( "WScript.Shell" )Shell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr", 1, "REG_DWORD"Shell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableLockWorkStation", 1, "REG_DWORD"Shell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableChangePassword", 1, "REG_DWORD"Shell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools", 1, "REG_DWORD"Shell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose", 1, "REG_DWORD"Shell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoLogoff", 1, "REG_DWORD"if MsgBox("Insert message here." + vbCRLF + vbCRLF + "Do you agree to the policy?", vbQuestion + vbYesNo, "Agreement confirmation") = vbNo then MsgBox"You will now be logged off.", vbError, "Warning" Unrestrict() ShutDown()else MsgBox "Welcome. By proceeding, you have agreed to the policy stated above.", vbInformation, "Welcome" Unrestrict()end ifSub Unrestrict()Shell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr"Shell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableLockWorkStation"Shell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableChangePassword"Shell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose"Shell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoLogoff"End SubSub ShutDown() Dim Connection, WQL, SystemClass, System 'Get connection To local wmi Set Connection = GetObject("winmgmts:root\cimv2") 'Get Win32_OperatingSystem objects - only one object In the collection WQL = "Select Name From Win32_OperatingSystem" Set SystemClass = Connection.ExecQuery(WQL) 'Get one system object 'I think there is no way To get the object using URL? For Each System In SystemClass System.Win32ShutDown (0) NextEnd Sub Edited November 15, 2007 by Idontwantspam
gosh Posted November 15, 2007 Posted November 15, 2007 You could set the logon message using group policy, then to customize the message you could use a different logon message for each OU. For example, you could set a logon message for the HR OU, then a different logon message for Management OU, etc-gosh
Idontwantspam Posted November 16, 2007 Posted November 16, 2007 (edited) I was assuming this was a local environment, but yes, in an AD environment you could do that. Well, you sort of can and you sort of can't. Since it's a machine policy, all users logging on to that machine would see the same logon message. I think what he wants to do is have it be different for individual users. However, in an AD environment you could use Group Policy to set a different script for each OU for users. Edited November 16, 2007 by Idontwantspam
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now