Delete PI DataLink settings for all users on a computer
- Last UpdatedMar 19, 2025
- 1 minute read
- PI System
- PI DataLink 2023 SP1
- Visualization
Administrators can delete the PI DataLink settings for all users on a computer. The next time users open PI DataLink, they will have the default settings from a new installation.
-
Create a batch file that deletes the OSIsoft.PIDataLink.xml file.
@echo off
SET ProfileBase=%SystemDrive%\Users
SET AppDir=APPDATA\Local
SET DefaultUsername=Default
ECHO Deleting XML settings file from all users.
for /f "tokens=*" %%a in ('dir /b /ad-h "%ProfileBase%"') do if 1==1 (
ECHO Deleting "%ProfileBase%\%%a\%AppDir%\OSIsoft,_Inc".
rmdir "%ProfileBase%\%%a\%AppDir%\OSIsoft,_Inc" /s /q
)
ECHO Deleting "%ProfileBase%\%DefaultUsername%\%AppDir%\OSIsoft,_Inc".
rmdir "%ProfileBase%\%DefaultUsername%\%AppDir%\OSIsoft,_Inc" /s /q -
From Windows Explorer, right-click the batch file and then select Run as administrator.