Re: [wpkg-users] Handling Win7 and WinXP with run on shutdown
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Hello, Hello, [...] * Use run-on-shutdownNO/run-on-shutdown in settings.xml * At install time: - stop the WPGK service: sc stop wpkgservice - configure it to start manually: sc config wpkgservice start= demand - add the registry setting to display script during shutdown: REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v HideShutdownScripts /t REG_DWORD /d 0 /f - setup the GPO to run a script at shutdown[1] - use nomousy.exe to prevent user from closing the window displayed at shutdown I forgot some settings, here is my postinstall.cmd: #v+ postinstall.cmd @echo off REM Do not export variables SETLOCAL SET CMD_PATH=%~dp0 echo Stop WPKG service %ComSpec% /c sc stop wpkgservice NUL echo Suppress winlogon notification at startup %ComSpec% /c reg delete HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\WPKGLogon /v Startup /f NUL 2 NUL echo Manual start of WPKG %ComSpec% /c sc config wpkgservice start= demand NUL echo Show script at shutdown %ComSpec% /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v HideShutdownScripts /t REG_DWORD /d 0 /f NUL echo Windows in verbose mode %ComSpec% /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v VerboseStatus /t REG_DWORD /d 1 /f NUL echo Put the policy in place %ComSpec% /c xcopy /E /V /I /Q /H /N /Y %CMD_PATH%\grouppolicy\* %windir%\system32\grouppolicy\ %ComSpec% /c reg import %CMD_PATH%\gpo_wpkg.reg REM End of local variables ENDLOCAL REM Local Variables: REM mode: cmd REM comment-start: REM REM comment-end: REM End: #v- -- Daniel Dehennin RAIP de l'Orne pgpYhTXuuYxJZ.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] set %TEMP% variable for user?
Labamba81 labamb...@googlemail.com writes: Is it possible to set the %temp% or %tmp% variable for user, not SYSTEM? my guess is not, because wpgk runs under the system account. am i right? If any of you have a solution, please let me know Right, the wpkg client run under system account, but you can declare a TEMP variable in your host/profiles/packages or even in WPKG client SETTINGS. Regards. -- Daniel Dehennin RAIP de l'Orne pgprLNSStQCKZ.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Reflections on a new application deployment software.
Olivier LARRIGAUDIERE wpkg...@pub.centaure.info writes: Hello, Hello, I currently use WPKG on about fifty computers and I am quite satisfied but I am missing a few things so that this to be perfect. [...] Thank you for your feedback and sorry for my bad english. I respond to the top poster to speak on a project called gaspacho[1], I Cc the main developer to let him correct me. It may be interesting for everybody involved in this thread. A rough translation of the overwiew could be: #v+ Configuring all conputers of a network is boring and difficult, mostly in an heterogeneous environment with nomad users. Gaspacho is a Free Software (GNU/GPL v3) permitting to address those difficulties, offering to the administrator the possibility to manager, centrally, the configuration of the users work space in a network. The project was initiated by the french Free Software promotion group in Côte d’Or[2] COAGUL[3] during the development days in 2009-2010. #v- The software plan to address the configuration of software, like firefox, on the workstation, you define your rules centrally bind those rules to groups of workstation and an agent on the workstations apply them. It's developed in python[4] and during some meeting it was suggested to wrap some wpkg.js call and to let gaspacho generate the WPKG hosts/profiles/packages form gaspacho rules. As the agent is intended to be modular and fetch plugins from the server, we can imagine to develop the wpkg.js functionality in such a plugin, in python[5], and forget the now abandoned it-was-nice-to-have-you-anyway cscript.exe. All this is conditional/futur, the project is promising but need some forces. Regards. Footnotes: [1] only in french for now: http://www.gaspacho-project.net/ [2] http://en.wikipedia.org/wiki/C%C3%B4te-d%27Or [3] http://coagul.org/drupal/ [4] http://gitorious.org/gaspacho/gaspacho-agent/blobs/master/src/README [5] Which is much better than JS, as the maintainer of bug118 you can believe me ;-) -- Daniel Dehennin RAIP de l'Orne pgpeJ6nDh0Z3Z.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Uninstalling thru WPKG
mikhail tan mikesalvi...@gmail.com writes: I get your point Mr. Daniel but here is the catch When I entered the company WPKG was put unto hold so some of the softwares are installed manually and one of it is TMS (correction to tsm) version 4.6.3 is installed manually now 4.6.4 must be installed via WPKG the problem is i've tried many possible techniques but none of it worked It should work for manually installed software too, WPKG don't care about the way the software is installed, as soon as you know how to remove it unattended: 1. create a package for that old version which uninstall it (tms-4.6.3-uninstall): - negate the checks, to check that the software is not installed - run the uninstall commands in install/ 2. put tms-4.6.3-uninstall in a test profile 3. install manually the 4.6.3 version on a test workstation 4. use the test profile for that test workstation 5. run cscript \\server\wpkgshare\wpkg.js /quiet /debug /nonotify /install:tms-4.6.3-uninstall = it should remove the software 6. add tms-4.6.3-uninstall as dependency to package tms-4.6.4 7. replace tms-4.6.3-uninstall by tms-4.6.4 in the test profile 8. do some tests: with 4.6.3 uninstalled, with 4.6.3 manually installed 9. do more tests on more workstations 10. deploy Regards. -- Daniel Dehennin RAIP de l'Orne pgpZkIIboCdqi.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Handling Win7 and WinXP with run on shutdown
Hello, We try to handle the run of WPKG at shutdown in the same way for win7 and winxp. Here is a working setup: * Use run-on-shutdownNO/run-on-shutdown in settings.xml * At install time: - stop the WPGK service: sc stop wpkgservice - configure it to start manually: sc config wpkgservice start= demand - add the registry setting to display script during shutdown: REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v HideShutdownScripts /t REG_DWORD /d 0 /f - setup the GPO to run a script at shutdown[1] - use nomousy.exe to prevent user from closing the window displayed at shutdown The logon-delay control how long the message box is diplay at the end, by default, more than 10 minutes is useless since windows limit the shutdown delay to 10 minutes. The script launched at shutdown is the following: #v+ @echo off Echo *** WPKG : mises a jour des applications en cours *** Echo *** Veuillez patienter *** REM disable mouse start /b /d %windir% nomousy /f -h REM Start WPKG service sc start wpkgservice NUL REM Start WPKG message box start /B /wait /d %programfiles%\wpkg wpkgmessage.exe :end Echo *** Fin des mises a jour *** REM Little pause to let WPKG complete write of the log file on the REM server ping -n 2 localhost NUL #v- Regards. Footnotes: [1] Wonder how to automate this, for now copy some files under %windir%\system32\grouppolicy\ and import a reg -- Daniel Dehennin RAIP de l'Orne pgp0ZBojvqMvb.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Computer groups
Martin Tille e...@gruene.de writes: Is there any possibility to create group of hosts? I have 250 computers and if I need install some package only for 50 computers I must select each host and assign package. It's very uncomfortable I guess only if you have set you computernames in a specific scheme. If your finances have the computernames like finance-0 ... finance-50 you can match them like: host name=finance.+ profile-id=finance-packages / Another approach is to use a patched version[1] of wpkg.js and use computer groups[2]. Regards. Footnotes: [1] http://bugzilla.wpkg.org/show_bug.cgi?id=118 [2] Tested with samba/LDAP, the group query function is tested on AD but not a full run -- Daniel Dehennin RAIP de l'Orne pgpA7GTJx5RYN.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG Development Status
clei...@gmail.com clei...@gmail.com writes: [...] - Have an easy to use interface for configuration that makes it easy to distribute the configuration to many clients (still trying and failing on this) We use a git repository to distribute the cmd scripts and the WPKG files, works pretty well ;-) - Optionally run in system tray and check for updated packages at regular intervals. Inform users about updates and prompt them with alternatives. (the platform is designed to be able do this) Here, we do not want to have messages in system tray. Our users get bored by such ToolTips. - Hopefully be able to install software at shutdown with feedback to user (this is not easily achievable AFAIK, as Windows does not have an API for giving information to users at shutdown) We run WPKG client at shutdown to avoid a delay at startup, our users are more inclined to have a shutdown delay rather than a startup one. I wonder how the windows install updates and shutdown works, seems that we can register[1] an application to block the shutdown process. The user can force the shutdown to occur, if so, the client can force a run at the next startup if it was canceled by the user (like the windows update agent IIRC). I'm not familiar with windows programming, and honestly, I do not want to become... ;-) Regards. Footnotes: [1] http://stackoverflow.com/questions/5217246/how-to-delay-shutdown-and-run-a-process-in-window-service/5217364#5217364 -- Daniel Dehennin RAIP de l'Orne pgpeGluAAE2XP.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Set WPKG service to run before network services?
David Petterson da...@ifm.liu.se writes: I run into this problem on a laptop using the WPKG Client 1.3.9: The WPKG service run but did not install any software so I took a look in the log file. It turned out to be the WPKG service had run before the network services had started. I changed the service startup type to Automatic (Delayed Start) and during the next reboot software started to install. Is there a way to change the service dependence to include network services? Maybe using sc config wpkgservice ? I do not have a windows virtual machine right now for the exact command line. Regards. -- Daniel Dehennin RAIP de l'Orne pgpgOAoKQDPH4.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Default %SOFTWARE% location
Alex Mauer ha...@hawkesnest.net writes: Most or all of the package descriptions on the wiki use the %SOFTWARE% variable throughout. However, I cannot find what the default location is. Is it whereever wpkg.js is located? That’s my only guess. It would probably be helpful to document this somewhere in the readme.txt, or on the wiki. If it already is on the wiki, it should be made easier to find. There is no default location, you must set it with a variable name=SOFTWARE value=... in host/profile/packages/ or directly in the WPKG client settings. Regards. -- Daniel Dehennin RAIP de l'Orne pgpweh8V4TwbZ.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] %version% fails on download and block-package request
David Petterson da...@ifm.liu.se writes: I have considered using the check condition for this, but we have a range of different Adobe Acrobat versions so the list would be long, and I also have to add this to all future patches and make sure they all are the same. can I use regex in the file path? ex %PROGRAMFILES%\Adobe\Acrobat (8|9|10)\Acrobat\Acrobat.exe Then I could use this single check to see if any full version of Acrobat is installed instead of checking for 8, 9 and 10. (all research groups buy their own software licenses so we cant just use the latest version for all of them, but we uninstall old versions that is not updated anymore by Adobe) You can use regular expression in uninstall checks. I don't know the file test code now but I guest it's not implemented, it will need to expand all the possible pathes and check until one match. After looking at the code, it's not implemented in wpkg.js, it use 'ActiveXObject(Scripting.FileSystemObject)' and I don't know how it behaves. Regards -- Daniel Dehennin RAIP de l'Orne pgpfySyO4fv6p.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] %version% fails on download and block-package request
David Petterson da...@ifm.liu.se writes: I am testing WPKG combined with Dropbox to see if the combination dropbox+download could be a solution for people out of office for longer periods of time. I keep the wpkg base and all xml files + tools in a network shared Dropbox folder and all programs are downloaded using download url='http://location/file.exe'/ So far so good, but now I found out that some packages on wpkg.org are using variables for the version number, which would be very nice and allow faster package updating when a new version arrive. The problem I get is that the URL part of the download does not seem to handle the %version% variable, however the target does. ex: (url shorted to fit email better) variable name=version value=10.0.0 / download url='https://wpkg/program/AdobeReader/AdbeRdr%version%_en_US.msi' target=wpkg\AdbeRdr%version%_en_US.msi/ This will give the output (sorry about the line cuts): Downloading https://wpkg/program/AdobeReader/AdbeRdr%version%_en_US.msi' to C:\Windows\Temp\wpkg\AdbeRdr10.0.0_en_US.msi' Download failed: The parameter is incorrect. As you can see the %version% was resolved only in the second part of the command. Found it line 6037 of wpkg.js, the target is expanded but not the url. I wonder if it's a good idea to expand the url, what about encoding characters in URL like: #v+ http://fr.wikipedia.org/wiki/T%C3%A9l%C3%A9kin%C3%A9sie #v- I don't know the answer but my first guest is that the following will cause troubles: #v+ var url = 'http://fr.wikipedia.org/wiki/T%C3%A9l%C3%A9kin%C3%A9sie'; url = new ActiveXObject(WScript.Shell).ExpandEnvironmentStrings(url); WScript.Echo(url); #v- Maybe it will be better to use server side redirection or something like this, making the url stable? If you are using network shared Dropbox to distribute wpkg folder, why not using the same for the applications and avoid the need to use download? Also, I would have a feature request. All our computers have Adobe Reader installed by default, but some of them have the full version. I want the full version to block the installation of the reader to avoid conflicts. Maybe a check in the adobe package to test for the version of adobe installed by the package or any newer or the full version? Since we today can depend, chain include I think that block would be a nice addition. What is it supposed to do? Maybe a package with a block package-id='other-package' will be executed before the blocked one, and if the package is successfully installed it must remove the 'other-package' from the package list? In your case, this scenario seems to force you to have an adobe-full and an adobe-reader packages. If you need an just check package to catch an already installed adobe full, why not adding the checks in the adobe-reader package with a logical or check, like: !-- Reader or full install -- check type='logical' condition='or' !-- Reader check -- check type='uninstall' condition='exists' path='Adobe Reader 9.4.0 - Français'/ !-- 32/64 bits checks -- check type='logical' condition='or' check type='file' condition='versiongreaterorequal' path='%ProgramFiles%\Adobe\Reader 9.0\Reader\Acrord32.exe' value='9.4.0.195'/ check type='file' condition='versiongreaterorequal' path='%ProgramFiles(x86)%\Adobe\Reader 9.0\Reader\Acrord32.exe' value='9.4.0.195'/ /check !-- Adobe full check -- check type='uninstall' condition='exists' path='Adobe whatever'/ !-- 32/64 bits checks -- check type='logical' condition='or' check type='file' condition='versiongreaterorequal' path='%ProgramFiles%\Adobe\whatever\whatever.exe' value='whatever'/ check type='file' condition='versiongreaterorequal' path='%ProgramFiles(x86)%\Adobe\whatever\whatever.exe' value='whatever'/ /check /check Regards. -- Daniel Dehennin RAIP de l'Orne pgpxJhOHibwLI.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Error when running a batch file
Brandon Hamilton bhamil...@rmtt.com writes: Hello, I get the following error when I call a batch file on an install command: Could not process (install) package 'TreeSize Free Context x32' (treesizecontext_x32): Exit code returned non-successful value (-1) on command '%WPKG%\TreeSizeContext_x32.bat' Batch file is: @echo off reg add HKEY_CURRENT_USER\Software\Classes\Folder\shell\TreeSize\command /ve /t REG_SZ /d \C:\Program Files\JAM Software\TreeSize Free\TreeSizeFree.exe\ \%%1\ exit If I run %WPKG%\TreeSizeContext_x32.bat from a command line it works just fine. It depends how you run wpkg.js, maybe the HKCU is not available like with WPKG client running as system. The solution is to use Active Setup[1]. Regards. Footnotes: [1] http://www.appdeploy.com/articles/activesetup.asp -- Daniel Dehennin RAIP de l'Orne pgp2ov1r6nbFI.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wmic check
Natxo Asenjo natxo.ase...@gmail.com writes: hi, Hello, I have a wmic check that does not get executed, so it never gets done. [...] = @echo off rem if %errorlevel% of this command is 0, then it is a PRIMERGY RX300 S3 wmic computersystem get /format:list | findstr /i PRIMERGY RX300 S3 = I had this and found on internet[1] a work around: #v+ echo '' | wmic computersystem get /format:list | findstr /i PRIMERGYRX300 S3 #v- Regards. Footnotes: [1] http://serverfault.com/questions/160933/wmic-hangs-in-cygwin -- Daniel Dehennin RAIP de l'Orne pgpToFaAjY4AK.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] WPKG client, win7 and run on shutdown
Hello, We are looking at enableing wpkg for windows vista and windows 7 workstations, the delayed logon does not work but this is not a limitation for us as we run it at shutdown[1]. On windows 7, the wpkg client do not run at shutdown, it looks like windows kill it before the end. Another option is to switch to wpkg-gp, but this on do not run at shutdown[2]. Any idea who do to it? Regards. Footnotes: [1] We do not want to run at startup to avoid delay before people can work, they do not like waiting before checking their mails ;-) [2] We tests using a shutdown script which start wpkg client (configured to run at startup) and loop 30 times making 6 pings every 10 seconds waiting for the service to stop, not really sexy. -- Daniel Dehennin RAIP de l'Orne pgptlveL7gbkK.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Deploy different versions of wpkg dependent on XP/Seven
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: For the curious ones, I put a complete example[1] on the wiki ;-) I just upgrade the examples[1][2] to avoid un DOS parser bug: #v+ IF %ProgramFiles(x86)% NEQ ( SET PROG_PATH=%ProgramFiles(x86)% ) else ( SET PROG_PATH=%ProgramFiles% ) #v- The closing paren of %ProgramFiles(x86)% in the SET statement close the IF bloc, thanks to the DOS parser. If you need only one variable it can be worked arround like this: #v+ SET PROG_PATH=%ProgramFiles% IF %ProgramFiles(x86)% NEQ SET PROG_PATH=%ProgramFiles(x86)% #v- Avoiding the need of paren, if you need more than one variable, you can use paren and dos function call (or goto if you prefer): #v+ IF %ProgramFiles(x86)% NEQ ( call :64bits ) else ( call :32bits ) REM do something with variables :end exit /B %ERRORLEVEL% REM place this at the end of the file to avoid running them again :32bits SET SOFT_PATH=HKLM\SOFTWARE\ SET RUN_PATH=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run SET PROG_PATH=%ProgramFiles% GOTO :EOF :64bits SET SOFT_PATH=HKLM\Software\Wow6432Node\ SET RUN_PATH=HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run SET PROG_PATH=%ProgramFiles(x86)% GOTO :EOF #v- Thanks. Footnotes: [1] http://wpkg.org/User:Dad#.25SOFTWARE.25.5Cadobe.5Creader.5C9.4.0.5Cpostinstall.cmd [2] http://wpkg.org/User:Dad#.25SOFTWARE.25.5Cadobe.5Creader.5C9.4.0.5Cpostremove.cmd -- Daniel Dehennin RAIP de l'Orne pgpbKSg87TzZU.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] several hosts (by mask) with several profiles
Alexey alexey.dubov...@gmail.com writes: To warn against attempts to send me to read about regular expressions and article Several profiles for one host ( http://wpkg.org/Hosts.xml ) I note the following points: The system selects the first matching profile and stops processing other profiles. For example, the computer MOW-SAL-01 executed only MoscowProfile. host name=MOW-.* profile-id=MoscowProfile / host name=BER-.* profile-id=BerlinProfile / host name=NYK-.* profile-id=NewYorkProfile / host name=.*-SAL-.* profile-id=SalesApps / host name=.*-ACC-.* profile-id=AccountingApps / host name=.*-CST-.* profile-id=CustomerorwhatevverApps / On the example shown , will work out only the profiles of cities, and to profile the functionality of the system will not come. That's the point of /applymultiple[1] which is not yet integrated in mainline ;-) We used it here for ~2500 machines, it works great. Footnotes: [1] http://bugzilla.wpkg.org/show_bug.cgi?id=118 -- Daniel Dehennin RAIP de l'Orne pgpA6lslYiF1o.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Single xml file for 32 and 64 bit Ultravnc msi file?
Donny Brooks dbro...@mdah.state.ms.us writes: What would be the proper syntax for a single entry in a package.xml file for me to install Ultravnc via an msi install file to both 32 and 64 bit clients? I have copied the 7-zip example from the silent installers wiki and tried to edit it to fit to no avail. I am using individual package xml files in the packages directory. Also I have created two msi files that should install ultravnc configured to our needs. One is for the 32 bit client and the other is 64 bit. Both should already be silent installers. Could someone guide me to the correct syntax to create this package file. Thanks in advance. Hello, Here we use simple cmd script to handle this[1], the WPKG package looks like this: #v+ ?xml version='1.0' encoding='utf-8'? packages package id='ultravnc' name='UltraVNC' revision='1.0.8.2.2' reboot='false' priority='500' check type='uninstall' condition='exists' path='UltraVNC 1.0.8.2'/ check type='file' condition='versionequalto' path='%ProgramFiles%\UltraVNC\winvnc.exe' value='1.0.8.2'/ check type='file' condition='exists' path='%PROGRAMFILES%\UltraVNC\ultravnc.ini' / check type='execute' path='findstr /R /C:passwd=$ %PROGRAMFILES%\UltraVNC\ultravnc.ini NUL' condition='exitcodeequalto' value='1' / check type='execute' path='%ComSpec% /c netsh firewall show allowedprogram | find /I winvnc.exe NUL' condition='exitcodeequalto' value='0' / install cmd='%SOFTWARE%\ultravnc\1.0.8.2\install.cmd'/ upgrade cmd='%SOFTWARE%\ultravnc\1.0.8.2\install.cmd'/ remove cmd='%SOFTWARE%\ultravnc\1.0.8.2\remove.cmd'/ /package /packages #v- and the install.cmd: #v+ @echo off REM Do not export variables SETLOCAL set PROGRAM_NAME=UltraVNC 1.0.8 REM Command to run set CMD32=ultravnc_1.0.8.2_setup.exe set CMD64=ultravnc_1.0.8.2_x64_setup.exe set CMD_PATH=%~dp0 set CMD_OPTS=/loadinf=%CMD_PATH%ultravnc.inf REM Unattended installer set INSTALLER=unattended.cmd set INSTALLER_TYPE=innoinstall set INSTALLER_LOC=%~dp0 :install echo Installing %PROGRAM_NAME% call %INSTALLER_LOC%%INSTALLER% %INSTALLER_TYPE% %CMD32% %CMD64% %CMD_PATH% %CMD_OPTS% set EXIT_CODE=%ERRORLEVEL% :end exit /B %EXIT_CODE% REM End of local variables ENDLOCAL REM Local Variables: REM mode: cmd REM comment-start: REM REM comment-end: REM End: #v- The inf file: #v+ [Setup] Lang=fr Dir=C:\Program Files\UltraVNC Group=UltraVNC NoIcons=0 SetupType=server_silent Components=ultravnc_server_s Tasks= #v- Note for myself: test if I can remove the Dir in the inf file to let the installer detect it automatically ;-) Regards. Footnotes: [1] http://wpkg.org/User:Dad -- Daniel Dehennin RAIP de l'Orne pgpLXNEoHjR0y.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Is it possible to Disable/Hide the Installation progress GUI?
101 101junkst...@googlemail.com writes: Hi Hello, [...] We have the software deploying / installing ok on shutdown but have been asked if it can be run without the Display message being shown? If you were able to hide it (I don't see how), how can you make the difference (and the users) between: - there are updates to install by wpkg, which can take several minutes (like java or big stuff like OOo) - there is a problem with my windows and shutdown hangs As an administrator, you can see it in the logs if you put them on the server, but some users will simply press the button until it's powered off[1]. Footnotes: [1] on ~2500 users, some do it even when they see the messages box ;-) -- Daniel Dehennin RAIP de l'Orne pgpe0EWRqsG0e.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Using BITS to transfer files?
Malte Starostik ma...@malte.homeip.net writes: I can't confirm this. I'm running WPKG off a samba server and the clients access the share with machine credentials just fine. I've granted read access to the Domain Computers group and all is well. And a guest access OK? Without it I have the following error in my samba log file: #v+ guest user (from session setup) not permitted to access this share (wpkg$) #v- I see the connection as: #v+ check_ntlm_password: Checking password for unmapped user []...@[test-machine] with the new password interface #v- When I enable the guest access to my WPKG share, the wpkginst.exe test give me: #v+ Testing complete 2 - OK 1 - failed 5 - not tested Details: Action: Offline mode - connecting to 192.168.123.9 Result: [OK] Message: Action: Connecting to \\horus\wpkg$\wpkg.js as Result: [FAILED] Message: WNetAddConnection2- Échec d'ouverture de session : nom d'utilisateur inconnu ou mot de passe incorrect.[1] Action: Trying to read \\horus\wpkg$\wpkg.js Result: [OK] Message: #v- Regards. Footnotes: [1] User unknown or bad password -- Daniel Dehennin RAIP de l'Orne pgpNdm7vt83Hr.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Breaking package inheritance
Falko Trojahn nospam...@smi-softmark.de writes: I'm sorry, but this would just break a lot of things in wpkg, and I think there have been discussions about that on the list some time ago. Just keep it simple: - Standard Profile * all common things here - Basic Profile, depends on Standard Profile * has Acrobat Reader - Advanced Profile, depends on Standard Profile * has Acrobat Perhaps there could be more fine grained solutions, but this is one possible way how to do what you want. Here we use my patched version[1] of wpkg, for non common applications: - Basic profile for every host (host name='.+' /) - 1 application (or group of application) = 1 profile - 1 profile = 1 LDAP group[1] - 1 machine assigned to some groups (host groups='something' profile-ip='something' / With the use of /applymultiple we can easily manage which host has which application. #v+ ?xml version='1.0' encoding='utf-8'? wpkg !-- Laptops have wifi, so don't disable autoconfig ? -- !-- All hosts -- host name='.+' profile-id='base' /host !-- OS is xp, apply XP specific package (firewall, snetcfg_wxp.exe, ...) -- host os='.+windows xp.+' profile-id='xp' / !-- poweroff -- host groups='poweroff' profile-id='poweroff' / !-- Trend -- host groups='trend' profile-id='officescan' / /wpkg #v- Regards. Footnotes: [1] http://bugzilla.wpkg.org/show_bug.cgi?id=118 [2] This work for samba and AD -- Daniel Dehennin RAIP de l'Orne pgpJEEjlDQrfp.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Deploy different versions of wpkg dependent on XP/Seven
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: [...] Can you: - remove the @echo off in remove.cmd _and_ unattended.cmd - run remove.cmd remove.log - run cmd.exe and do: cd %ProgramFiles(x86)% Regards. -- Daniel Dehennin RAIP de l'Orne pgpzgm63y5flT.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Deploy different versions of wpkg dependent on XP/Seven
zorgman z...@probesys.com writes: Thanks for your help, i will try it to deploy wpkg, but if i can i would like to run minimum of batch script when i install package, and if i have understand, unattended scripts are run every time in packages definition: ?xml version=1.0 encoding=utf-8 ? packages package id='Pidgin' name='Pidgin IM' revision='254' priority='50' reboot='false' !-- Pidgin Instant Messaging -- check type='uninstall' condition='exists' path='Pidgin' / install cmd='%SOFTWARE%\Pidgin v.2.5.4\unattended.cmd' / remove cmd='%SOFTWARE%\Pidgin v.2.5.4\unattended-uninstall.cmd' / upgrade cmd='%SOFTWARE%\Pidgin v.2.5.4\unattended.cmd' / depends package-id='GTK' / /package /packages No: - the install/ is run only if check fails - the upgrade/ is run only if package is installed and revision of package on the server is greater than the local one - remove is run only if package is install and not listed any more in the profile that apply to the machine Is it the best way to manage different OS/Version with WPKG?(but it become more difficult to apply template config from silent installer and to do a simple copy/paste) That's what we use here[1] (name are differents[2]): - a generic engine[3] in each application directory - an install/remove.cmd[4] which is near always the same for all applications Regards, hope it will help. Footnotes: [1] http://wpkg.org/User:Dad#application_layout [2] http://wpkg.org/User:Dad [3] http://wpkg.org/User:Dad#unattended.cmd [4] http://wpkg.org/User:Dad#install.cmd -- Daniel Dehennin RAIP de l'Orne pgpAf4aqDGv5S.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Deploy different versions of wpkg dependent on XP/Seven
zorgman z...@probesys.com writes: Thanks Daniel and Rainer. You're welcome. I think i will change the way i use WPKG to run install/remove script which handle problems. So i have a new question! How to migrate from some packages which match wpkg xml strict usage to unattended.bat method. I have to do again all my packages, and attach it to my profile, and detach old packages, so all packages will be removed and add again? 1. Just change the install / and remove / 2. increment the revision, for example, before '9.4.0', after '9.4.0.1' I usually add .X, with X a number to fix postinstallation things for the same version of the binary, when version is increased, the upgrade / is performed unconditionally. That's why you can choose to: - omit the upgrade for the transitional XML package to avoid reinstallation - put a specific script in upgrade / to just fix things if needed (I usually put my postinstall.cmd for a fix only upgrade) When the upgrade is assumed to be done (with or without a upgrade /), the check are performed, if they succeed, the new package definition is stored in local package database. Regards. -- Daniel Dehennin RAIP de l'Orne pgpZQ4mRhcqpi.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG Users, windows version and LDAP objects support
Terrell, Trey trey.terr...@oregonstate.edu writes: Hi, Hello, I'm Cc'ing the wpkg-user mailing-list as others can be interested by this discussion and show that someone is interested in LDAP matches. I was looking at your modification of WPKG and it seems great. The only issue I can see is that it doesn't seem to support ou checks anymore. Any intent to add that again in the future? Unfortunately, this is a will-not-include case for upstream developers as explained in http://bugzilla.wpkg.org/show_bug.cgi?id=118. New matches are easy to include as you can see in my last patch[1]: - a new variable - a new function - a new command line option - a new entry in showUsage - new tests cases in wpkg-test[2] Regards. Footnotes: [1] http://bugzilla.wpkg.org/show_bug.cgi?id=118#c11 [2] http://lists.wpkg.org/pipermail/wpkg-users/2010-July/006778.html -- Daniel Dehennin pgpTWWr7gYedj.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Extended hosts matches
Falko Trojahn ftroj...@smi-softmark.de writes: thank you, just some minutes ago I unpacked your previous version; I'll try to check your tests into svn, soon. Obviously, test4_hosts_nodes will not work with mainline wpkg.js. Regards. -- Daniel Dehennin RAIP de l'Orne pgp1iXfb3grbm.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Start WPKG service with run at shutdown
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Hello, Hello, I'm using WPKG client on workstations with run on shutdown to avoid user annoyance. [...] Regards. I plan to create a shutdown task, late at night, but I need to permit users to cancel the shutdown if they are using the computer. I found shut it[1] which seems doing what I want, any advice to shutdown computers and permit late workers to prevent (or better delay) the shutdown? Regards. Footnotes: [1] http://www.delphiness.com/software.htm -- Daniel Dehennin RAIP de l'Orne pgp9dVSDyGxGR.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Start WPKG service with run at shutdown
Gerd Ott gerd...@taz.de writes: Hi, Hello, The Pstool psshutdown has an option to allow the shutdown to be aborted by the interactive user too: http://technet.microsoft.com/en-us/sysinternals/bb897541.aspx BTW.: I'm very satisfied running wpkg-client 1.3.14 on shutdown on about 85 xp- and w2k- clients, thanks to the developer. My colleagues administering debian workstations were running software-updates both on shutdown and on startup. This could be useful, if you want to deploy a big installation as openoffice on shutdown and deploy an urgent security-update on startup, but does not work if a machine has been switched off for a long time. Thanks for the feedbacks, any possibility to reshedule the shutdown if canceled by the user or should I create several tasks (for example 23:00, 1:00, 3:00). Regards. -- Daniel Dehennin RAIP de l'Orne pgpSnLQ68flmf.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] XML packages tree
Jason Oster jason.os...@campnavajo.com writes: How else is it supposed to know which xml packages belong to the profiles associated with the host? I'll give you an example from one of my packages: mozilla_extensions.xml This one XML file contains several packages; adblockplus, moretoolsmenu, lightning, contactssidebar, to name just a few. These are extensions for Firefox and Thunderbird. There's no way for WPKG to know where to find those packages, without first parsing all of the XML files. So yes, it is useful to load every package (and then ignore all that aren't a part of the profile being managed). Ok, I didn't think that through. Thanks. -- Daniel Dehennin RAIP de l'Orne pgpsZyj4F7kOy.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] XML packages tree
Hello, I'm wondering if it's possible to get a tree of XML packages like this: zip/ \- 7zip.xml \- quickzip.xml browser/ \- mozilla/firefox.xml \- google/chrome.xml Just using: profiles profile id='base' package package-id='zip/7zip'/ /profile /profiles and using zip/7zip as id in 7zip.xml does not works, neither zip\7zip (windows path separator). Any hints? Regards. -- Daniel Dehennin RAIP de l'Orne pgppJ0PeUTRWw.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Extended hosts matches
Falko Trojahn nospam...@smi-softmark.de writes: [...] Well, up to now, all command line parameters have had their counterpart in config.xml, so no need to specify command line parameters. No, the /host, /query, /install, /remove, /upgrade does not have config.xml couterpart, they have no meaning here. If you really need 'em, you can put a cmdlineparams.txt in a test dir and I'll have a look at testone.cmd, how to read this file (if it exists) into a variable. Maybe a call on a cmdlineparams.cmd to define a variable ? - Use SETLOCAL/ENDLOCAL to avoid environnement pollution - a cmdlineparams.cmd define a variable, like %WPKG_CMD_PARAMS% - in testone.cmd: * IF EXIST %1\%2\cmdlineparams.cmd CALL %1\%2\cmdlineparams.cmd * cscript [...] %WPKG_CMD_PARAMS% But, this way it would be possible to break testone.cmd ... so, let's see how to achieve this. Regards. -- Daniel Dehennin RAIP de l'Orne pgpXnfB1NPyp8.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Removing a dependency, removes all packages in the dependency chain
Rainer Meier r.me...@wpkg.org writes: Hi Stefan, Hello, [...] I will have a look at the logs you sent to me (I received them, thank you). I am going to handle this with medium priority as it seems not to be reproducible at the moment. Please inform me if you have a clear test case where this happens or if it happens again to you. I have the same problem here, with GTK2 and pidgin-2.6.6-no-gtk. I had: host: \- pidgin \- GTK2 With pidgin 2.7.0, there is no no-gtk version any more, so I remove the dependency in pidgin.xml and I have the following: --8---cut here---start-8--- ERROR : Command '%SOFTWARE%\pidgin\2.6.6\remove.cmd was unsuccessful.|Le chemin d'accE8s spE9cifiE9 est introuvable.| ERROR : Exit code returned non-successful value: -1|Package: Pidgin.|Command:|%SOFTWARE%\pidgin\2.6.6\remove.cmd ERROR : Could not process (remove) Pidgin.|Package still installed. ERROR : Removal of depending packages for 'GNOME Tool Kit' (gtk2) failed. Removal of depending package 'Pidgin' (pidgin) failed ERROR : Failed to remove package which depends on 'GNOME Tool Kit (gtk2), skipping removal.|You might use the /force flag to force removal but remember that the package depending on this on ERROR : Could not process (remove) GNOME Tool Kit.|Package still installed. --8---cut here---end---8--- My problem is that pidgin 2.6.6 is not available anymore since I distribute 2.7.0. Regards. -- Daniel Dehennin RAIP de l'Orne pgpgM0dInYlHb.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Removing a dependency, removes all packages in the dependency chain
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: [...] I have the same problem here, with GTK2 and pidgin-2.6.6-no-gtk. I had: host: \- pidgin \- GTK2 With pidgin 2.7.0, there is no no-gtk version any more, so I remove the dependency in pidgin.xml and I have the following: [...] My problem is that pidgin 2.6.6 is not available anymore since I distribute 2.7.0. To be really clear, if a dependency is removed, it's normal to remove the depending package (it's not supposed to work without it's dependency), but it may not do so if this one is in upgrade (which may remove the dependency) ? Regards. -- Daniel Dehennin RAIP de l'Orne pgpyCEpunl0E8.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Start WPKG service with run at shutdown
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Hello, Hi again, I'm using WPKG client on workstations with run on shutdown to avoid user annoyance. [...] Is it possible to make synchronisation happened when WPKG client is configured to run at shutdown? I really do not want to schedule a reboot at night since some computer should not be restarted every day (some server application must run). I looked at the possibility to send a specific signal to WPKG client but taskkill is not like linux kill :-/ Any idea? Regards. -- Daniel Dehennin RAIP de l'Orne pgp77bYxLYkQH.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Extended hosts matches
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: [...] I change testall.cmd to run tests in order: [...] Oops, I send it to fast, in fact I have a problem, I need to specify command-line parameters to wpkg.js to fix host name, ip address, domain name and group. I found to way to do so in the current wpkg-test, any idea? Regards. -- Daniel Dehennin RAIP de l'Orne pgpKQUbyS94et.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Extended hosts matches
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Mea culpa, I did not replace the wpkg.js in wpkg-test directory, works with 1.1.3-RC3 And with extended-host patched wpkg.js and factorize-*. Thanks. -- Daniel Dehennin RAIP de l'Orne pgpEaPaDNmw4G.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] wpkg.js TODO list
Hello, Before looking at wpkg-test, I publish my wpkg.js improvements TODO list. My next work will be to use generic option handling with minimal type validation: - boolean - string - number - list (array object or comma separated string) The idea is to use argv/argn in one place and avoid long series of if(argn...) and if(isArgSet...). Each call (17 in total) to isArgSet loops through argv, I plan to replace it with 1 loop on argn, this will permit to detect unknown or misspelled arguments. Regards. Factorize options handling [0/4] Author: Daniel Dehennin Date: 2010-06-01 14:11:46 CEST Table of Contents = 1 Define global Option associative array 2 Define wrapper functions [0/5] 2.1 AddOpt(name, type, default): define or overwrite an option 2.2 isOpt(name): return true if option is defined, false otherwize 2.3 getOpt(name): get the value of an option 2.4 getOptType(name): get the type of an option (boolean, string, number, list) 2.5 setOpt(name, value): set a new value of an already defined option 3 Replace getArgv/argv/argn uses by getOpt()/setOpt() [0/5] 3.1 main() 3.2 getConfig() 3.3 getProfileList() 3.4 initialize() 3.5 parseArguments() 4 Remove useless isArgSet 1 TODO Define global Option associative array ~~ The Option array store all the config.xml and command-line parameters options. 2 TODO Define wrapper functions [0/5] ~~ Wrappers must works without log facilities = throw errors. 2.1 TODO AddOpt(name, type, default): define or overwrite an option Each option in an entry in Option array like: Option[name] = new Array(type, default) 2.2 TODO isOpt(name): return true if option is defined, false otherwize 2.3 TODO getOpt(name): get the value of an option == The option value is =Option[name][1]=. 2.4 TODO getOptType(name): get the type of an option (boolean, string, number, list) = The type is =Option[name][0]=. 2.5 TODO setOpt(name, value): set a new value of an already defined option === Use addOpt to store the new value. Throw an error if the option is not already defined because getOptType is undefined otherwize. 3 TODO Replace getArgv/argv/argn uses by getOpt()/setOpt() [0/5] ~ 3.1 TODO main() 3.2 TODO getConfig() = 3.3 TODO getProfileList() == 3.4 TODO initialize() == 3.5 TODO parseArguments() == - Loop for boolean arguments in argv, report warning for unknown boolean (indexOf(:)==-1) - Loop for non boolean arguments in argn, report warning for unknown non boolean (value==undefined). 4 TODO Remove useless isArgSet ~~~ -- Daniel Dehennin RAIP de l'Orne pgpleBjqxFfLO.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Extended hosts matches
Rainer Meier r.me...@wpkg.org writes: Hi Daniel, Hello, I'm using my patched WPKG in test labs for sometimes now and give advices of your comments. [...] Feel free to prepare a patch for a current version of WPKG. Personally I've expressed many times on the list already why I think the way it's done is not the right one. A summary: - LDAP/AD link introduces a new communication channel to wpkg.js which is prone to errors. My patch does not use LDAP query, WMI (already used by WPKG) to get domain name and WinNT provider[1] to query groups. No LDAP so no 'ou' match, this can be overcomed by computer group membership. - A lot of non-portable code with quite high potential to break something needs to be introduced. My patches are tested on WinXP and Win7, I have no win2k to test, neither win9x if it should be supported. - Most users are using WPKG witout AD, so a few users will have to suffer from bugs introduced for a couple of AD users. The previous patch seems quite AD specific (no samba/LDAP support), the use of WinNT provider works on both. Non member computers work fine in two ways: - no domain name and no group membership matches - specify a domainname in config.xml, with WPKG client connected to your server (because no netlogon can be used) WinNT group membership can works, you only need a minimal computer account (in samba/LDAP smbldap-useradd -w machine$ smbldap-groupmod -m machine$ group1) - Export scripts written in Perl are already available to export AD structures to WPKG XML structures. I'm using samba/LDAP and need to manage hundred separate servers and a total of thousand of client computers. I prefer to use native LDAP replication and group management than modifying hundreds of hosts.xml and profiles.xml. - /applymultiple switch introduces complexity and breaks quite a lot of existing installations if used without caution. Moreover there is no scenario known to me which cannot be done without this functionality using existing functionality. /applymultiple is disabled by default and WPKG works as expected. When enabling /applymultiple I can, with group management, dissociate the computer name and the profile, for our use, name match is very restrictive. Group management permit: 1 group == 1 profile, then we can have generic profiles across all the servers, what ever the name policy is, if a computer belong to the OfficeScan group, OfficeScan profile is applied. If another site use another antivirus, no problem, we can deploy both profiles on all sites, group match does the job. - Code posted in Bugzilla is not portable for different AD structures or generic LDAP servers. No LDAP support in my patches. So feel free to create a patch for the current version of WPKG which might be applied for these users who need it. I am personally OK with the delivery of this patch even as part of the official shipment but I don't plan yet to introduce this code in the stable release of WPKG. I tried to make my code acceptable in mainline, it needs work to permit OS match for example: - 1 new function getHostOS - 1 new attribute in the host array - 1 call to getHostOS in gatherHostInfos - modify hosts.xsd to add the new attribute The getHostsApplying is generic, this is the place which receive the more change and where the WPKG behaviour may have changed. getHostsApplying use exclusively regex match and is generic about attributes match, it loops over all hosts.xml attributes and tests them against the host array (which could be renamed computer to avoid any ambiguity). The only specific stuff in it is the compatibility code to test IP addresses against the name attribute. I'm really enthusiastic about this features, I do not implement all the previous attempt did but group matches is the most useful to me. A computer/user mode is interesting too, specially for a non GPO capable server like samba: - run at system level for computer management - run at user level for user management But I'm concerned about maintaining a looks-like forked wpkg.js, my free software experience tells me go mainline! ;-) Regards. Footnotes: [1] http://msdn.microsoft.com/en-us/library/aa772237%28v=VS.85%29.aspx -- Daniel Dehennin RAIP de l'Orne pgpHtxfrninax.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Java hanging on install
Andrew Struiksma astruik...@nwesd.org writes: I found the attached script (uninstall_java.cmd) which seems to do a good job of uninstalling all previous versions of Java in a more efficient way. Thanks a lot, this gives me idea for the following 15 lines JScipt which list the UUIDs of the J2SE. Regards. -- Daniel Dehennin RAIP de l'Orne var UUIDS = new Array(); var objFSO = WScript.CreateObject(Scripting.FileSystemObject); var strComputer = .; var WMIServiceStr = winmgmts:{impersonationLevel=impersonate}!.\\root\\cimv2; var objWMIService = GetObject(WMIServiceStr); var colSoftware = objWMIService.ExecQuery (Select * from Win32_Product Where Description LIKE 'J2SE%'); for ( var Item=new Enumerator(colSoftware); !Item.atEnd(); Item.moveNext() ) { var item = Item.item(); UUIDS.push(item.IdentifyingNumber); // WScript.Echo( item.Caption // + + item.Description // + + item.IdentifyingNumber // + + item.InstallDate2 // + + item.InstallLocation // + + item.InstallState // + + item.Name // + + item.PackageCache // + + item.SKUNumber // + + item.Vendor // + + item.Version // + \n // ); } WScript.Echo(UUIDS.join(\n)); pgpy7uH4NUe7g.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Java hanging on install
Andrew Struiksma astruik...@nwesd.org writes: I tried your JS but it didn't show that I had any JRE installed but I do have the newest version. It was the where clause of the query, J2SE does not work for recent java installation ;-) I had trouble getting good results from WMI scripts so that is why I switched to searching the uninstall area of the registry itself. Finally, this does not perform better, according to WPKG debug log: - dos and jscript extraction takes 20s - msiexec listing all 1.5 and 1.6 takes 7s - Java installation takes 5mn I hope I'm done with java hanging more than WPKG timeout (30mn), it takes 30s to check everything in our installation, full working installation takes 15mn (mostly OOo + adobe reader + OfficeScan antivirus). Thanks a lot for your comments and your help. -- Daniel Dehennin RAIP de l'Orne pgp4MlICiZKFj.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Java hanging on install
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Hello, Hello, I have problem with the Java installation, it hangs indefinitely. I'm using bat script to avoid pain-to-read XML packages, my problem seems to come from my preinstallation with the removal of all the previous versions: msiexec /qn /norestart /x {7148F0A8-6813-11D6-A77B-00B0D0142000} [...] msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216019FF} Any idea why it hangs? Regards. -- Daniel Dehennin RAIP de l'Orne pgpKQy753R1SV.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Java hanging on install
Troy Hamilton troy.a.hamil...@gmail.com writes: Daniel, I had the exact same problem until I explicitly killed jqs.exe before trying to uninstall the old versions. Like Marc suggested, this is the first command that I run: taskkill /f /im jqs.exe /im iexplore.exe /im firefox.exe WPKG client is run when the computer is shutdown, so iexplore and firefox are (should?) be down, I use: REM Stop Quick Starter service if any net STOP JavaQuickStarterService 2 NUL NUL echo Disable Java Quick Starter %ProgramFiles%\Java\jre6\bin\jqs.exe -unregister Before running msiexec calls... I'll test the output redirections to see if there is an improvement, and then add the taskkill. I'll finally understand what's happenning ;-) Thanks. -- Daniel Dehennin RAIP de l'Orne pgpqf0IsEusaR.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js TODO list
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Hello, Hello, I'm working on wpkg.js as you saw, I know Rainer Meier want to restructure the code for 1.2 and before going forward I want to submit my TODO list for review. Ok, I just did 1.2 and fix my TODO list for 1.3 and I'm wondering if it's better or not to define setHostInfo and getHostInfo instead of direct array access? I attach 2 patches. NB: I'm tracking my changes in bzr repositories, you can follow them with: - basic layout: mkdir wpkg/{,upstream,branches} bzr --init-repository --2a wpkg - upstream 1.1: bzr branch http://www.baby-gnu.org/~nebu/archives/wpkg/upstream/1.1 wpkg/upstream/1.1 - extended host (useless as it's the base of the following one): bzr branch http://www.baby-gnu.org/~nebu/archives/wpkg/branches/extended-hosts wpkg/branches/extended-hosts - my developpement branch (based on extended-hosts): bzr branch http://www.baby-gnu.org/~nebu/archives/wpkg/branches/dad wpkg/branches/dad -- Daniel Dehennin RAIP de l'Orne === modified file 'wpkg.js' --- wpkg.js 2010-05-17 07:02:40 + +++ wpkg.js 2010-05-19 12:08:42 + @@ -433,10 +433,11 @@ var packagesRemoved = new Array(); /** host properties used within script */ -var hostname = null; -var domainname = null; -var ipaddresses = null; -var hostgroups = null; +var host = new Array(); +host.name = null; +host.domainname = null; +host.ipaddresses = null; +host.groups = null; /** FS object where the settings are stored */ var settings_file = null; @@ -1605,15 +1606,15 @@ * be overwritten by the /host:hostname switch. */ function getHostname() { - if (hostname == null) { + if (host.name == null) { var WshNetwork = WScript.CreateObject(WScript.Network); setHostname(WshNetwork.ComputerName.toLowerCase()); } - return hostname; + return host.name; } function getDomainName() { -if (domainname == null) { +if (host.domainname == null) { var strComputer = getHostname() ; var WMIServiceStr = winmgmts:{impersonationLevel=impersonate}! @@ -1629,17 +1630,17 @@ } else { var First = items.item(); -domainname = First.Domain.toLowerCase(); -dinfo(Domain Name: + domainname); +host.domainname = First.Domain.toLowerCase(); +dinfo(Domain Name: + host.domainname); } } -return domainname; +return host.domainname; } function getHostGroups() { -if (hostgroups == null) { +if (host.groups == null) { try { -hostgroups = new Array(); +host.groups = new Array(); var HostName = getHostname(); var DomainName = getDomainName(); var obj = GetObject(WinNT://+DomainName+/+HostName+$,user) ; @@ -1647,14 +1648,14 @@ for (var item =new Enumerator(Groups); !item.atEnd(); item.moveNext() ) { var group = item.item(); dinfo(Found computer group: + group.Name); -hostgroups.push(group.Name); +host.groups.push(group.Name); } } catch (e) { dinfo(Message: Error fetching computer groups.); } } -return hostgroups; +return host.groups; } /** @@ -1725,7 +1726,6 @@ // get properties of machine running this script (some can // also be defined by command line switches) -var host = new Array(); host.name = getHostname(); host.ipaddresses = getIPAddresses(); host.domainname = getDomainName(); @@ -4464,7 +4464,7 @@ * @param newHostname host name to be used */ function setHostname(newHostname) { - hostname = newHostname; + host.name = newHostname; } /** @@ -5653,15 +5653,15 @@ } if (argn(ip) != null) { - ipaddresses = new Array(argn(ip)); + host.ipaddresses = new Array(argn(ip)); } if (argn(domainname) != null) { - domainname = argn(domainname); + host.domainname = argn(domainname); } if (argn(group) != null) { - hostgroups = new Array (argn(group)); + host.hostgroups = new Array (argn(group)); } // Process log file pattern @@ -6361,8 +6361,8 @@ * @return array of IP address strings, array can be of length 0 */ function getIPAddresses() { -if (ipaddresses == null) { - ipaddresses = new Array(); +if (host.ipaddresses == null) { + host.ipaddresses = new Array(); var shell = new ActiveXObject(WScript.Shell); @@ -6385,7 +6385,7 @@ // read DHCP address var dhcpIP = getRegistryValue(regBase + DhcpIPAddress
Re: [wpkg-users] wpkg.js TODO list
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Hello, Hello, Ok, I just did 1.2 and fix my TODO list for 1.3 and I'm wondering if it's better or not to define setHostInfo and getHostInfo instead of direct array access? 3 new patches for review, tell me if you prefer: - feature requests on bugzilla with patches - pushing on some SVN repository[1], if so, how? Regards. NB: - my developpement branch (based on extended-hosts): bzr branch http://www.baby-gnu.org/~nebu/archives/wpkg/branches/dad wpkg/branches/dad Footnotes: [1] bzr-svn plugin do that very well for me on some projects. -- Daniel Dehennin RAIP de l'Orne === modified file 'wpkg.js' --- wpkg.js 2010-05-19 13:00:03 + +++ wpkg.js 2010-05-19 22:15:12 + @@ -1659,7 +1659,8 @@ } /* - * Gather all the computer informations in one pass + * Gather all the computer informations in one pass. + * Throw an error if none are defined. * * @return the host associative array */ @@ -1668,6 +1669,15 @@ getIPAddresses(); getDomainName(); getHostGroups(); + +if ( host.name == null ) { + throw new Error(No host name defined!); +} +if ( host.domainname == null + (host.ipaddresses == null || host.ipaddresses.length = 0) + (host.groups == null || host.groups.length = 0) ) { + throw new Error(No host information gathered!); +} return host; } @@ -1739,10 +1749,6 @@ // get properties of machine running this script (some can // also be defined by command line switches) - if(host.name == null) { - // Error! Lack of host name. - throw new Error(Error! Lack of host name!); - } dinfo(Host properties:\n + name = + host.name + \n + ipaddresses = + host.ipaddresses.join(, ) + \n === modified file 'wpkg.js' --- wpkg.js 2010-05-19 22:15:12 + +++ wpkg.js 2010-05-19 22:29:36 + @@ -1605,20 +1605,19 @@ * Returns the hostname of the machine running this script. The hostname might * be overwritten by the /host:hostname switch. */ -function getHostname() { +function getHostName() { if (host.name == null) { var WshNetwork = WScript.CreateObject(WScript.Network); - setHostname(WshNetwork.ComputerName.toLowerCase()); + host.name = WshNetwork.ComputerName.toLowerCase(); } return host.name; } function getDomainName() { if (host.domainname == null) { -var strComputer = getHostname() ; var WMIServiceStr = winmgmts:{impersonationLevel=impersonate}! -+ strComputer + \\root\\cimv2; ++ host.name + \\root\\cimv2; var objWMIService = GetObject(WMIServiceStr) ; var QueryRes = objWMIService.ExecQuery(Select * from Win32_ComputerSystem where PartOfDomain=True ); @@ -1641,9 +1640,7 @@ if (host.groups == null) { try { host.groups = new Array(); -var HostName = getHostname(); -var DomainName = getDomainName(); -var obj = GetObject(WinNT://+DomainName+/+HostName+$,user) ; +var obj = GetObject(WinNT:// + host.domainname + / + host.name + $,user) ; var Groups = obj.Groups(); for (var item =new Enumerator(Groups); !item.atEnd(); item.moveNext() ) { var group = item.item(); @@ -1665,7 +1662,7 @@ * @return the host associative array */ function gatherHostInfos() { -getHostname(); +getHostName(); getIPAddresses(); getDomainName(); getHostGroups(); @@ -1854,7 +1851,7 @@ } } if (applyingHostNodes.length == 0) { - throw new Error(Could not find profile for host + getHostname() + .); + throw new Error(Could not find profile for host + host.name + .); } } return applyingHostNodes; @@ -2658,7 +2655,7 @@ } if (profilesApplying.length = 0) { -throw new Error(Could not find any profile for host + getHostname() + .); +throw new Error(Could not find any profile for host + host.name + .); } } } @@ -4472,16 +4469,6 @@ } /** - * Set a new host name which will be used by the script. This is uesful for - * debugging purposes. - * - * @param newHostname host name to be used - */ -function setHostname(newHostname) { - host.name = newHostname; -} - -/** * Sets a new profile-id attribute to the given host XML node * * @param hostNode the host XML node to modify @@ -5534,7 +5521,7 @@ second = 0 + second; } - var logFileName = getLogfilePattern().replace(new RegExp(\\[HOSTNAME\\], g), getHostname()); + var logFileName = getLogfilePattern().replace(new RegExp
[wpkg-users] wpkg.js TODO list
Hello, I'm working on wpkg.js as you saw, I know Rainer Meier want to restructure the code for 1.2 and before going forward I want to submit my TODO list for review. Regards. -- Daniel Dehennin RAIP de l'Orne Things to do [0/2] == Author: Daniel Dehennin Date: 2010-05-17 13:44:58 CEST Table of Contents = 1 Factorize host informations [0/4] 1.1 Use an host associative array [0/8] 1.1.1 getHostname 1.1.2 getDomainName 1.1.3 getHostGroups 1.1.4 getHostsApplying = avoid local variable in read-only access 1.1.5 setHostname 1.1.6 parseArguments 1.1.7 getIPAddresses 1.1.8 getProfileList 1.2 Define function gatherHostInfos [0/1] 1.2.1 initialize gather all the host informations 1.3 Define functions getHostInfo(attribute) and setHostInfo(attribute, value) [0/7] 1.3.1 getDomainName = use getHostInfo(name) 1.3.2 getHostGroups = use getHostInfo(name) and getHostInfo(domainname) 1.3.3 parseArguments = use setHostInfo 1.3.4 initialize = use getHostInfo(name) or associative array directly 1.3.5 notify = use getHostInfo(name) or associative array directly 1.3.6 Remove useless getHostname 1.3.7 Remove useless setHostname 1.4 getDomainName = setDomainName [0/2] 1.4.1 getHostGroups = use getHostInfo(domainname) 1.4.2 gatherHostInfos = use getHostInfo(domainname) 2 Factorize getPackageCmd* [0/2] 2.1 Define getPackageCmd(packageNode, cmd) [0/2] 2.1.1 removePackage = use getPackageCmd(packageNode, remove) 2.1.2 installPackage = use getPackageCmd(packageNode, upgrade|install|downgrade) 2.2 Remove useless getPackageCmdDowngrade, getPackageCmdInstall and getPackageCmdRemove pgpXbR5gGX2VC.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js TODO list
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Well, I need to make some tests, but with: var hostAttributes = new Array(); hostAttributes.name = hostname; hostAttributes.groups = somegroup; You can not know if the array is empty or not because these attributes does not modify hostAttributes.length[1]. I use an Scriptint.Dictionary because I needed the .count to test for null host /. I'll give a try to {}. Ok, {} is the same as new Object(); var hostAttributes = new Object(); is equivalent to var hostAttributes = {}; So, no .length attribute, I'm stuck with Scripting.Dictionary or I need to define some hash_length() function to loop over all attributes and count them. Regards. -- Daniel Dehennin RAIP de l'Orne pgpyScowXmUTr.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Excluding particular OS and architecture types from patch application
heiko.hel...@horiba.com writes: [...] Hmm... what do you think of adding conditionals to the install-command utilizing the check syntax that's already there anyways... something like this install cmd='install-x86' conditional='true' check type=registry condition=equals path='HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE' value=x86 / /install install cmd='install-x64' conditional='true' check type=registry condition=equals path='HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE' value=AMD64 / /install [...] For OS specific packages (like system parameters), extending the profiles seems to me a good idea (the thing I should work one). About OS specific packages I use unattended.cmd[1] and a special (OS based) layout: software/version/ install.cmd remove.cmd unattended.cmd OS/exe or msi I set the %CMD_PATH% variable in install.cmd based on OS like this: ver | find version 5.1 ( SET CMD_PATH=%CMD_PATH%winxp ) Regards. Footnotes: [1] http://wpkg.org/User:Dad -- Daniel Dehennin RAIP de l'Orne pgpgDVpW8JQTp.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Java hanging on install
Marc Hennes m...@financial.com writes: Try to kill jqs.exe as first command. That worked for me. I do like on the wiki: net STOP JavaQuickStarterService 2 NUL NUL Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Localised configuration
Hello, I'm asking here because I find nothing on internet. With win7, the netsh advfirewall replace netsh firewall. I define some cmd scripts to configure this but I have a problem with localised rule names. Does someone have a hint to bypass this issue (like numerical IDs)? Thanks. -- Daniel Dehennin RAIP de l'Orne pgpC6bf7NM0HS.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Extended hosts matches
Rainer Meier r.me...@wpkg.org writes: I personally don't feel this to be much less complex. On the other side I am not fully against the system attribute - but I think it might be even more helpful [...] However I am thinking about some basic OS version matching within the profile (and maybe within the host database as well). My version specific stuffs are mainly windows configurations (services, network settings, firewalls, …) some of them which works on winXP does not on win7. And here the bad side-effects usually start. There is only a very limited number of people out there able to read and test this code. Debugging will get harder and changes to break something increase. More over we know that WSH is not supported by Microsoft any more. It might happen that WSH scripts will not get access to specific objects in the future if Microsoft changes the security settings. As I said accessing LDAP/AD from WPKG introduces a change in the basic architecture. Remember that wpkg.js is executed on the client. Currently in most installation the only communication done by wpkg.js to the servers is SMB/CIFS file system access (fetching XML, fetching data). Adding LDAP/AD support requries WPKG to communicate from the client directly with LDAP servers. This is pretty likely to introduce issues with firewalls and other network issues. I'm not sure to understand everything but GetObject(WinNT://) does not use LDAP (that what tcpdump told me), so no need to configure base-dn, bind credential, I think that what ever backend you have (samba/openLDAP, AD, NT4) it should work. What is also not clear to me is the way AD is accessed. As far as I know AD does not allow anonymous binding. So either WPKG has to read credentials from config.xml or get it via parameters. Parameters is a bad idea since updating the credentials would require deploying new settings to all clients. But config.xml would also be critical since the credentials would have to be protected because they might be abused to get access (at least read-only) to AD. In any case this second communication channel to servers for sure introduces quite a lot of potential problems. If we start to support it I am sure users in larger-scale installations will also ask for advanced features like load-balancing and fault-tolerance/fallback on LDAP servers. I define tow functions getDomainName() and getHostGroups() in wpkg.js, I call getHostGroups just after main:saveEnv(). The attached JS script define the tow functions and permit to test without running the whole wpkg.js, I saw that: - getHostGroups works only if: * we have a SMB/CIFS connection to a server * the computer is defined on the server: no need to join the workstation to the domain (smbldap-useradd -W computername$ is sufficient) - getDomainName returns: * The domain name of a domain member with WMI * The configured domain (TODO: use config.xml to define it) if the workstation is not a domain member Again, it needs some tests against AD. Does it look more acceptable to you? Regards. -- Daniel Dehennin RAIP de l'Orne // FIXME handle in config.xml var ConfiguredDomain = mydomain; // To avoid searchreplace function dinfo(msg) { WScript.Echo(msg); } function getHostname() { var WshNetwork = WScript.CreateObject(WScript.Network); dinfo(Host name: + WshNetwork.ComputerName.toLowerCase()); return WshNetwork.ComputerName.toLowerCase(); } function getDomainName() { var strComputer = . ; var DomainName = null; var WMIServiceStr = winmgmts:{impersonationLevel=impersonate}! + strComputer + \\root\\cimv2; var objWMIService = GetObject(WMIServiceStr) ; var QueryRes = objWMIService.ExecQuery(Select * from Win32_ComputerSystem where PartOfDomain=True ); var items=new Enumerator(QueryRes); items.moveFirst(); if (items.atEnd() ) { // Not a domain member if ( ConfiguredDomain != null ConfiguredDomain != ) { dinfo(Not a domain member, use + ConfiguredDomain + as configured in config.xml.); DomainName = ConfiguredDomain; } else { throw new Error(Not a domain member and no domain configured in config.xml.); } } else { var First = items.item(); DomainName = First.Domain.toLowerCase(); dinfo(Domain Name: + DomainName); } return DomainName; } function getHostGroups() { try { var DomainName = getDomainName(); var HostName = getHostname(); var obj = GetObject(WinNT://+DomainName+/+HostName+$,user) ; var Groups = obj.Groups(); for (var item =new Enumerator(Groups); !item.atEnd(); item.moveNext() ) { var group = item.item(); dinfo(Computer group: + group.Name); } } catch (e) { dinfo(Message: Error fetching computer groups.); } } getHostGroups(); // Local Variables
Re: [wpkg-users] Extended hosts matches
Rainer Meier r.me...@wpkg.org writes: Feel free to prepare a patch for a current version of WPKG. Personally I've expressed many times on the list already why I think the way it's done is not the right one. A summary: [...] - /applymultiple switch introduces complexity and breaks quite a lot of existing installations if used without caution. Moreover there is no scenario known to me which cannot be done without this functionality using existing functionality. The problem I see with the actual functionality is that when using extended host matches, I need to list all the meanfull combinations. I need a different profile for winXP and win7 system configurations, If I want to use different profile for winXP and win7 both members of the appli1 group, I will need: - host system=xp group=appli1 profile id='base'/ profile id='winxp'/ profile id='application1'/ /host - host system=win7 group=appli1 profile id='base'/ profile id='win7'/ profile id='application1'/ /host With /applymulti, this should become: - host system=xp profile-id=winxp/ - host system=win7 profile-id=win7/ - host group=appli1 profile-id=appli1/ - host name=.+ profile-id=base/ So feel free to create a patch for the current version of WPKG which might be applied for these users who need it. I am personally OK with the delivery of this patch even as part of the official shipment but I don't plan yet to introduce this code in the stable release of WPKG. I'll explain what I want to do, you will tell me if I'm crasy ;-) We have 200 samba/LDAP servers so AD specific stuffs are out of question. We want to mix global and local policies, we found easier to manage LDAP entries than editing files or doing croned extraction. We push generic configuration files with rsync, using only host names is quite complicated, for now we have a basic profile which applies to host name '.+'. Using groups seems simpler than host name for policies, if we want to deploy a new profile, we want to: - add a new group - assign computers to this group - send the profiles/group.xml - send the hosts/group.xml In the future we plan to have pattern matching and references like: - All groups can have associated profiles: host group=(.*) profile-id=$1/ We only need the following properties: - hostname - ipaddresses - hostsystem - hostgroups - username - usergroups For now, I'm trying to use WinNT:// to list group membership of my computer, I test the following js code: --8---cut here---start-8--- var WshNetwork = WScript.CreateObject(WScript.Network); var DomainName = WshNetwork.UserDomain.toLowerCase(); var ComputerName = WshNetwork.ComputerName.toLowerCase(); var DomainComputerName = ComputerName + $; var obj = GetObject(WinNT://+DomainName+/+DomainComputerName+,user) ; var Groups = obj.Groups(); for (var item =new Enumerator(Groups); !item.atEnd(); item.moveNext() ) { var group = item.item(); WScript.Echo(group.Name); } --8---cut here---end---8--- This does not require LDAP stuffs, the only thing I wonder is if it's AD compatible. Can someone with an AD test it and tell me if it works? For Version 1.2 I plan to restructure quite a lot of code where it might be possible to extend the functionality - maybe by referring to eternal scripts. Is it possible to have a look at development? What do you think about the following (standard?) SVN layout: - trunk : development - branches/X.Y/fix#: X.Y bugfix development branch (copy of X.Y.Z which introduce the bug) - tags/X.Y.Z: stable branch I know that wpkg.js is intended to be used as-is with the blending edge version, but I think it's a good thing to publish non-finished development and actual stable, people will use what ever they want/need. Regards. -- Daniel Dehennin RAIP de l'Orne pgpzsiQCWKdk1.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] windows 7 compatibility
soomon soo...@gmail.com writes: hey there, Hello, just saw wpkg and i like it and want to use it for software deployment. we have windows xp and windows 7 machines here. on xp everything works fine but when wpkg runs on a w7 machine windows displays a message saying sth. like a program wants to display a message, click here to view it. i am using the lastest client from the homepage (1.3.9). I'm using 1.3.14 on win7 with run at shutdown and the WPKG client window is not displayed (it is on winXP). Regards. -- Daniel Dehennin RAIP de l'Orne pgp1cmqMBavJ1.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] windows 7 compatibility
Tomasz Chmielewski man...@wpkg.org writes: I'm using 1.3.14 on win7 with run at shutdown and the WPKG client window is not displayed (it is on winXP). As per what Rainer mentioned, the message is about a window opened by the program installer, not WPKG Client. Ok, any idea how to show the WPKG client window, I need it to try to avoid users holding the power button 4s because it's not fast enought? Regards. -- Daniel Dehennin RAIP de l'Orne pgp14X8vgosBP.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Extended hosts matches
Hello, I saw a patch to extend hosts.xml, what is the status of this patch? Is it planned to integrate it in wpkg.js? I don't want to name my computer based on OS version or what ever. Regards. -- Daniel Dehennin RAIP de l'Orne pgpq5L7dBb1k4.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Run script in elevated mode
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Hello, To conclude my thread (maybe someone will be interested): It seems finally that I need to open a new connection in the elevated sub-command. [...] So I can not run my cmd scripts from a network share, great :-/ [...] I find a solution, well a workaround, I run the following command: cscript /Nologo execute-elevated.js %ComSpec% /c net use \\myserver %0 %* This open a cmd window, I need to type a login and a password and my script is ran with elevated rights, this simplify a lot the setup of a win7: 1. fresh install of win7 2. connect with local user 3. open a connection to the server (with network login/pass) 4. double clic on the installation script (integration + WPKG installation + stuffs) 5. confirm UAC 6. type the login/pass to open a new connection to the server 7. let the script to the job Set 5 and 6 are added by win7 compared to winXP. One question remains, how can a script test if it's running with elevated rights? Regards. -- Daniel Dehennin RAIP de l'Orne pgpqAin8nuFYF.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Run script in elevated mode
Rainer Meier r.me...@wpkg.org writes: Hi Daniel, Hello, Probably you just need to verify the paths. If I am not mistaken INSTALLER_LOC is set to %~dp0 which means it points to the path from which you call install.cmd. So you need to make sure that the script called (%INSTALLER_LOC%%INSTALLER%) is stored within the same directory. If it's not you need to change the path to the installer (unattended.cmd). It's ok, I have a copy of unattended.cmd on each installation folder, so I can copy it to an USB key and run install.cmd on a non WPKG computer. Please also keep in mind that if you run an elevated command this command will run with different user credentials. Make sure that you're providing access to the elevated user to the share as well. That's strange, I only need this on non WPKG computer as I use WPKG client, when running elevated commands I do not need to type a login/password, just to confirm with the OK button. It seems finally that I need to open a new connection in the elevated sub-command. I made some tests to run %ComSpec% in elevated mode: 1. Right clic - run as administrator with the following script === @echo off start /wait elevated %ComSpec% /c echo TEST %TMP%\result.txt === - I need to confirm the elevation (UAC) - the window open and close immediatly, the result.txt contains (approximately translated): No such file. 2. Using execute-elevated.js with normal double clic: === @echo off start /wait elevated cscript /Nologo execute-elevated.js %ComSpec% /c echo TEST %TMP%\result.txt === - I need to confirm the elevation (UAC) - the window open and close immediatly, the result.txt contains: TEST I tried with net use to see if my open connection is here: start /wait elevated cscript /Nologo execute-elevated.js %ComSpec% /c net use %TMP%\result.txt - the result.txt contains (approximately translated): empty list So I can not run my cmd scripts from a network share, great :-/ I put echo DEBUG %TMP% at the top of unattended.cmd and see that nothing is created, so the script is not called. Probably because either the path is wrong or the elevated user does not have access to the share. Unfortunately you did not express your use-case. Usually it's much more convenient to just run wpkg.js elevated so its elevation is inherit by sub-processes. If you use execute-elevated.js for individual packages you would have to provide credentials for each single package. Here it's usually not even required to use execute-elevated.js since you will be able to run wpkg.js unelevated and installers will usually ask for elevation as needed (unless Windows does not recognize the installer and it misses a proper manifest). I only need this for non-WPKG computers, I have an install_computer.cmd which run a list of cmd scripts to install the bare applications on a computer, I thought I could : - open a connection to my server (run - \\myserver) - on my install_computer.cmd: right clic - run as administrator The idea was (in the install_computer.cmd) : - test if I am in elevated mode (I don't find how to test it) - if not, call myself wrapped in execute-elevated.js (cscript execute-elevated.js %0 %*) - call all the needed cmd scripts which inherit elevated mode (as far as I understand) I can not expect the system to do the right thing, I run pre-post script with my unattended.cmd (an improvement of your install.cmd ;-)) to add/remove some registery keys, remove some folder for application which let some after uninstall, etc. I tried to use runas with /trustlevel but I did not manage to use it :-/ If someone have an idea, for now it seems that I need to copy everything locally and run from here :-/ Regards. -- Daniel Dehennin RAIP de l'Orne pgpIPcs9rdUrM.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Run script in elevated mode
Hello, I'm using scripts[1] to install applications, I want to modify my install.cmd to wrapp the unattended.cmd call with execute-elevated.js I have a problem, tested with win7, in install.cmd : - set ELEVATE=\\myserver\PATH\TO\execute-elevated.js - replace: call %INSTALLER_LOC%%INSTALLER%... with: cscript /Nologo %ELEVATE% %INSTALLER_LOC%%INSTALLER%... When I run: \\myserver\PATH\TO\install.cmd: - I get the UAC prompt, I select OK - a new cmd window is open and immediatly closed, nothing is installed I put echo DEBUG %TMP% at the top of unattended.cmd and see that nothing is created, so the script is not called. Any hints or idea? Regards. Footnotes: [1] http://wpkg.org/User:Dad -- Daniel Dehennin RAIP de l'Orne pgpfdY06hEIQg.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Recover domain user password
Gerd Ott g...@taz.de writes: I dont' have any knowledge of python, but it worked for me if from, Line 4, is written in small letters. #!/usr/bin/python import sys, getopt, base64 from struct import pack, unpack ^ Unbelievable, my file has a small 'f' and the attachment in my mail has a capital one. I apologise for the trouble of what ever in my mail system change this… Regards. -- Daniel Dehennin RAIP de l'Orne pgpOj9tAMk9j7.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Recover domain user password
Peter Gough pmgo...@gmail.com writes: I've setup my Windows XP WPKG clients to use a domain user account to connect to my server's WPKG share. Unfortunately in a moment of stupidity I reset the password for this account. Is there a way to reverse engineer the encrypted password in the settings.xml file? Yes, this is reversible. I use a python script to set the passwords automatically, it works with: - path-password - logon-interrupt-password To get the clear text password, just do: --8---cut here---start-8--- python wpkg-pass.py -c 'ciphered text' --8---cut here---end---8--- -- Daniel Dehennin RAIP de l'Orne #!/usr/bin/python import sys, getopt, base64 From struct import pack, unpack fixedkey = [int(0x50,0), int(0xF7,0), int(0x82,0), int(0x69,0), int(0xEA,0), int(0x2D,0), int(0xDD,0), int(0x2D,0), int(0x6A,0), int(0xB4,0), int(0x33,0), int(0x8F,0), int(0xD5,0), int(0xC7,0), int(0x90,0), int(0x9C,0), int(0x22,0), int(0x95,0), int(0x61,0), int(0xE5,0), int(0x65,0), int(0xF6,0), int(0xB0,0), int(0x4B,0), int(0x94,0), int(0x47,0), int(0xB0,0), int(0xBD,0), int(0x73,0), int(0x58,0), int(0x56,0), int(0x87,0), int(0x79,0), int(0x7B,0), int(0xE6,0), int(0xB0,0), int(0xD2,0), int(0x20,0), int(0x28,0), int(0xE1,0)] def wpkg_crypt (passwd): buf = [] length = len(passwd) idx = 0 for i in range (length): buf.append(ord(passwd[i])^fixedkey[idx]) idx = idx+1 if (idx len(fixedkey) -1): idx = 0 return base64.b64encode(''.join([pack(B, c) for c in buf])) def wpkg_decrypt (crypt): buf = [] length = len(fixedkey) idx = 0 unpacked = [unpack(B, c) for c in base64.b64decode(crypt)] for i in range (len(unpacked)): buf.append( chr( unpacked[i][0]^fixedkey[i] ) ) idx = idx+1 if (idx length-1): idx = 0 return ''.join(buf) def usage (): print sys.argv[0] + [option] print \t-h|--help\tThis help message print \t-p|--password\tPassword to encrypt print \t-c|--crypted\tText to decrypt try: opts, args = getopt.getopt(sys.argv[1:], hp:c:, [help, password=, crypted=]) except getopt.GetoptError, err: # print help information and exit: print str(err) usage() sys.exit(2) for o, a in opts: if o in (-h, --help): usage() sys.exit() elif o in (-p, --password): print Crypted: + wpkg_crypt(a) sys.exit() elif o in (-c, --crypted): print Clear: + wpkg_decrypt(a) sys.exit() else: assert False, unhandled option usage() pgpsDudQylaSY.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG Client 1.3.10 released (testing release)
Tomasz Chmielewski man...@wpkg.org writes: Can you try: http://wpkg.org/files/client/beta/1.3.11/ (the previous one started the installation as SYSTEM, and not a running user, so it could be that it was not able to access settings.xml). BTW, I think your msiexec command line you used is invalid - there is no /i parameter: msiexec /qn /norestart WPKG32.msi ALLUSERS=1 SETTINGSFILE=%WPKG%\settings.xml This is a cutpast mistake ;-) the /i is here actually. It works fine with 1.3.11: - using SETTINGSFILE during installation works - offline mode works Thanks a lot. -- Daniel Dehennin RAIP de l'Orne pgp5QEutqwVzD.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG Client 1.3.10 released (testing release)
Malte Starostik ma...@malte.homeip.net writes: [...] the 1.3.10 version works great so far! Regarding SETTINGSFILE=...: is this a fresh install or are you installing over an existing version? In the latter case this didn't work with 1.3.9 either, MSI just ignores those properties in case the package is already installed. I've had that problem when trying to push a changed installation path via SOURCELIST=. For WPKG I run the above command followed by an wpkginst --IMPORT=... which works fine. It's a fresh install, it was working for 1.3.9, but I never use it due to the offline crash problem. Just removing the “SETTINGSFILE=…” make it works Regards. -- Daniel Dehennin RAIP de l'Orne pgpfAf6PbTSv1.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] [wpkg-announce] WPKG Client 1.3.10 released (testing release)
Tomasz Chmielewski man...@wpkg.org writes: WPKG Client 1.3.10 has been released. This is *not* intended for production environments and is designed for testing purposes only. [...] Please test and report back any issues found/remaining. The same installation command line use for 1.3.6 does not works here. I can not install it with “--SETTINGSFILE” option. I manage to install it without and then import the settings manually. The installation proceed normally and does not crash with offline mode activated. Regards. -- Daniel Dehennin RAIP de l'Orne pgpb8MxEN3HjU.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG Client 1.3.10 released (testing release)
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: Tomasz Chmielewski man...@wpkg.org writes: WPKG Client 1.3.10 has been released. This is *not* intended for production environments and is designed for testing purposes only. [...] Please test and report back any issues found/remaining. The same installation command line use for 1.3.6 does not works here. I can not install it with “--SETTINGSFILE” option. I manage to install it without and then import the settings manually. The installation proceed normally and does not crash with offline mode activated. I forgot the logs. Regards. -- Daniel Dehennin RAIP de l'Orne Type de l'événement : Erreur Source de l'événement : MsiInstaller Catégorie de l'événement : Aucun ID de l'événement : 11722 Date : 25/01/2010 Heure : 11:13:09 Utilisateur : RAIP-ORNE\root Ordinateur :RAIP-ORNE Description : Product: WPKG -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action _A9459942_EE79_497A_9080_F39DDA8A7B80, location: C:\Program Files\wpkg\wpkginst.exe, command: --SETTINGSFILE=\\horus\wpkg$\settings.xml Pour plus d'informations, consultez le centre Aide et support à l'adresse http://go.microsoft.com/fwlink/events.asp. Données : : 7b 37 46 31 39 37 41 33 {7F197A3 0008: 45 2d 38 36 30 37 2d 34 E-8607-4 0010: 37 44 41 2d 38 45 43 44 7DA-8ECD 0018: 2d 30 38 36 37 42 41 37 -0867BA7 0020: 39 37 30 32 33 7d 97023} pgpU6OrDWlkCY.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] [wpkg-announce] WPKG Client 1.3.10 released (testing release)
Tomasz Chmielewski man...@wpkg.org writes: Daniel Dehennin wrote: Please test and report back any issues found/remaining. The same installation command line use for 1.3.6 does not works here. I can not install it with “--SETTINGSFILE” option. I manage to install it without and then import the settings manually. The installation proceed normally and does not crash with offline mode activated. I forgot the logs. Could you also attach your settings.xml file? No problem, it's exactly the same as for 1.3.6. Please also provide a full command line you are using. --8---cut here---start-8--- SET WPKG=\\horus\wpkg$ msiexec /qn /norestart WPKG32.msi ALLUSERS=1 SETTINGSFILE=%WPKG%\settings.xml --8---cut here---end---8--- I tried with quoted without success: --8---cut here---start-8--- msiexec /qn /norestart WPKG32.msi ALLUSERS=1 SETTINGSFILE=%WPKG%\settings.xml --8---cut here---end---8--- I'd be glad to hear from other people if it fails for them in a similar way, or if it works fine. Regards. -- Daniel Dehennin RAIP de l'Orne settings.xml Description: WPKG settings pgpJXL8X1FuFg.pgp Description: PGP signature - Easy Software Deployment http://wpkg.org ___ wpkg-announce mailing list wpkg-annou...@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-announce - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] running wpkgclient on schedule?
Kai Pastor dg...@darc.de writes: schtasks /create /tn Software-Updates /tr net start WpkgService /sc täglich /st 05:%TIME:~3,2%:00 /ru System /f It includes some magic to avoid having all machines starting the task at the same time. Note that schtasks depends on the language (täglich = daily). Thanks, I was not aware of schtasks, much more easy than at ;-) I want to include a little more trick for the random launching. I want all the machine to start betwee 10 and 50 of an hour, I use the following: - get a random between 0 and 40, - add 10 --8---cut here---start-8--- SET /a MINUTE=%RANDOM%%40+10 schtasks /create /tn WPKGservice /tr sc start WpkgService /SC DAILY /ST 05:%MINUTE%:00 /ru System --8---cut here---end---8--- Regards. -- Daniel Dehennin RAIP de l'Orne pgp4KudWoXgw5.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] running wpkgclient on schedule?
Grzegorz Marszałek gr...@post.pl writes: Hello! I have configured wpkgclient to launch at shutdown - and it's working nice. Now I need a way to run wpkg on schedule, ie.: each day at 6 am. Could it be done with wpkgclient or should I write my own script to do that? First option seems nicer because I have proper share with proper credentials mapped. Here is what we use: --8---cut here---start-8--- ?xml version='1.0' encoding='utf-8'? packages package id='wpkg-at' name='Run WPKG at a time' revision='1' reboot='false' priority='100' variable name='ATTIME' value='12:30 /every:l,ma,me,j,v'/ variable name='ATCMD' value='sc start wpkgservice'/ check type='execute' path='%ComSpec% /c at | find %ATCMD% NUL'/ install cmd='at %ATTIME% %ATCMD%/ remove cmd='at | %SOFTWARE%\gnu\gawk.exe /%ATCMD%/ { system(\at \ $1 \ /delete\) }'/ upgrade cmd='at | %SOFTWARE%\gnu\gawk.exe /%ATCMD%/ { system(\at \ $1 \ /delete\) }'/ upgrade cmd='at %ATTIME% %ATCMD%'/ /package /packages --8---cut here---end---8--- This requires gawk.exe. NB: commands with pipes need to be start in a shell (%ComSpec%). Regards. -- Daniel Dehennin RAIP de l'Orne pgpsmdjdMwCly.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] xml Elements and attributes
Charles Gargent charlesgarg...@gmail.com writes: Hi Hello, In the packages xml file the exit code data is stored in an element, can you change it to be stored in an attribute? ie remove cmd='msiexec /x {23170F69-40C1-2701-0457-0100} /qn /norestart' exitcode='any' / instead of remove cmd='msiexec /x {23170F69-40C1-2701-0457-0100} /qn /norestart'exit code='any' //remove I don't think it's a good thing. Think about having more than one possible exit code, it seems odd to me to have multiple occurrences of the same attribute, it seems more natural to have multiple elements, and this conflict with your following proposal. Can you change all the data to be stored in an element rather than some attributes some elements? ie packages package id7-Zip/id name7-Zip 4.57/name check typeuninstall/type /check etc... /package /packages instead of packages package id=7-Zip name=7-Zip 4.57 revision=1 priority=150 reboot=false check type=uninstall condition=exists path=7-Zip 4.57 / install cmd='msiexec /i %AIP%\7-Zip\7z457\7z457.msi transforms=%AIP-common%\7-Zip\7z457\7z457.mst /qn /norestart' / remove cmd='msiexec /x {23170F69-40C1-2701-0457-0100} /qn /norestart'exit code='any' //remove /package /packages Here it seems more natural to me to have attributes instead of elements, the package attributes refer to the package, having them as children looks strange to me. For install/upgrade/remove, having children elements looks good to me, but is more verbose: --8---cut here---start-8--- install exec commandmsiexec…/command exit0/exit /exec exec commandreg add…/command exit0/exit /exec /install --8---cut here---end---8--- NB: using exec/ may permit to use something else than command/, for example calling JScript functions directly from the package definition? Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] RPC server unavailable
Hello, Trying wpkg.js 1.1.0-M30 on windows XP I have the following errors: --8---cut here---start-8--- 2009-05-15 14:46:05, ERROR : Error when searching registry sub-keys at 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'|Code: 800706ba; Descriptions: Le serveur RPC n'est pas disponible. 2009-05-15 14:46:05, ERROR : Error evaluating package check for package 'Mozilla Firefox': 'length' a la valeur Null ou n'est pas un objet. 2009-05-15 14:46:05, ERROR : Could not process (install) Mozilla Firefox.|Failed checking after installation. --8---cut here---end---8--- Le serveur RPC n'est pas disponible means The RPC server is unavailable. Any idea ? Regards. -- Daniel Dehennin RAIP de l'Orne pgpdjuiDxCvrw.pgp Description: PGP signature - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Uninstalling MS Office 2003
Claudiu Cristea clau.cris...@gmail.com writes: I want to remove MS Office that were installed before WPKG... As I understood, the *remove* action is called when a WPKG package is removed after the software has been installed through WPKG... Why not just create a valid office 2k3 package, with an install/ to install the package and a remove/ to remove it. Let the check define that it's already installed, and then, on the machines where it should not be installed, remove it from their profile and office will be remove at the next WPKG run. Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Firefox and proxy settings
Rainer Meier r.me...@wpkg.org writes: Well, currently I have limited access... but in general you might either use simple 'copy' or 'xcopy' to copy/overwrite the file or you might prepare a self-extractor archive (e.g. 7-zip self extractor) and just add it as an install/upgrade command. Personally I am using a set of install helper scripts (unattended.cmd, unattended-postinstall.cmd...) and I would simply add a copy command to the unattended-postinstall.cmd script in this case. Use the mailing list archive to find listings of these scripts I posted recently. [...] Personally I split the firefox xml in 3 steps: - One to install it - One to configure all.js (echo the general.config.filename stuff, check with a grep) - One to copy the config and set some reg keys. So the configuration is put back if someone change it without the need to re-install firefox. By the way, I use a file size check for the config to see if it changed (for upgrade for example), any plan to add some md5/sha check to wpkg ? Regards. NB: I plan to publish my .cmd files as soon as I have the agreement of my employer. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Firefox and popup whitelist
Hello, Seeing some activities about firefox, I have a question: Does anyone of you succeed to manage the pop up white list ? I search the web, ask on #firefox, it seems to be sqlite databases with firefox3, like for bookmarks (which are “places” now). I want to add some configuration to thoses things without loosing the user settings (so no file copy). Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG with multiple systems and architectures
Rainer Meier r.me...@wpkg.org writes: [...] So here it comes. For most applications I use a bunch of cmd scripts to install them. First of all my generic installer (install.cmd). Then I use a simple unattended.cmd batch file which makes use of install.cmd. For uninstall I am using a script called unattended-uninstall.cmd. [...] Hello, back again ;-) I give a try to thoses scripts and they are great, personnally I rename them: - unattended.cmd for routines (your install.cmd) - install.cmd for installation (your unattended.cmd) - uninstall.cmd for uninstallation (your unattended-uninstall.cmd) Do you have a sample for acrobat reader install/uninstall ? I use the .exe for installing and the application ID for uninstall like: msi /qn /x{AC76BA86-7AD7-1036-7B44-A8120003} Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG with multiple systems and architectures
Rainer Meier r.me...@wpkg.org writes: [...] For most applications I use a bunch of cmd scripts to install them. First of all my generic installer (install.cmd). Then I use a simple unattended.cmd batch file which makes use of install.cmd. For uninstall I am using a script called unattended-uninstall.cmd. [...] --8---cut here---start-8--- ## unattended-uninstall.cmd script for MSI packages ## @echo off set PROGRAM_NAME=Program set CMD32=package.msi set CMD64=%CMD32% set INSTALLER=install.cmd set INSTALLER_LOC=%~dp0 echo Removing %PROGRAM_NAME% call %INSTALLER_LOC%%INSTALLER% msiuninstall %CMD32% %CMD64% ### /unattended-uninstall.cmd script for MSI packages ### --8---cut here---end---8--- Hello, Ok, I'm able to give them a try now ;-) The uninstall.cmd requires to be in a version-specific directory, which is ok. As a leasy man, is it possible to use the revision as a variable ? Something like: --8---cut here---start-8--- ?xml version=1.0 encoding=utf-8 ? packages package id='Pidgin' name='Pidgin IM' revision='2.5.4' priority='50' reboot='false' !-- Pidgin Instant Messaging -- check type='uninstall' condition='exists' path='Pidgin' / install cmd='%SOFTWARE%\Pidgin\%revision%\unattended.cmd' / remove cmd='%SOFTWARE%\Pidgin\%revision%\unattended-uninstall.cmd' / upgrade cmd='%SOFTWARE%\Pidgin\%revision%\unattended.cmd' / depends package-id='GTK' / /package /packages --8---cut here---end---8--- Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Problem with variables
Hello, I have a problem when using variables in a package definition: = ?xml version='1.0' encoding='utf-8'? packages package id='disable-network-services' name='Windows XP disabled network services' revision='1' reboot='false' priority='700' variable name='NETCFG' value='%WPKGBIN%\snetcfg_wxp.exe'/ check type='logical' condition='and' check type='execute' path='%ComSpec% /c %NETCFG% -q ms_psched | %WPKGBIN%\grep.exe is not installed'/ check type='execute' path='%ComSpec% /c %NETCFG% -q ms_alg | %WPKGBIN%\grep.exe is not installed'/ check type='execute' path='%ComSpec% /c %NETCFG% -q ms_gpc | %WPKGBIN%\grep.exe is not installed'/ /check install cmd='%ComSpec% /c %NETCFG% -u ms_psched' exit code='0'/ exit code='1'/ /install install cmd='%ComSpec% /c %NETCFG% -u ms_alg' exit code='0'/ exit code='1'/ /install install cmd='%ComSpec% /c %NETCFG% -u ms_gpc' exit code='0'/ exit code='1'/ /install /package /packages = The check works: Execute check for program 'C:\WINDOWS\system32\cmd.exe /c %WPKGBIN%\snetcfg_wxp.exe -q ms_psched \| %WPKG%\bin\grep.exe is not installed' returned '0'. Evaluating condition 'null' revealed true when comparing to expected value of '0' Execute check for program 'C:\WINDOWS\system32\cmd.exe /c %WPKGBIN%\snetcfg_wxp.exe -q ms_alg \| %WPKG%\bin\grep.exe is not installed' returned '1'. Evaluating condition 'null' revealed false when comparing to expected value of '0' Result of logical 'AND' check is false but not the install commands with the variable: Executing command : %ComSpec% /c %WPKGBIN%\snetcfg_wxp.exe -u ms_psched Command '%ComSpec% /c %WPKGBIN%\snetcfg_wxp.exe -u ms_psched' returned exit code [1]. This exit code is not an error Command in installation of Windows XP disabled network services returned exit code [1]. This exit code indicates success Executing command : %ComSpec% /c %WPKGBIN%\snetcfg_wxp.exe -u ms_alg Command '%ComSpec% /c %WPKGBIN%\snetcfg_wxp.exe -u ms_alg' returned exit code [0]. This exit code is not an error. Command in installation of Windows XP disabled network services returned exit code [0]. This exit code indicates success. Executing command : %ComSpec% /c %NETCFG% -u ms_gpc Command '%ComSpec% /c %NETCFG% -u ms_gpc' returned exit code [1]. This exit code is not an error. Command in installation of Windows XP disabled network services returned exit code [1]. This exit code indicates success. Before WPKG runs: - ms_psched (QoS) is not installed - ms_alg is installed - ms_gpc is installed ms_gpc is never removed, the return code should be 0 like with ms_alg but it's not. wpkg.js version 1.1.0-M8 from[1]. Regards. Footnotes: [1] http://wpkg.svn.sourceforge.net/svnroot/wpkg/wpkg/current-development -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Problem with variables
Rainer Meier r.me...@wpkg.org writes: Hi Daniel, Hi, It's correct that the code to set variables needs some re-work/re-design. This is one of the reasons I recommend not to use them extensively at the moment. Ok. Did you think about moving these extensive execute script from the single-liner within the package XML file to a CMD script? Such a [...] This gives you much more flexibility to extend/refine checks as needed and format them in a much more user-readable way. Yes, I already said that I need to give a try to your cmd scripts ;-) Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG with multiple systems and architectures
Rainer Meier r.me...@wpkg.org writes: Hi Daniel, Daniel Dehennin wrote: Thanks everybody for your answers, looking at them I was wondering if having conditionnal variables could be a good thing, let me explain: Yes, I will think about this and eventually it becomes part of WPKG. However at the moment I have a list of additional features which I would like to implement first. I don't really like to have some external cmd scripts, it requires to look at multiple files to see what's happening with a package, what about something like this: OK, your decision ;-) Personally I like scripting very much. It's extremely flexible and allows you to handle almost every situation. I like scripting too, on sys-admin-friendly platform with programmer-friendly languages ;-) I do not fully agree to the fact that you have to look at multiple files. The install.cmd script I showed remains the same for every installer which as a common silent operation. So I don't need to debug or look at it as it has proven to work perfectly. So the only thing I have to look at is unattended.cmd or unattended-uninstall.cmd which is usually just different within the header (command definition, installer selection). So usually I have to adapt only two lines within the script to make it usable for any application. On the other side this simplifies WPKG package definitions a lot and unifies exit codes. There is another reason I am doing this which is not related to WPKG. I am used to synchronize my whole software tree to a memory stick. So I take it with me to my customers. Although they do not use WPKG I can still go to any application folder and just launch unattended.cmd and watch the program installing silently. This is very handy for support people when you need to upgrade a couple of outdated programs. Yes, that's a good point, I have a script which extract install/ from packages definition to do the same. I'll definitely give a try to your cmds before being absolute about my answer ;-) Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Testing WPKG client 1.0.12
Le 5624 Septembre 1993, Tomasz Chmielewski a envoyé: Can you tell me if this one work better for you? http://www1.wpkg.org/files/client/beta/test/2008-01-24/ No, the same error at the same address. Is there any thing I can do to help debugging this ? Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Testing WPKG client 1.0.12
Le 5626 Septembre 1993, Tomasz Chmielewski a envoyé: It would be great help if you could provide remote access to such machine? it's a kvm virtual machine ;-) A base windows XP SP2 with SP3 applied, nothing more installed. I may be able to give you access on week-end, vnc through SSH. Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Testing WPKG client 1.0.12
Le 5626 Septembre 1993, Daniel Dehennin a envoyé: [...] Sorry for the answer on the list. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG with multiple systems and architectures
Rainer Meier r.me...@wpkg.org writes: Well, the Reply of David reminded me that I did not answer yet. So here it comes. For most applications I use a bunch of cmd scripts to install them. First of all my generic installer (install.cmd). Then I use a simple unattended.cmd batch file which makes use of install.cmd. For uninstall I am using a script called unattended-uninstall.cmd. [...] Other uninstall scripts might require invoking an uninstall EXE file with specific parameters. My scripts take into account 32-bit and 64-bit operating systems. Thanks everybody for your answers, looking at them I was wondering if having conditionnal variables could be a good thing, let me explain: I don't really like to have some external cmd scripts, it requires to look at multiple files to see what's happening with a package, what about something like this: = ?xml version='1.0' encoding='utf-8'? packages package id='7zip' name='7 Zip' revision='4.62' reboot='false' priority='100' check type='variable' name='PROCESSOR_ARCHITECTURE' condition='equals' value='x86' variable name='7zInstaller' value='7z462.msi'/ /check check type='variable' name='PROCESSOR_ARCHITECTURE' condition='equals' value='AMD64' variable name='7zInstaller' value='7z462-x64.msi'/ /check check type='uninstall' condition='exists' path='7-Zip 4.62'/ install cmd='msiexec /qn /norestart /i %SOFTWARE%\zip\%7zInstaller%'/ install cmd='regedit /s %SOFTWARE%\zip\7zip.reg'/ upgrade cmd='msiexec /qn /norestart /i %SOFTWARE%\7zip\%7zInstaller%'/ upgrade cmd='regedit /s %SOFTWARE%\zip/7zip.reg'/ remove cmd='msiexec /qn /norestart /x %SOFTWARE%\zip\%7zInstaller%'/ /package /packages = Doing the same for the uninstall entry if it differ between x86 and x64 architectures. This would permit to have generic package definitions. Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Testing WPKG client 1.0.12
Hello, I saw on this list that there is a beta client[1] with net-use-machine-account feature, I give it a try and I have an error (approximated translation from french): = Source: Application Error Category: 100 ID event: 1000 Faulty application WPKGSrv.exe, version 1.0.0.12, faulty module WPKGSrv.exe, version 1.0.0.12, fault address 0xa704. = = Source: DrWatson Category: none ID event: 4097 The application C:\Program Files\wpkg\WPKGSrv.exe generate an application error. The generated exception was c0005 at address 0040A704(WPKGSrv) = Just before I have informative messages of WPKG launch, seems that everything is fine, then an AutoEnrollement Error and then the bellow errors. = Source: AutoEnrollement Category: none ID event: 15 The Automatic certificate inscription for LocalSystem could not contact Active directory (0x8007054b). The specified domain does not exist or could not be contacted. - The inscription will not be done. = My server is a samba3. Any idea ? Regards. [1] http://www1.wpkg.org/files/client/beta/test/2008-01-09/WPKG32.msi -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Testing WPKG client 1.0.12
Tomasz Chmielewski man...@wpkg.org writes: So, does it crash for you here or what? The WPKG deployement progress box run during logon-delay and when I login to the computer I have a crash report (do you can to report this to microsoft). Dos it work if you use normal credentials? No, I try the same normal credentials configuration with client 1.2.1 and everything is fine. Samba is not Active Directory. Yes, I know, I report this if it can be meanfull. Did you check Samba logs? Nothing particuliar here, the IPC$ connexion happens but nothing more. What permissions (i.e. allowed users, groups) do you have on this Samba share? I allowed the DomainComputers group to permit them to read files and write logs. Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Testing WPKG client 1.0.12
Daniel Dehennin daniel.dehen...@ac-caen.fr writes: No, I try the same normal credentials configuration with client 1.2.1 and everything is fine. Works too with client 1.3.6[1]. Regards. [1] http://www1.wpkg.org/files/client/beta/1.3.6/WPKG%20Client%201.3.6.msi -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] WPKG with multiple systems and architectures
Hello, Is there any best practices to setup WPKG for multiple systems and architectures: WinXP32, WinXP64, WinVista32, WinVista64... ? My idea is to minimise the number of package definition using variables and a good software repository layout, something like: \\server\wpkg$\software\OS\ARCH\applis or \\server\wpkg$\software\applis\OS\ARCH Any hints ? Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Expanding variables
Hello, Reading wpkg.js I saw how logFilePattern is expanded and I think this treatment can be applied to more variables. For example: - wpkg_base = http://www.mydomaine.tld/wpkg/ - web_packages_file_name = packages/[HOSTNAME].xml - web_profiles_file_name = profiles/[HOSTNAME].xml - web_hosts_file_name= hosts/[HOSTNAME].xml So, instead of loading maybe huge XML files, the web service can restrict them for the host only. This may avoid the use of profiles and hosts files if the web service handle the profiles management and packages dependencies and hide them to the client. So http://www.mydomaine.tld/wpkg/[HOSTNAME].xml can be just ready to be used. I provide a little diff which define an expandVariable function and use it in web parts. This is not tested, just to clarify my point. Regards. -- Daniel Dehennin RAIP de l'Orne === modified file 'wpkg.js' --- wpkg.js 2008-10-21 07:56:40 + +++ wpkg.js 2008-10-21 08:38:44 + @@ -4718,9 +4718,9 @@ // load packages setPackages(loadXml(packages_file, packages_folder, packages)); } else { - var packages_file = base + / + web_packages_file_name; - var profiles_file = base + / + web_profiles_file_name; - var hosts_file = base + / + web_hosts_file_name; + var packages_file = base + / + expandVariable(web_packages_file_name); + var profiles_file = base + / + expandVariable(web_profiles_file_name); + var hosts_file = base + / + expandVariable(web_hosts_file_name); var nodes = loadXml( profiles_file, null, null ); if (nodes == null) { // connot continue without profiles (probably network error occurred) @@ -6294,3 +6294,47 @@ } return ret; } + +/** + * expandVariable - expand shell variable and WPKG regexp + * @param variable to expand + * @return expanded variable string + */ +function expandVariable(var) { +// build log file name +var today = new Date(); +var year = today.getFullYear(); +var month = today.getMonth() + 1; +var day = today.getDate(); +var hour = today.getHours(); +var minute = today.getMinutes(); +var second = today.getSeconds(); +if (month 10) { +month = 0 + month; +} +if (day 10) { +day = 0 + day; +} +if (hour 10) { +hour = 0 + hour; +} +if (minute 10) { +minute = 0 + minute; +} +if (second 10) { +second = 0 + second; +} + +var expandedVar = var.replace(new RegExp(\\[HOSTNAME\\], g), getHostname()); +expandedVar = var.replace(new RegExp(\\[\\], g), year); +expandedVar = var.replace(new RegExp(\\[MM\\], g), month); +expandedVar = var.replace(new RegExp(\\[DD\\], g), day); +expandedVar = var.replace(new RegExp(\\[hh\\], g), hour); +expandedVar = var.replace(new RegExp(\\[mm\\], g), minute); +expandedVar = var.replace(new RegExp(\\[ss\\], g), second); + +var shell = new ActiveXObject(WScript.Shell); +expandedVar = shell.ExpandEnvironmentStrings(expandedVar); + +return expandedVar; +} \ No newline at end of file - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Fetching hosts/packages/profiles by HTTP
Hello, There was a discussion some time ago about improving the capability to fetch xml from an HTTP URI. For now, if I configure WPKG for this, I need to have everything by HTTP. I looked at wpkg.js code, and it don't seems possible to have pattern like [HOSTNAME] in the host_file_name. Regards. -- Daniel Dehennin RAIP de l'Orne - wpkg-users mailing list archives http://lists.wpkg.org/pipermail/wpkg-users/ ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] WPKG and LDAP based hosts list
Tomasz Chmielewski [EMAIL PROTECTED] writes: To store anything in LDAP, you'd need to create a proper .schema for WPKG entries. Which would be one more thing to learn. Yes, I know, I'm quite confident with LDAP ;-). The only things I don't know is about JScript as my preferred language is Perl ;-) Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Using package variable in tests
Hello, Tying to install mozilla firefox with WPKG, it seems to me that variables defined in packages are not expanded when doing tests. variable name='MozDir' value='%ProgramFiles%\Mozilla Firefox'/ !-- Le fichier all.js inclu bien mozilla.cfg -- check type='file' condition='exists' path='%MozDir%\greprefs\all.js'/ check type='execute' path='%WPKGBIN%\qgrep.exe -B -L pref(\general.config.filename\, \mozilla.cfg\); %MozDir%\greprefs\all.js'/ install cmd='%ComSpec% /c echo pref(general.config.filename, mozilla.cfg); %MozDir%\greprefs\all.js'/ remove cmd='%WPKGBIN%\gsar.exe -o -spref(\general.config.filename\, \mozilla.cfg\); -r %MozDir%\greprefs\all.js'/ In the debug log I got: The path '%MozDir%\greprefs\all.js' does not exist: the test failed [...] Reading variables from package Reading variables from package Firefox Configuration Got variable 'MozDir' of value '%ProgramFiles%\Mozilla Firefox' Stored 1 variables from package [...] Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Using package variable in tests
Daniel Dehennin [EMAIL PROTECTED] writes: Hello, Tying to install mozilla firefox with WPKG, it seems to me that variables defined in packages are not expanded when doing tests. It seems to be the same for package removal. Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Unable to set the path to file sizeequals check
Hello, I'm unable to test a file size, using wpkg 1.1-M4 check type='file' condition='exists' path='%ProgramFiles%\Mozilla Firefox\mozilla.cfg'/ check type='file' condition='sizeequals' value='2017' path='%ProgramFiles%\Mozilla Firefox\mozilla.cfg'/ It gives me in the log file: The path 'C:\Program Files\Mozilla Firefox\mozilla.cfg' exists: the test was successful Finding size of C:\Program Files\Mozilla Firefox\mozilla.cfg| Unable to get file size for C:\Program Files\Mozilla Firefox\mozilla.cfg : 'path' is undefined Leaving getFileSize with size -1 The file 'C:\Program Files\Mozilla Firefox\mozilla.cfg' has size -1 - wanted 2017: the test fails Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Unable to set the path to file sizeequals check
Daniel Dehennin [EMAIL PROTECTED] writes: Hello, I'm unable to test a file size, using wpkg 1.1-M4 [...] Regards. You can find the patch as attachement to this e-mail. Regards. -- Daniel Dehennin RAIP de l'Orne === modified file 'wpkg.js' --- wpkg.js 2008-04-21 22:06:31 + +++ wpkg.js 2008-04-24 11:32:43 + @@ -1559,7 +1559,7 @@ var size = -1; try { dinfo (Finding size of + file + \n); - var expandedPath = new ActiveXObject(WScript.Shell).ExpandEnvironmentStrings(path); + var expandedPath = new ActiveXObject(WScript.Shell).ExpandEnvironmentStrings(file); var FSO = new ActiveXObject(Scripting.FileSystemObject); var fsof = FSO.GetFile(expandedPath); size = fsof.Size; - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Using several profiles
Rainer Meier [EMAIL PROTECTED] writes: Huh, they start to become useful ;-) I'm sad because it's XSD format and Emacs nXML mode use RelaxNG compact and there is no tools to convert an XSD to RelaxNG compact. Somebody says that XML is the way to standardisation ;-) You cannot. But... read on. There is a /host:hostname switch where the original hostname of the machine is ignored and the value from the switch is actually used. So feel free to define a host within hosts.xml which is used for this purpose only - and then feel free to reference as many profiles as you like to. In addition you could also create a profile which _depends_ on all profiles you like to include. Therefore specifying this profile at the command line would have the same effect. If I have several different profiles for machines, plus additional profile for users/groups, it increase the number of profiles or hosts to use :-/ Can it became a feature request ? Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Using several profiles
Rainer Meier [EMAIL PROTECTED] writes: I really don't see the reason for it at the moment. If you would like to assign multiple profiles hard-coded to a host then you could do that using hosts.xml. Why are people afraid that their host.xml grows a bit more? If you use a different /profile switch on each host then this settings are hard-coded on the client and much more difficult to change later on. I was not aware of that. I am absolutely sure it is more convenient to have the definition within the hosts.xml and let WPKG chose the right host definition by exact host match. If some group of hosts belong to the same profile like graphics workstation or similar, then just use a naming convention. Windows can do that by itself when installing new workstations. It can prefix the name with a pre-defined string so you could use a rule like gfx.* to match all of them. And do not complain about that you would have to rename the workstations which are already in use. Renaming a workstation is not really more effort than setting a custom WPKG command line on each machine. If you use the techniques of WPKG (define hosts in hosts.xml) then you can even change the assigned profiles later on - which is impossible if the profile is hard-coded on the client. So the answer at the moment is no. I don't think I will implement such a feature which potentially causes confusion, misunderstandings and problems while there is already something available which supports all requirements. Ok, no problem, thanks. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Upgrades
Brian May [EMAIL PROTECTED] writes: Have a look at how Java can work: http://wpkg.org/Java This uninstalls old versions of Java before doing an upgrade/install. Well, this is exactly the example I had in mind when posting. If a package need to take care of old versions, I can become quite ugly, like the java Package. IIRC, for this package, the upgrade only consists in removing the old versions (taking care of the error about not found package) and installing the new one. I think I understand your first arguments. Maybe specifying a special value for the upgrade could be an idea ? So, there is no un-wanted behaviour. If no upgrade/ is given, nothing happens. About removed settings, do you speak about system wide settings ? Because user settings are never touched, aren't they ? If we consider that a fresh install needs to configure the package, the remove+install may remove the settings but apply the new ones. The good thing I see with re-applying the settings is that if someone change the settings (for a wrong reason), you can be sure them to became correct at next upgrade. (I know that I can create package just to take care of this). Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Question about processing install and remove
Hello, I'm continuing my tests, I don't say it to you but I use wpkg.js from trunk (1.1-M4) and WPKG client 1.2-rc6. I create some packages to configure some system settings, like the firewall (enabling icmp echo request). During my test I remove the package xp-firewall from the profile and in the log I see that wpkg.js mark the xp-firewall package as to be removed but it seems to try to execute the install/ anyway. === From the log === Found installed package 'Windows XP firewall configuration' (xp-firewall). Marking package 'Windows XP firewall configuration' (xp-firewall) for remove Number of packages to remove: 1 Going to install package 'Windows XP firewall configuration' (xp-firewall), Revision 1, (execute flag is 'once', notify flag is 'true'). Package 'Windows XP firewall configuration' (xp-firewall): Not yet processed during this session. Package 'Windows XP firewall configuration' (xp-firewall): Installed already. Removal of depending packages for 'Windows XP firewall configuration' (xp-firewall) successfully finished. Removing Windows XP firewall configuration (xp-firewall)... Checking existence of package: Windows XP firewall configuration Removal of 'Windows XP firewall configuration successful. === End of the log === As the xp-firewall package already exists in the local wpkg.xml, it should not execute the check ? Neither trying to install it ? My xp-firewall.xml file: ?xml version='1.0' encoding='utf-8'? packages package id='xp-firewall' name='Windows XP firewall configuration' revision='1' reboot='false' priority='800' execute='once' install cmd='netsh firewall set opmode mode=enable profile=all'/ install cmd='netsh firewall set icmpsetting 8 enable all'/ /package /packages According to the wiki: The install commands are executed by wpkg when a new package comes into scope for a profile. The remove commands are executed when a package is removed from a profile. Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Check type execute
Hello, Looking at the ChangeLog of WPKG, I saw that an execute check was added. Why is it used like this: check type=execute path=\path\to\a\script.cmd/ and not check type=execute cmd=somecommand.cmd / Does the path attribut mean that we must provide a batch script and a command is not allowed? Can I give parameters to the script ? Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Package definition that remove some stuffs
Hello, As I will deploy WPKG on already installed box, I want it to remove some useless programs, I think I must do it like this: check type=logicical condition=not check type=registry condition=exists path=WHATEVER /check install cmd=command to remove the package/ Does this seems correct ? Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Variables in settings.xml
Hello, In my settings.xml I want to define some variables, like this: script-variable name=WPKG\\server\wpkg/script-variable script-variable name=WPKGBIN%WPKG%\bin/script-variable script-variable name=WPKGLOG%WPKG%\log/script-variable script-variable name=SOFTWARE\\horus\partage\applis\install/script-variable script-variable name=PATH%WPKGBIN%;%PATH%/script-variable But it seems that WPKGLOG is not well expanded, in my debug output I have: 2008-04-14 16:28:52, DEBUG : Initializing new log file: %WPKG%\log\wpkg-teststation.log 2008-04-14 16:28:52, DEBUG : Failed to open log file: Chemin d'accès introuvable; falling back to local logging: null Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
[wpkg-users] Installation WPKG client
Hello, I'm doing some tests and I see that installing WPKG client in a special user netlogon require a map for the settings.xml file. msiexec /qb /i w:\client\wpkg client 1.2-rc6.msi SETTINGSFILE=w:\client\settings.xml Using: msiexec /qb /i w:\client\wpkg client 1.2-rc6.msi SETTINGSFILE=\\myserver\client\settings.xml does not work, any idea ? Regards. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] Installation WPKG client
Tomasz Chmielewski [EMAIL PROTECTED] writes: 1. What do you mean by a special user netlogon? This is a domain admin user, during login of this user, the netlogon just install the WPKG client. It's a quick way to setup WPKG on several hosts, just login with this account. 2. Do you have access to XML file? I.e., does the following work? type \\myserver\client\settings.xml That was the problem. During the test I need to do \\myserver and login before running my batch script. So, now it woks with UNC ;-) msiexec /qb /i \\myserver\wpkg\client\wpkg client 1.2-rc6.msi SETTINGSFILE=\\myserver\wpkg\client\settings.xml Thanks. -- Daniel Dehennin RAIP de l'Orne - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users