Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: install file installation return codes
1 VIF_TEMPFILE
The temporary copy of the new file is in the destination directory.
The cause of failure is reflected in other flags.
2 VIF_MISMATCH
The new and preexisting files differ in one or more attributes. This
error can be overridden by calling VerInstallFile again with the VIFF_FORCEINSTALL
flag set.
8 VIF_DIFFLANG
The new and preexisting files have different language or code-page
values. This error can be overridden bycalling VerInstallFile again with the
VIFF_FORCEINSTALL flag set.
I think the file you are trying to install is a different language from the one already on your system. Windows thinks maybe you should not install it. But if you really want to, you can set the force flag.
For a complete list of return codes, see list below.
result=InstallFile(...
rslt1=ItemExtract(1,result,"|") rslt2=ItemExtract(2,result,"|") Message("Result code is", rslt1) Message("Temp file name (if any) is", rslt2)Rslt1 codes
0 = It worked - as far as we can tellRETURN CODES (corresponding numbers below):
/* ----- VerInstallFile() flags ----- */
1 VIF_TEMPFILE
The temporary copy of the new file is in the
destination directory. The cause of failure
is reflected in other flags.
2 VIF_MISMATCH
The new and preexisting files differ in one or more
attributes. This error can be overridden by calling
VerInstallFile again with the VIFF_FORCEINSTALL
flag set.
4 VIF_SRCOLD
The file to install is older than the preexisting file.
This error can be overridden by calling VerInstallFile
again with the VIFF_FORCEINSTALL flag set.
8 VIF_DIFFLANG The new and preexisting files have different language or code-page values. This error can be overridden by calling VerInstallFile again with the VIFF_FORCEINSTALL flag set.
16 VIF_DIFFCODEPG
The new file requires a code page that cannot be
displayed by the version of Windows currently running.
This error can be overridden by calling VerInstallFile
with the VIFF_FORCEINSTALL flag set.
32 VIF_DIFFTYPE
The new file has a different type, subtype, or
operating system from the preexisting file. This
error can be overridden by calling VerInstallFile
again with the VIFF_FORCEINSTALL flag set.
64 VIF_WRITEPROT
The preexisting file is write protected. This error
can be overridden by calling VerInstallFile again
with the VIFF_FORCEINSTALL flag set.
128 VIF_FILEINUSE
The preexisting file is in use by Windows
and cannot be deleted.
256 VIF_OUTOFSPACE
The function cannot create the temporary file due to
insufficient disk space on the destination drive.
512 VIF_ACCESSVIOLATION
A read, create, delete, or rename operation failed
due to an access violation.
1024 VIF_SHARINGVIOLATION
A read, create, delete, or rename operation failed
due to a sharing violation.
2048 VIF_CANNOTCREATE
The function cannot create the temporary file. The
specific error may be described by another flag.
4096 VIF_CANNOTDELETE
The function cannot delete the destination file,
or cannot delete the existing version of the file
located in another directory. If the VIF_TEMPFILE bit
is set, the installation failed, and the destination
file probably cannot be deleted.
8192 VIF_CANNOTRENAME
The function cannot rename the temporary file,
but already deleted the destination file.
16384 VIF_CANNOTDELETECUR
The existing version of the file could not be
deleted and VIFF_DONTDELETEOLD was not specified.
32768 VIF_OUTOFMEMORY
The function cannot complete the requested
operation due to insufficient memory. Generally,
this means the application ran out of memory attempting
to expand a compressed file.
65536 VIF_CANNOTREADSRC
The function cannot read the source file. This could mean
that the path was not specified properly.
131072 VIF_CANNOTREADDST
The function cannot read the destination (existing) files.
This prevents the function from examining the file's attributes.
262144 VIF_BUFFTOOSMALL
The szTmpFile buffer was too small to contain the
name of the temporary source file. When the function
returns, lpuTmpFileLen contains the size of the buffer
required to hold the filename.
http://www.microsoft.com/downloads/release.asp?ReleaseID=13268&LangID=20&LangDIR=en-us&OpSysID=9800&Search=Product&Value=188&Show=Alpha&Start=&Page=0
which I downloaded from Microsoft.
My code is the following:
a=InstallFile(FileNameShort("C:\My Download Files\wd97vw32.exe"),"wd97vw32.exe","E:\temp\", @false, 1) message("",a)The variable "a" has the value "0|" but nothing happens (nothing gets installed).
What am I doing wrong? I think this must be a 32-bit app.
InstallFile can be though of as a semi-intelligent CopyFile that knows how to uncompress certain kinds of files.
Often all it does is copy the file. It does not run it or anything.
Article ID: W13082
Filename: InstallFile Function and Return Codes.txt
File Created: 2001:01:26:12:50:56
Last Updated: 2001:01:26:12:50:56