Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWAREProgramming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old May 7th, 2008, 02:49 AM
cheerio829 cheerio829 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 1 cheerio829 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 31 sec
Reputation Power: 0
DOS Batch - Return error level except errorlevel 3010

i was trying to write a batch file that installs a program, and when there is an error return the error level - except when it has errorlevel 3010

@echo off

:SP2
Start /wait C:\SQLInstall\SP2\SQLServer2005SP2-KB921896-x86-ENU.exe /quiet /allinstances
IF (%ERRORLEVEL% == 0) goto OK
else IF (%ERRORLEVEL% == 3010) goto Restart
else goto ERROR_SP2Install

:OK
echo SP2 Installation finished.
echo Log file for SQL 2005 SP2:
echo C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\Log\Hotfix\Summary.txt
echo.

:Restart
echo SP2 Installation finished. Restart required.
echo Log file for SQL 2005 SP2:
echo C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\Log\Hotfix\Summary.txt
echo.

:ERROR_SP2Install
echo Error occurs when installating SQL server 2005 SP2. Error level: %ERRORLEVEL%
echo Log file for SQL 2005 SP2:
echo C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\Log\Hotfix\Summary.txt



however this doesnt works. Could anyone please help me to come up with a way that I can get the errorlevel when there is an error except when it was errorlevel 3010?

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWAREProgramming > DOS Batch - Return error level except errorlevel 3010


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway