Using a logon script to start Clients
Create Script
-
Create a .bat file on your computer (for example, logon.bat) with the code:
start /B \\Server\foldername\nieclient.exe
where \\Server is the "Computer name" of the computer on which you previously created a share with the client files (for example, WIN-BVA3SRGRT23), foldername is the share name (it may contain the further folder path) that contains the client executable file (for example, Inventory_Client).
Create Local Group Policy
-
Start the Domain Group Policy Editor. This can be done in two ways:
- Click Start - Run - enter "gpedit.msc" and hit Enter (OK)
- Use the shortcut keys WINDOWS + R - enter gpedit.msc
-
Configure a user logon script so that the script executes when a user logs in:
User Configuration - Windows Configuration - Scripts (login / logout)
-
In the window on the right, select Login - click the Add button - select the previously created script (.bat file)
logon.bat
Domain Group Policy Creation
- On the domain controller, go to the directory C:\Windows\SYSVOL\sysvol\yourdomain\scripts
(where yourdomain is a domain name) - Copy the previously created script to this folder
- Run the Domain Group Policy Editor on the domain controller Start - Run - gpmc.msc (or with shortcut keys Windows + R - enter gpmc.msc).
- Find the policy
"Default
Domain Policy" on the opened window for editing group policies of the domain (we renamed it to logon_script for convenience or create a new group policy named logon _script) and make a right-click on it, then click Edit.
- Go to the policy
User Configuration \ Windows Configuration \ Scripts (Log In / Out
system)
- On the right side of the window, open the Login policy
- Select the policy Login, make a double-click on it to open Properties. Click Add... and select your script.