Client Deployment using Active Directory with Batch File

The purpose of this document is to help network administrators deploy the CurrentWare client to workstations using a batch file and Window’s Group Policy.

This procedure is targeted to network administrators familiar with deploying software through Group Policies in an Active Directory environment.

Requirements:

  • Windows Server Active Directory
  • CurrentWare Server installed

Step 1: Create a shared folder with the cwClientSetup.exe Setup file

  1. Create a shared folder on your network
  2. Copy the cwClientSetup.exe (setup file) to this shared folder. You can find the cwClientSetup.exe from your cwServer computer under C:\Program Files(x86)\CurrentWare\cwClient\
  3. Ensure all AD users have permission to access this shared folder. This folder must be accessible without user password authentication

Step 2: Editing the Batch File

Download the cwClientDeploy.bat Batch file: https://www.currentware.com/downloads/tools/cwClientDeploy.zip

1. Right-click on cwClientDeploy.bat and edit.

2. You will find the following commands in the batch file. Please edit the parameters after the “=” with your required credentials.

SET FileSource=Enter the shared File Location in the format \\MYPC\myshare
SET cwServer=Enter the CurrentWare Server's computer name or IP address

Here’s an example of the above command line:

SET FileSource=\\MYPC\myshare
SET cwServer=CurrentWareServer

Note: There is no need to put in the file name (cwClientSetup.exe). Make sure that there are no additional spaces between the ‘=’ and the user inputs or variable declaration.

3. After entering the credentials, save the file without changing the name.


Step 3: Running cwClientDeploy.bat via GPO

1. Open Active Directory and move the required computers to a new group or OU.

2. Open Group Policy Management Console.

1-install

3. Expand and navigate to the newly created AD OU.

4. Right click on that OU and click ‘Create a GPO in this domain and link it here’.

2-create-gpo-in-this-domain

5. Enter a name for the new GPO and hit OK.

3-enter-gpo-name

6. Click on the newly created policy to get its properties.

7. Navigate to the settings tab on the right side screen and right click on computer configuration.

8. Click edit and you will be redirected to the Group Policy Editor window.

4-edit-1

9. On the GP Edit window, expand and navigate to the windows settings. Click Scripts (Startup/Shutdown).

10. From the right side screen double click Startup and you will get the startup properties window.

5-startup

11. Click Show Files to get the startup scripts folder (C:\Windows\System32\GroupPolicy\Machine\Scripts\Startup). And paste cwClientDeploy.bat in that folder.

6-show-file

12. Click add to set scripts.

7-add

13. Click and browse for the cwClientDeploy.bat from the above mentioned folder.

8-browse
9-cwClient-deploy

14. In the script parameters field Type in:

Runas /profile /user:domainname\administrator cwClientDeploy.bat

And hit OK. (Put the exact domain name only in the given command line. Nothing else need to be changed.)

10-runas

15. Apply the property settings and hit OK.

11-cwclient-bat

16. Close GP Editor and refresh the Group Policy Management console.

17. Again navigate to the newly created policy and click on Settings tab. Verify that the Script execute policy is showing active underneath the computer setting tree.

12-settings-tab-1

18. Go to Scope tab and enforce this policy to its group. Add and apply the same settings to any particular users or groups, if you wish to.

13-scope-1

19. Restart the client computers and wait for around 10 minutes to complete the task.

20. Once a computer is connected to the CurrentWare Console, remove the computer from the OU.

21. Once all the computers are connected to the CurrentWare Console, disable the start-up script.


Troubleshooting

If your script fails to run, please try the following troubleshooting tips

  1. Make sure there’s no additional spaces or characters entered in the script. It can cause the script to fail.
  2. Make sure there are no other group policies that would restrict running the script on the client computers.
  3. Disable your antivirus temporary during the client deployment stage.

New to CurrentWare? Get Started Today!

“I chose CurrentWare for the solid product that gave more options with a lower price tag, high accuracy, and solid customer support.” -Vincent Pecoreno Network Administrator, Viking Yachts