View Full Version : How to activate TSK file from commandline?
dinero112
2nd April 2007, 02:04 PM
Hi,
Does anybody have an idea how i can activate theme (*.tsk) file without having to run the Today Settings? I am looking at copying a tsk file over the air to 250+ devices and want to activate it without the owners having to manually go into settings--> today.
Help is much appreciated!
Francois
Menneisyys
2nd April 2007, 03:49 PM
Hi,
Does anybody have an idea how i can activate theme (*.tsk) file without having to run the Today Settings? I am looking at copying a tsk file over the air to 250+ devices and want to activate it without the owners having to manually go into settings--> today.
Help is much appreciated!
Francois
Under pre-WM5, it was pretty simple:
//
// Set the wallpaper
//
lRet = RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Today"), 0, 0,
&hKey);
if(ERROR_SUCCESS == lRet)
{
SetKeyValue(hKey, _T("WallFile"), _T("\\windows\\tdycust.gif"));
SetKeyValue(hKey, _T("Wall"), _T("Wallpaper"));
SetKeyValue(hKey, _T("Watermark"), _T("tdycust.gif"));
RegCloseKey(hKey);
//
// Broadcast the update today message
//
::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
}
(all this is explained in my related article at, say, http://www.mobilitysite.com/forums/utilities-applications/21346-eeverything-you-wanted-know-about-today-backgrounds-themes.html ; also see http://www.pocketpcdn.com/articles/changetodaytheme.html )
Dunno if it works under WM5+
dinero112
10th April 2007, 10:35 AM
Thank you, I will try tomorrow and post the results.
Francois
levenum
10th April 2007, 10:01 PM
There is an even easier way and it works for all OS:
wceload mytask.tsk
wceload.exe is the file under windows that installs cab and tsk files. You can find description of its command line options in MSDN.
Oh, and here is the full article (http://www.pocketpcdn.com/articles/changetodaytheme.html).
dinero112
11th April 2007, 11:48 AM
Under pre-WM5, it was pretty simple:
Dunno if it works under WM5+
Menneisyys, I have tried you suggestions today but no luck. WM5 doesn't seem to have a tdywater.gif and stwater.gif. Also the regkeys mentioned in your article do not seem to apply to WM5 (you warned me...)
I have also looked at the method suggested by Levenum, the problem I have is that I am not familiar with VBS scripting and have no clue how to run it on a WM5 device. The VBS script seems the only option because there is no way to "Use the magical touch: SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);" from the command line. (I am using a management and provisioning tool to send the files via GPRS to the device and this tool can execute files.)
My question for the moment, how can I run the vbs file?
Francois
levenum
11th April 2007, 09:00 PM
To my knowledge there is no way of tuning VBS files on WM devices, but where did you get the VBS idea from?
The article I referred you to lists a C++ code. If you do not know how to program in C++ thats ok too. As long as you have a way of running an exe with command line parameters (which I understand you do).
Just run:
wceload /safe /noui /nouninstall /delete 0 mytask.tsk
and it should do the trick.
dinero112
12th April 2007, 04:07 PM
The article I referred you to lists a C++ code.
Mistaking it for VBS shows how much I know on this issue :)
Just run:
wceload /safe /noui /nouninstall /delete 0 mytask.tsk
and it should do the trick.
I tried following:
- Delete the HKCU\Software\Microsoft\Today\UseStartImage registry value
- Execute wceload /safe /noui /nouninstall /delete 0 mytask.tsk
- Set registry key HKCU\Software\Microsoft\Today\Skin to mytask.tsk
For some reason this does not do the job for me, the new tsk file does not become active.
The reason I am looking for a way to execute the (SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0 )code is that to my opinion this is the way to update (activate) the settings.
Am I missing something here?
Francois
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.