Windows OS provides GUI to enable or disable offline files feature. For those who want to disable offline files from a batch script, below is a tip how to do this.
Windows XP/Server 2003
In Windows XP offline files can be disabled from command line using the below command.
Csccmd.exe 1.0 version can be downloaded as part of Windows Resource Kit tools which is available at
Csccmd 1.1 version which has many options than 1.0 version can be downloaded from the below location.
Csccmd 1.1 version supports /disable switch.
Windows Vista/ Windows 7
In Windows Vista and Windows 7 we can disable offline files feature by stopping and disabling offline files service. This can be done using
SC command as mentioned below.
To stop offline files service you can run the below command.
sc stop CscService
Stopping the offline files service will disable offline files feature for the current session. But once the system reboots, offline files will be back to on state. To disable it permanently you need to disable CSC service.
To disable offline files service run the below command from command line:
sc config CscService start= disabled
thanks! worked a treat on an elevated command prompt on win 7