Computing.Net > Forums > Windows 2000 > Batch If Statement help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch If Statement help

Reply to Message Icon

Name: aznkd74
Date: July 7, 2005 at 22:02:25 Pacific
OS: Windows 2000
CPU/Ram: 512
Comment:

I have this batch file:

set Var=C:\PROGRAM FILES\Shrink\SDC.INI

for /f "tokens=1,2,3* delims== " %%A in ('type "%var%" ^| find "Display="') do set Monitor=%%B

IF %Monitor% == "vga" (set %Monitor%= non-vga")

How do I pass the Monitor variable to change value for the ini file.



Sponsored Link
Ads by Google

Response Number 1
Name: hiho
Date: July 7, 2005 at 22:26:28 Pacific
Reply:

http://www.ss64.com/ntsyntax/index.html

http://windows.about.com/cs/batchscriptingtips/


0

Response Number 2
Name: Mechanix2Go
Date: July 7, 2005 at 23:05:19 Pacific
Reply:

Hi KD,

Not quite with you. Is this the problem line?


==============
IF %Monitor% == "vga" (set %Monitor%= non-vga")
==============

M2


If at first you don't succeed, you're about average.


0

Response Number 3
Name: aznkd74
Date: July 8, 2005 at 06:54:54 Pacific
Reply:

M2,

The problem is the variable (Monitor). I am trying to resuse this var to have a value within the ini modify through the condition statement. Within SDI.ini, there is a value Monitor=vga. I want the vga value to modify through the if statement.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: Batch If Statement help

Help with batch If command www.computing.net/answers/windows-2000/help-with-batch-if-command/47214.html

$25 if you help solve game crashing www.computing.net/answers/windows-2000/25-if-you-help-solve-game-crashing/43392.html

Telnet Batch file! please help. www.computing.net/answers/windows-2000/telnet-batch-file-please-help/57243.html