QUOTE (Chris Lee @ Feb 2 2004, 09:15 AM)
johann83, can I somehow switch the C:\ drive variable? Because I want my cd to work on all drives they want to install on.
I assume you mean for the Uninstall string, since everything else I posted should work as long as they want to install Trillain to Program Files (I think it should go to wherever Program Files is, but I have never tested it). And I only use the $Progs directory because it is there, you could copy the files manually to whereever you want to "intall" them.
As far as the uninstall registry entry, I think you could use the REG command from a batch. Like so:
CODE
SET KEY="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Trillian"
REG ADD %KEY% /V "DisplayName" /D "Trillian"
REG ADD %KEY% /V "UninstallString" /D "%SYSTEMDRIVE%\Program Files\Trillian\trillian.exe /uninstall"
Or you can replace the %SYSTEMDRIVE% variable and the path with anything you want. So if you want to use any arbitrary directory to "install" Trillian, you could use a batch like this (replacing <PathToTrillianSource> in the .CMD file with wherever the source files are):
CODE
@ECHO OFF
XCOPY <PathToTrillianSource>\Trillian %1%\Trillian /E /C /I /Q /Y
SET KEY="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Trillian"
REG ADD %KEY% /V "DisplayName" /D "Trillian" /F
REG ADD %KEY% /V "UninstallString" /D "%1%\Trillian\trillian.exe /uninstall" /F
And you would simply call like so:
CODE
InstallTrillian.cmd <PathToTrillanInstall>