Reputation: 21
I want to create a .bat
file to push to more than 4000 users to edit lotus notes ini
file, to disable the Instant Messenger.
I have to plug in this two lines IM_DISABLE=1
& IM_DISABLED=1
If the lines exist, edit to the new value if it doesn't plug it in.
The ini file is called notes.ini residing in the path C:\Users\PSuriya\AppData\Local\Lotus\Notes\Data
However, this path should be generic to users.
Upvotes: 0
Views: 4425
Reputation: 59
You can use a policy to push notes.ini settings to clients
Upvotes: 0
Reputation: 41224
This should work - test it on some sample users
@echo off
set "file=%userprofile%\AppData\Local\Lotus\Notes\Data\notes.ini"
if exist "%file%" (
findstr /v /i "IM_DISABLE= IM_DISABLED=" "%file%" >"%file%.tmp"
>>"%file%.tmp" echo/IM_DISABLE=1
>>"%file%.tmp" echo/IM_DISABLED=1
move /y "%file%.tmp" "%file%" >nul
)
If the file doesn't exist then it will do nothing for that user.
Upvotes: 1