Marco Gaiarin wrote: > I'm trying to use wpkg to install tightvnc (i prefere it over ultra) > and apply some autoconfiguration. > > I've do: > > <package > id="tightvnc" > name="TightVNC server" > revision="129" > priority="10" > reboot="false"> > > <check type="uninstall" condition="exists" path="TightVNC 1.2.9" /> > > <install cmd="%SOFTWARE%\WPKG\tightvnc-1.2.9-setup.exe /sp- /verysilent" /> > <install cmd="%ProgramFiles%\TightVNC\WinVNC.exe -reinstall" /> > <install cmd="%ProgramFiles%\TightVNC\WinVNC.exe -servicehelper" /> > <install cmd='netsh firewall add allowedprogram program = %ProgramFiles%\TightVNC\WinVNC.exe name = "Launch TightVNC Server"' /> > <upgrade cmd='%SOFTWARE%\WPKG\tightvnc-1.2.9-setup.exe /sp- /verysilent' > > <exit code="0" reboot="true" /> > </upgrade> > <remove cmd='%ProgramFiles%\TightVNC\unins000.exe /SP- /VERYSILENT' /> > </package> > > And this seems to work well. Now i wont to setup tightvnc, and to be > able to change settings (most notably, password) via wpkg. > > I've done: > > <package > id="tightvnc-settings" > name="TightVNC server settings" > revision="1" > priority="100" > reboot="false"> > <depends package-id="tightvnc"/> > > <check type="file" condition="exists" path="%ProgramFiles%\TightVNC\1" /> > > <install cmd="%WPKGROOT%\packages\tightvnc.bat 1" /> > <upgrade cmd="%WPKGROOT%\packages\tightvnc.bat 1" /> > </package> > > where tightvnc.bat are: > > :: start, restart or apply settings to tightvnc > :: > net stop "VNC Server" > regedit /s %WPKGROOT%\packages\tightvnc.reg > net start "VNC Server" > > :: fake the stupid... > :: > echo "%1" > %ProgramFiles%\TightVNC\%1 > > :: we ignore errors... > :: > exit 0 > > note the hack to create the file %ProgramFiles%\TightVNC\%revision%, > because the condition (also if there's no check condition!) are checked > before and after installation, so this package entry will fail. > > What i'm missing? I've looked at other examples on: > > http://wpkg.org/index.php/Category:Changing_Windows_settings > > but i've not found the clue... I don't know what you're missing, but you didn't mention what doesn't work or what doesn't work as expected... > PS: it is normal that on first installation a /synchronize only does > nothing, and i've to add a /force to instal something? Run WPKG with /debug flag, and you'll know what's happening. Hint: you probably installed the package before, it's in C:\Windows\system32\wpkg.xml, and you want to install that same package again - without increasing the revision. Use this instruction in cmd.exe window: type C:\Windows\system32\wpkg.xml to see the content of this file. -- Tomasz Chmielewski http://wpkg.org _______________________________________________ wpkg-users mailing list wpkg-users at lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users |