[wpkg-users] setting the current directory for setup.exe?
Rainer Meier
r.meier at wpkg.org
Mon Sep 1 13:17:16 CEST 2008
Hi Kent,
Kent Tong wrote:
> It's the setup.exe program for "tera term pro". I think it is MS Setup. It
> will look for the ttermpro.inf file in the current directory.
>
> I can't use "cd" because it is a UNC path (%SOFTWARE%/bin/teraterm).
UNC paths might not work for this setup program. You can try to specify
a "workdir=<path>" attribute within the install command. This will be
used as the working directory. However as I said specifying an UNC path
name (e.g. "\\server\xy") might not work for the setup.
In that case I suggest the following:
Write a small batch script which does the silent installation.
Some untested code:
@echo off
echo Installing Tera Term
copy "%SOFTWARE\bin\teraterm\setup.exe" "%TEMP%
copy "%SOFTWARE\bin\teraterm\ttermpro.inf" "%TEMP%
%SYSTEMDRIVE%
cd "%TEMP%"
start /wait "setup.exe"
set EXIT_CODE=%ERRORLEVEL%
del ttermpro.inf
del setup.exe
exit /b %EXIT_CODE%
Then run this command script instead of setup.exe.
I did not test the script above. It was just written to give you some idea.
br,
Rainer
More information about the wpkg-users
mailing list