File change

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I recently installed a new application on all of my desktop PC’s about 1600
mixed Win2K and XP, I need to make a change in an .ini file that belongs to
the new application. Do you know of any utilities that will allow mw to
change one attribute in a common file on all of my desktops? Any help would
be greatly appreciated.
 
I recently installed a new application on all of my desktop PC’s about 1600
mixed Win2K and XP, I need to make a change in an .ini file that belongs to
the new application. Do you know of any utilities that will allow mw to
change one attribute in a common file on all of my desktops? Any help would
be greatly appreciated.


You could do this in a logon script.

Let's assume the the file was called myini.ini and it was located at
c:\program Files\VenderName

Furhter, let's assume that the file contains a unique line like
UserStatusSwitch=1

and you wanted it to be
UserStatusSwitch=2

Then, in your logon script:

if exist "c:\program Files\VenderName\myini.ini" goto myiniok
net send FranK "%userName% on %ComputerName% does not have myini.ini
goto continue
:myiniok
if exist "%TEMP%\myini.tmp" del /q "%TEMP%\myini.tmp"
for /f "Tokens=*" %%a in ('type "c:\program Files\VenderName\myini.ini"') do (
set line=%%a
call :fixit
)
del /q "c:\program Files\VenderName\myini.ini"
copy "%TEMP%\myini.tmp" "c:\program Files\VenderName\myini.ini"
del /q "%TEMP%\myini.tmp"
goto continue
:fixit
if /i "%line%" EQU "UserStatusSwitch=1" set line=UserStatusSwitch=2
@echo %line%>>"%TEMP%\myini.tmp"
goto :EOF
:continue


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top