[wpkg-users] Changing directory during install?

Pendl Stefan stefan.pendl at haidlmair.at
Fri Sep 4 15:10:11 CEST 2009


>
> I'm trying to set up a couple packages for WPKG, and am running into the
> issue that I can't really control what the current directory is.
> Specifically, this is for the Ghostscript installer (setupgs.exe) which
> expects to be run from the current directory.
>
> In my scenario, the standard solution does not work because the
> directory only has a UNC path. For various reasons, I can't map a drive
> letter for it. And that means that I can't use cmd.exe to change
> directory. The Ghostscript installer itself can handle a UNC path as the
> current directory.
>
> Are there any alternate solutions that would work with UNC paths?
>
I do have the following install comands to install "GPL Ghostscript 8.64":

        <install cmd='%comspec% /c NET USE U: "%SOFTWARE%"' >
            <exit code="2" />
        </install>
        <install timeout="300" workdir="U:\NT-Install\Ghostscript\gs864w32" cmd='%ComSpec% /c if %PROCESSOR_ARCHITECTURE% == x86 setupgs.exe "%ProgramFiles%\gs"' />
        <install timeout="300" workdir="U:\NT-Install\Ghostscript\gs864w64" cmd='%ComSpec% /c if %PROCESSOR_ARCHITECTURE% == AMD64 setupgs.exe "%ProgramFiles%\gs"' />
Exit code 2 for NET USE indicates, that U: is already used, which is the default drive letter for my SOFTWARE share.
This is just to make sure I can run the installations manually and automaticall, since the Admin user gets this drive mapped through a logon script, but the SYSTEM account does not.

---
Stefan




More information about the wpkg-users mailing list