MAVERICKS CHOICE Posted May 8, 2011 Posted May 8, 2011 Hello Guys, just a quick one is it @ all possible to preset gadget setting for the MS weather app to show the correct location eg Sydney NSW. In my xml I nominate my local setting for time zone etc & region, timezone is perfect in UA. However the gadget automatically picks Canberra as default location? Canberra is close to Sydney but is not what I require.I can manually change upon install. Is there anyway to export the setting to use in UA?Thanks,
myselfidem Posted May 8, 2011 Posted May 8, 2011 (edited) Yes! I do like this (for Calendar, Weather and Clock Gadgets):1) On your computer you can select the options you want2) Go to "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\Settings.ini" (show hiden files and folders)3) Copy/paste the Settings.ini file inside your distribution folder: %Win7_Folder%\sources\$OEM$\$$\SETUP\SCRIPTS\Settings.ini4) Create a batch file to the silent installation and set this one inside the same folder SCRIPTS:I use WPI 8.1.0 to launch this batch file at last:Clean.cmdREM Gadgets Settings customizedattrib -A -I "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\Settings.ini" /S /DCOPY /Y "%~dp0Settings.ini" "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\"attrib +A +I "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\Settings.ini" /S /DREM Restart 'sidebar.exe'SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY%\001 /V 1 /D "%systemdrive%\Program Files\Windows Sidebar\sidebar.exe" /fshutdown.exe /r /t 30I chose also the same Gadgets inside my Autounattend.xml.*Edit: post updated with the correct attributes for the Settings.ini file. Edited May 28, 2011 by myselfidem
MAVERICKS CHOICE Posted May 8, 2011 Author Posted May 8, 2011 Thanks for the heads up. Could I also drop the ini file into a mounted wim say in the admin & default user folders perhaps?
myselfidem Posted May 8, 2011 Posted May 8, 2011 (edited) Thanks Maybe it's possible. I haven't tested, but I think in this case it's better do not set Gadgets inside Autounattend.xml file, because the file Settings.ini will be modded as default settings (I think)!But you can choose to set the Gadgets after the installation is complete and your customized settings will be displayed.Cheers. Edited May 8, 2011 by myselfidem
MAVERICKS CHOICE Posted May 8, 2011 Author Posted May 8, 2011 Thanks Maybe it's possible. I haven't tested, but I think in this case it's better do not set Gadgets inside Autounattend.xml file, because the file Settings.ini will be modded as default settings (I think)!But you can choose to set the Gadgets after the installation is complete and your customized settings will be displayed.Cheers.Just tested, forget my method your right setup will overwrite if Gadgets specified in your xml Next step will test your method.
myselfidem Posted May 8, 2011 Posted May 8, 2011 (edited) Here is the result with the batch file with my customized settings for the Gadgets. Settings.ini customized and added Gadgets inside Autounattend.xml file.Weather settings are set for Geneva (Switzerland).Image Gadgets customized at first logonImage Gadgets with the Internet connection*Edit: a restart is needed to see the Gadgets settings customized !1) At first, the settings inside the Autounattend.xml file installs the Gadgets wanted.2) And at last the Settings.ini is overwrited (writing a new time) with the customized settings with the batch file.3) After the reboot we can see the Gadgets customized with our personnal settings.*Edit 2: Maybe that can solve some troubleYou can also add this reg file inside the SCRIPTS folderTweaks.regWindows Registry Editor Version 5.00; Restore Gadgets on the Desktop after disabling UAC[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar\Settings]"AllowElevatedProcess"=dword:00000001; Show Gadgets[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]"Sidebar"="\"C:\\Program Files\\Windows Sidebar\\sidebar.exe /autoRun""[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Sidebar][HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Sidebar\Settings]"ShowGadgets"=dword:00000001Clean.cmdattrib -A -I "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\Settings.ini" /S /DCOPY /Y "%~dp0Settings.ini" "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\"attrib +A +I "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\Settings.ini" /S /DREM Restart 'sidebar.exe'SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY%\001 /V 1 /D "%systemdrive%\Program Files\Windows Sidebar\sidebar.exe" /fREM Registry TweaksREGEDIT /S "%systemroot%\Setup\scripts\Tweaks.reg"shutdown.exe /r /t 30*Edit: post updated with the correct attributes for the Settings.ini file. Edited January 7, 2012 by myselfidem
MAVERICKS CHOICE Posted May 16, 2011 Author Posted May 16, 2011 Thanks, tried all your suggestions & always stuck on the Canberra location?? Must be missing something!
myselfidem Posted May 17, 2011 Posted May 17, 2011 The Desktop must be load first and after the batch file is launched (I use WPI) to work properly!After the installation is done, check if the Settings.ini file is the good one!
MAVERICKS CHOICE Posted May 25, 2011 Author Posted May 25, 2011 Bugging me this! Cannot seem to have my saved ini overwrite the finished one? I'm enabling the gadgets to my liking in the xml, they all appear as they should.Picked the eyes out of your suggestions & noticed your using runonce in the cleanup.cmd. Maybe it's a timing issue in that the desktop is slow to load whilst executing runonce possibly??
ricktendo Posted May 25, 2011 Posted May 25, 2011 (edited) Try sidebar.exe /autoRun parameter see if that solves the problem Edited May 25, 2011 by ricktendo64
MAVERICKS CHOICE Posted May 25, 2011 Author Posted May 25, 2011 Try sidebar.exe /autoRun parameter see if that solves the problemThanks Rick, will do.
myselfidem Posted May 26, 2011 Posted May 26, 2011 (edited) When you copy/paste the file Settings.ini, right-click on Properties and check if the "Read only" is desabled, and if not uncheck! Also for Unlok.You can also try to create an SFX file (post #229):http://www.msfn.org/...s/page__st__220------------------------------------------------------------------------------------------*Edit: Example with adding the reg file "Tweaks" inside the config.txt:config.txt;!@Install@!UTH-8!GUIMode="2"RunProgram="regedit /s Tweaks.reg"SetEnvironment="KEY=HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce"RunProgram="hidcon:attrib -A -I \"%userprofile%\\AppData\\Local\\Microsoft\\Windows Sidebar\\Settings.ini\" /S /D"RunProgram="hidcon:cmd /c COPY /Y Settings.ini \"%userprofile%\\AppData\\Local\\Microsoft\\Windows Sidebar\\\""RunProgram="hidcon:attrib +A +I \"%userprofile%\\AppData\\Local\\Microsoft\\Windows Sidebar\\Settings.ini\" /S /D"RunProgram="hidcon:cmd /c REG ADD %KEY%\\001 /V 1 /D \"%systemdrive%\\Program Files\\Windows Sidebar\\sidebar.exe\" /f";¨@InstallEnd@!Tweaks.regWindows Registry Editor Version 5.00; Restore Gadgets on the Desktop after disabling UAC[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar\Settings]"AllowElevatedProcess"=dword:00000001[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]"Sidebar"="\"C:\\Program Files\\Windows Sidebar\\sidebar.exe /autoRun""[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Sidebar][HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Sidebar\Settings]"ShowGadgets"=dword:00000001*Edit: If you install Windows 7 x64, you can add:SET KEY=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY%\001 /V 1 /D "%systemdrive%\Program Files (x86)\Windows Sidebar\sidebar.exe" /fREM Customizing Gadgets x64ATTRIB -A -I "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\Settings.ini" /S /DCOPY /Y "%~dp0Settings.ini" "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\"ATTRIB +A +I "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\Settings.ini" /S /DREM Lauch 'sidebar.exe'SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY%\001 /V 1 /D "%systemdrive%\Program Files\Windows Sidebar\sidebar.exe" /fSET KEY=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY%\001 /V 1 /D "%systemdrive%\Program Files (x86)\Windows Sidebar\sidebar.exe" /fREM Customize Registry settingsREGEDIT /S "%systemroot%\Setup\scripts\Tweaks.reg"SHUTDOWN.EXE /r /t 10EXITAdd same lines for using "config.txt".Tested and works fine! (Always lauch the batch file after the desktop is loaded!Image Gadgets on Windows 7 x64You can also download the new Oracle Sun VirtualBox 4.0.8:http://www.virtualbo.../wiki/DownloadsI hope that will help you! Edited January 7, 2012 by myselfidem
MAVERICKS CHOICE Posted May 27, 2011 Author Posted May 27, 2011 When you say run batch following desktop loads this being before the sidebar is visible? Cannot make this work UA atm? If I kill the sidebar & pack the settings.ini to an archive works ok, but then have to start the sidebar again.
myselfidem Posted May 27, 2011 Posted May 27, 2011 (edited) When you say run batch following desktop loads this being before the sidebar is visible?Excuse my english! After Windows® Welcome, the "Preparing Your Desktop" screen appears for up to two minutes.It's needed to see first the sidebar (visible and installed with Autounattend.xml) and after the batch file is launched and other programs (I use WPI).And we will see our customized Gadgets after the reboot!I keep the same order inside Autounattend.xml and Settings.ini for the Gadgets:Settings.ini [Root]SettingsVersion="00.00.00.02"ShowGalleryPrivacyStatementOnceComplete="true"Section0="1"Section1="2"Section2="3"[Hashes]C:\Program Files\Windows Sidebar\Gadgets\Clock.Gadget="%7B196EB779-40FE-AE35-C357-36AACE0AA470%7D"C:\Program Files\Windows Sidebar\Gadgets\Calendar.Gadget="%7BD3D8A841-CEE3-68C5-F99F-7302ABBBA0E3%7D"C:\Program Files\Windows Sidebar\Gadgets\Weather.Gadget="%7B42DE9D91-AEE2-BAC6-FEE5-ADCC7B7904C4%7D"...........Autounattend.xml</component> <component name="Microsoft-Windows-Sidebar" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="[url="http://schemas.microsoft.com/WMIConfig/2002/State"]http://schemas.microsoft.com/WMIConfig/2002/State[/url]" xmlns:xsi="[url="http://www.w3.org/2001/XMLSchema-instance"]http://www.w3.org/2001/XMLSchema-instance[/url]"> <Gadget1>%PROGRAMFILES%\Windows Sidebar\Gadgets\Clock.Gadget</Gadget1> <Gadget2>%PROGRAMFILES%\Windows Sidebar\Gadgets\Calendar.Gadget</Gadget2> <Gadget3>%PROGRAMFILES%\Windows Sidebar\Gadgets\Weather.Gadget</Gadget3> </component>Maybe we can find a best method? Edited May 27, 2011 by myselfidem
MAVERICKS CHOICE Posted May 27, 2011 Author Posted May 27, 2011 When you say run batch following desktop loads this being before the sidebar is visible?Excuse my english! After Windows® Welcome, the "Preparing Your Desktop" screen appears for up to two minutes.It's needed to see first the sidebar (visible and installed with Autounattend.xml) and after the batch file is launched and other programs (I use WPI).And we will see our customized Gadgets after the reboot!I keep the same order inside Autounattend.xml and Settings.ini for the Gadgets:Settings.ini [Root]SettingsVersion="00.00.00.02"ShowGalleryPrivacyStatementOnceComplete="true"Section0="1"Section1="2"Section2="3"[Hashes]C:\Program Files\Windows Sidebar\Gadgets\Clock.Gadget="%7B196EB779-40FE-AE35-C357-36AACE0AA470%7D"C:\Program Files\Windows Sidebar\Gadgets\Calendar.Gadget="%7BD3D8A841-CEE3-68C5-F99F-7302ABBBA0E3%7D"C:\Program Files\Windows Sidebar\Gadgets\Weather.Gadget="%7B42DE9D91-AEE2-BAC6-FEE5-ADCC7B7904C4%7D"...........Autounattend.xml</component> <component name="Microsoft-Windows-Sidebar" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="[url="http://schemas.microsoft.com/WMIConfig/2002/State"]http://schemas.microsoft.com/WMIConfig/2002/State[/url]" xmlns:xsi="[url="http://www.w3.org/2001/XMLSchema-instance"]http://www.w3.org/2001/XMLSchema-instance[/url]"> <Gadget1>%PROGRAMFILES%\Windows Sidebar\Gadgets\Clock.Gadget</Gadget1> <Gadget2>%PROGRAMFILES%\Windows Sidebar\Gadgets\Calendar.Gadget</Gadget2> <Gadget3>%PROGRAMFILES%\Windows Sidebar\Gadgets\Weather.Gadget</Gadget3> </component>Maybe we can find a best method?Then I reckon my problem here is the "runonce" is happening before the sidebar is fully loaded? I initiate the batch in my cleanup.cmd following runonceex for app installs. Slowing that up to allow the runonce to do it's thing has got me atm? WPI is not a happy camper in W7x64 so far for me.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now