Re: [wpkg-users] Batch file not working
Falko Trojahn-2 wrote: Hi, The .bat contains the following lines: cd /D %userprofile%\appdata\roaming\thunderbird\Profiles for /D %%f in (*.default) do cd %userprofile%\appdata\roaming\thunderbird\Profiles\%%f\ rd extensions /s /q I then added the corrispondent line to the package install cmd='\\servername\wpkg\software\Mozilla Thunderbird\deletelightning.bat' / If i run the .bat file from the target PC, the folder is correctly deleted. If the .bat is run via wpkg package, it returns an error Could not process (install) package 'Mozilla Thunderbird' (Mozilla Thunderbird):|Exit code returned non-successful value (2) on command '\\servername\wpkg\software\Mozilla Thunderbird\deletelightning.bat' and the folder is not deleted. Where am i wrong? Wpkg runs as system user (usually), so you cannot use %userprofile% of a logged in computer user. Perhaps you could make something like a foreach loop to go thru all user's profiles and delete the corresponding path. Or better use a domain logon script or something like that. But for sure, you should be careful, to not delete wrong data ... Best regards, Falko - 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 Yeah, the problem in using a logon script is that it should be timed to run exactely after Thunderbird upgrade and before the new Lightning install. I don't think it's possible. Btw, i am forced to use the %userprofile% variable since ufortunately the default location of that DAMNED calendar (i have yeto to understand why it cannot be integrated directly in Thunderbird from the start) is %userprofile%\appdata\roaming\thunderbird\Profiles\random.profilefolder\extensions. And i cannot simply delete the thunderbird folder because the users would lose all the old calendar entries, mail settings and message filters. I'll give it a few more tries and then i'll simply wrote a global e-mail saying that the day TB will be upgraded users will have to manually uninstall the old version od Lightning and manual install the new version from a network repository. I wish we had Microsoft Outlook -.- -- View this message in context: http://old.nabble.com/Batch-file-not-working-tp32960075p32965356.html Sent from the WPKG - Users mailing list archive at Nabble.com. - 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] Batch file not working
Hello Claudio, Yeah, the problem in using a logon script is that it should be timed to run exactely after Thunderbird upgrade and before the new Lightning install. I don't think it's possible. that's a problem, indeed. If I remember well, some time ago people on this list used two wpkg systems - one for WPKG client as system service, and one for the logon script - to get things done. Btw, i am forced to use the %userprofile% variable since ufortunately the default location of that DAMNED calendar (i have yeto to understand why it cannot be integrated directly in Thunderbird from the start) is %userprofile%\appdata\roaming\thunderbird\Profiles\random.profilefolder\extensions. And i cannot simply delete the thunderbird folder because the users would lose all the old calendar entries, mail settings and message filters. So the easiest script would do the following (schematically): loop thru all %userprofile%..\* folders as %i if exist %i\appdata\roaming\thunderbird\profiles.ini get name of real folder from profiles.ini as %j delete %i\appdata\roaming\thunderbird\%j\extensions\{42b649d0-62e0-11da-8cd6-0800200c9a66} end if endloop Instead of get name of real folder from profiles.ini ... you could loop thru all folders within thunderbird\Profiles\, this should do pretty much the same as there is usually only one profile folder in. HTH, Falko - 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] Batch file not working
chiddie wrote: Falko Trojahn-2 wrote: Hi, The .bat contains the following lines: cd /D %userprofile%\appdata\roaming\thunderbird\Profiles for /D %%f in (*.default) do cd %userprofile%\appdata\roaming\thunderbird\Profiles\%%f\ rd extensions /s /q I then added the corrispondent line to the package install cmd='\\servername\wpkg\software\Mozilla Thunderbird\deletelightning.bat' / If i run the .bat file from the target PC, the folder is correctly deleted. If the .bat is run via wpkg package, it returns an error Could not process (install) package 'Mozilla Thunderbird' (Mozilla Thunderbird):|Exit code returned non-successful value (2) on command '\\servername\wpkg\software\Mozilla Thunderbird\deletelightning.bat' and the folder is not deleted. Where am i wrong? Wpkg runs as system user (usually), so you cannot use %userprofile% of a logged in computer user. Perhaps you could make something like a foreach loop to go thru all user's profiles and delete the corresponding path. Or better use a domain logon script or something like that. But for sure, you should be careful, to not delete wrong data ... Best regards, Falko - 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 Yeah, the problem in using a logon script is that it should be timed to run exactely after Thunderbird upgrade and before the new Lightning install. I don't think it's possible. Btw, i am forced to use the %userprofile% variable since ufortunately the default location of that DAMNED calendar (i have yeto to understand why it cannot be integrated directly in Thunderbird from the start) is %userprofile%\appdata\roaming\thunderbird\Profiles\random.profilefolder\extensions. And i cannot simply delete the thunderbird folder because the users would lose all the old calendar entries, mail settings and message filters. I'll give it a few more tries and then i'll simply wrote a global e-mail saying that the day TB will be upgraded users will have to manually uninstall the old version od Lightning and manual install the new version from a network repository. I wish we had Microsoft Outlook -.- I am quite slow to understand things but maybe i finally got why WPKG cannot use the %userprofile% variable: that's because the WPKG scripts run pre-logon and of course WPKG cannot know which user i will use to logon to the target machine, thus making WPKG run a script that deletes a specific user's folder before that user logon cannot of course succeed. But given this, the issue remains. I'm at a point now in which i will probably simply deploy the main program update and then ask the users that needs that extensions to go manually uninstall old extensions and install new ones. If i will have time to waste in the future i'll give it another try. -- View this message in context: http://old.nabble.com/Batch-file-not-working-tp32960075p32966495.html Sent from the WPKG - Users mailing list archive at Nabble.com. - 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] Batch file not working
In order to deploy an upgrade from Thunderbird 3.1.2 + Lightning 1.0b2 to Thunderbird 8 + Lightning 1.0, since i cannot use the instructions provided in the wiki page to update lightning silently (old Lightning versions are installed in %userprofile%\appdata\roaming\thunderbird\Profiles\.default\extensions, and not in the %programfiles%\mozilla thunderbird\extensions as the wiki says), i thought to make a small .bat that, after the Thunderbird upgrade and before the installation of the new version of Lightning, deletes the extensions folder of the %userprofile%. The .bat contains the following lines: cd /D %userprofile%\appdata\roaming\thunderbird\Profiles for /D %%f in (*.default) do cd %userprofile%\appdata\roaming\thunderbird\Profiles\%%f\ rd extensions /s /q I then added the corrispondent line to the package install cmd='\\servername\wpkg\software\Mozilla Thunderbird\deletelightning.bat' / If i run the .bat file from the target PC, the folder is correctly deleted. If the .bat is run via wpkg package, it returns an error Could not process (install) package 'Mozilla Thunderbird' (Mozilla Thunderbird):|Exit code returned non-successful value (2) on command '\\servername\wpkg\software\Mozilla Thunderbird\deletelightning.bat' and the folder is not deleted. Where am i wrong? -- View this message in context: http://old.nabble.com/Batch-file-not-working-tp32960075p32960075.html Sent from the WPKG - Users mailing list archive at Nabble.com. - 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] Batch file not working
Hi, The .bat contains the following lines: cd /D %userprofile%\appdata\roaming\thunderbird\Profiles for /D %%f in (*.default) do cd %userprofile%\appdata\roaming\thunderbird\Profiles\%%f\ rd extensions /s /q I then added the corrispondent line to the package install cmd='\\servername\wpkg\software\Mozilla Thunderbird\deletelightning.bat' / If i run the .bat file from the target PC, the folder is correctly deleted. If the .bat is run via wpkg package, it returns an error Could not process (install) package 'Mozilla Thunderbird' (Mozilla Thunderbird):|Exit code returned non-successful value (2) on command '\\servername\wpkg\software\Mozilla Thunderbird\deletelightning.bat' and the folder is not deleted. Where am i wrong? Wpkg runs as system user (usually), so you cannot use %userprofile% of a logged in computer user. Perhaps you could make something like a foreach loop to go thru all user's profiles and delete the corresponding path. Or better use a domain logon script or something like that. But for sure, you should be careful, to not delete wrong data ... Best regards, Falko - 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