Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 12 Aug 2008 09:57:01 -0700,    group: microsoft.public.platformsdk.msi        back       


MSIVal2.exe Always Returning Exit Code -1   
I am trying to call msival2.exe on a MSI file and it successfully performs 
the ICE testing. However, the error code is always -1 and I can't seem to 
figure out why.  

To test, I made a simple batch file which has the following code:

@ECHO OFF
msival2.exe "C:\test\myMSI.msi" Darice.cub 
if NOT errorlevel 0 goto failure

:failure
echo Error level is %errorlevel% > c:\blah.log

Errorlevel always shows -1 even though msival2.exe outputted correct 
information. For simple testing, I ran this batch file from the msival2 
directory (c:\program files\msival2\). That directory also contains 
Darice.cub.

Any thoughts?
date: Tue, 12 Aug 2008 09:57:01 -0700   author:   Jonathan N Jonathan

Re: MSIVal2.exe Always Returning Exit Code -1   
[Please do not mail me a copy of your followup]

=?Utf-8?B?Sm9uYXRoYW4gTg==?= <Jonathan N@discussions.microsoft.com> spake the secret code
 thusly:

>To test, I made a simple batch file which has the following code:
>
>@ECHO OFF
>msival2.exe "C:\test\myMSI.msi" Darice.cub 
>if NOT errorlevel 0 goto failure
>
>:failure
>echo Error level is %errorlevel% > c:\blah.log


Try this:

@ECHO OFF
msival2.exe "C:\test\myMSI.msi" Darice.cub 
if NOT errorlevel 0 goto failure
goto done

:failure
echo Error level is %errorlevel% > c:\blah.log

:done

Does that still execute the :failure block?
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
      <http://www.xmission.com/~legalize/book/download/index.html>

        Legalize Adulthood! <http://blogs.xmission.com/legalize/>
date: Tue, 12 Aug 2008 10:44:52 -0700   author:   legalize+ (Richard [Microsoft Windows Installer MVP])

Re: MSIVal2.exe Always Returning Exit Code -1   
I actually figured out the problem. If any of the ICE's return a error, then 
msival2.exe will return -1 to indicate that there was an error found in your 
MSI. I was thinking -1 meant something went wrong with msival2.exe. If you 
run msival2.exe on a MSI without errors, error code is 0. 

"Richard [Microsoft Windows Installer MVP" wrote:

> [Please do not mail me a copy of your followup]
> 
> =?Utf-8?B?Sm9uYXRoYW4gTg==?= <Jonathan N@discussions.microsoft.com> spake the secret code
>  thusly:
> 
> >To test, I made a simple batch file which has the following code:
> >
> >@ECHO OFF
> >msival2.exe "C:\test\myMSI.msi" Darice.cub 
> >if NOT errorlevel 0 goto failure
> >
> >:failure
> >echo Error level is %errorlevel% > c:\blah.log
> 
> 
> Try this:
> 
> @ECHO OFF
> msival2.exe "C:\test\myMSI.msi" Darice.cub 
> if NOT errorlevel 0 goto failure
> goto done
> 
> :failure
> echo Error level is %errorlevel% > c:\blah.log
> 
> :done
> 
> Does that still execute the :failure block?
> -- 
> "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
>       <http://www.xmission.com/~legalize/book/download/index.html>
> 
>         Legalize Adulthood! <http://blogs.xmission.com/legalize/>
>
date: Tue, 12 Aug 2008 10:56:14 -0700   author:   Jonathan N

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us