Skip to main content



How can we help you?


Druva Documentation

Reactivating devices using IMD v2

Heads up!

We've transitioned to a new documentation portal to serve you better. Access the latest content by clicking here.

This topic provides details about reactivating Windows and Mac devices using Integrated Mass Deployment (IMD) v2. For prerequisites, refer to Procedure for reactivating devices.

Client: Windows

The following commands should be executed only on the affected devices.

  1. Cleanup the registry (required)
    1. 32 bit
      reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Druva Software\inSync" /f
    2. 64 bit
      reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Druva Software\inSync" /f
  2. To install the same inSync version, you must uninstall inSync as msiexec doesn't allow installation of the same version.
    wmic product where "name like '%%Druva inSync%%'" call uninstall /nointeractive
  3. Do a fresh installation of inSync Client. It is recommended to download and install the latest inSync Client from the download link.
  4. Set the REPLACE_DEVICEV2 flag to YES while doing an IMD.
    msiexec /qn /i <path to inSync msi> TOKENV2='<paste the mass deplyment token>' SERVERLIST="<port number>" REPLACE_DEVICEV2="YES"

    Ensure you update the port as per your configuration. Contact your system administrator if you are not sure of your configured port.
    For IMDv2 the token should be given in single quote (').

Note: Proxy settings if any, must be specified.   

Sample script for Windows devices

echo on

findstr /s /c:"KEY = ''" C:\inSync4\*.cfg > "C:\inSyncReactivate.log"  2>&1
if %ERRORLEVEL% == 0 (

findstr /s /c:"KEY = ''" C:\ProgramData\Druva\inSync4\*.cfg >> "C:\inSyncReactivate.log"  2>&1
if %ERRORLEVEL% == 0 (



net stop inSyncCPHService   >> "C:\inSyncReactivate.log"  2>&1
timeout -t 10
TASKKILL.exe /f /im inSyncAgent.exe >> "C:\inSyncReactivate.log"  2>&1
timeout -t 2

wmic product where "name like '%%Druva inSync%%'" call uninstall /nointeractive >> "C:\inSyncReactivate.log"  2>&1

timeout -t 2

reg query "HKLM\SOFTWARE\Wow6432Node\Druva Software" >> "C:\inSyncReactivate.log"  2>&1
if %errorlevel% == 0  reg delete "HKLM\SOFTWARE\Wow6432Node\Druva Software" /f >> "C:\inSyncReactivate.log"  2>&1

reg query "HKLM\SOFTWARE\Druva Software" >> "C:\inSyncReactivate.log"  2>&1
if %errorlevel% == 0  reg delete "HKLM\SOFTWARE\Druva Software" /f >> "C:\inSyncReactivate.log"  2>&1

timeout -t 2

msiexec /qn /i "<path to inSync msi>" TOKENV2='<mass deployment token>' SERVERLIST="<Backup/sync port>" REPLACE_DEVICEV2="YES"


Client: MAC

The following commands should be executed only on the affected devices.

  1. Update the token in inSyncConfig.ini and push it to Mac Client.
    For more information, see Install inSync on Mac devices.
  2. Relaunch inSync Client.

Note: For Mac devices, you don't need to re-install Mac Client.

Sample script on Mac device

set +x
Folder='/Library/Application Support/inSync'
I='/Library/Application Support/inSync/inSyncConfig.ini'
user=`ls -l /dev/console | awk '//{print $3}'`
echo "loggedInUser:" $user  >> $U 2>&1

grep "KEY = ''\|SERVERS = \[\]" /Users/$user/Library/Application\ Support/inSync/inSync.cfg > /dev/null

#if key is empty, then relaunch inSync

if [ $? == 1 ]; then
   echo "Device activated" >> $U
   exit 0


killall inSync >$U 2>&1
sleep 5                                                         
echo "inSync services killed" >> $U

chown -R 775 '~/Library/Application\ Support/inSync' >> $U 2>&1

if [ -e "$I" ]
echo "ini file exist" >>$U
cd /Library/Application\ Support/inSync/ >>$U 2>&1
mv inSyncConfig.ini inSyncConfig.ini.old >>$U 2>&1
mkdir "$Folder"
touch "$I" >>$U 2>&1
echo "Creating new INI file" >>$U
echo "ADDRESS = ''" >>$I
echo "TOKEN = '<insert your generated token here>'” >>$I
echo "REPLACE_DEVICEV2= 'Yes'" >>$I

user=`ls -l /dev/console | awk '//{print $3}'`

echo "loggedInUser:" $user  >> $U 2>&1

sleep 30 >> $U 2>&1

su -l $user -c 'PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin/;open /Applications/Druva\ inSync/' >> $U 2>&1


exit 0


Note: the quote ( ' ) edited in mac “textedit” is replaced by inverted comma ( ‘ ). Inverted comma is not accepted by script and it will fail. Make use of vim editor to edit inSyncConfig.ini, this editor will put correct quote mark.

Related articles

  • Was this article helpful?