[wpkg-users] Batch file not working

chiddie claudio.ghirardi at geniaware.com
Tue Dec 13 11:19:04 CET 2011




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 at 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.




More information about the wpkg-users mailing list