Programatically set default file associations - Windows 8 Development and Hacking

In windows 8, programs "cannot" set themselves as the default to open a file. As a programmer, I want my power over the computer, so I have found a way to change the associations.
The "user choice" of the default file handler is located in the key
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\[extension here]\UserChoice
Unfortunately, this key is protected by some mystery hashing algorithm that incorporates the extension, your user account, and the program in some convoluted way.
Fortunately, we can, of course, set the default file handler by brutally deleting the other file handlers with extreme prejudice, making windows think that your program is the only available program capable of opening that type of file, thereby making it default.
These are located in:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\[extension here]\OpenWithList
HKCR\[extension here]\OpenWithList
How to:
1-set your program as "default" the normal way, as you would in windows 7.
2-delete the OpenWithList keys located in HKCU and HKCR, and if necessary, the UserChoice key.
3-???
4-Profit
If you use this process, please post feedback so that I know it works. When I get around to it, I will write a program as an example.

cool thanks work form me

Thank you for sharing this information. It pointed me in the right direction.
To not let the users continually shift between the desktop and the default Store Apps (Metro applications), we want to start all images and videos in the desktop programs.
It didn't work on our versions of Windows 8 Pro. HKCR\[extension here]\OpenWithList was empty or it didn't exist. The solution for me was:
1) change as needed: HKCU\Software\Microsoft\Windows\CurrentVersion\Exp lorer\FileExts\[extension here]\OpenWithList
2) remove all the keys beginning with 'AppX' for the desired file extensions in [HKEY_CLASSES_ROOT\[extension here]\OpenWithProgids]
If the user can use a virtual registry, you probably need to delete it for the elevated administrator and the user.
The keys beginning with AppX are the links to the Store Apps.
(Do not forget to backup registry keys before making changes)
All the extensions for video and images:
.3g2, .3gp, .3gp2, .3gpp, .aac, .adt, .adts, .AIF, .AIFC, .AIFF, .ASF, .ASX, .AU, .avi, .bmp, .dib, .gif, .jfif, .jpe, .jpeg, .jpg, .jxr, .M1V, .m2t, .m2ts, .M2V, .m3u, .m4a, .m4v, .MID, .MIDI, .mod, .mov, .MP2, .MP2V, .mp3, .mp4, .mp4v, .mpa, .MPE, .mpeg, .mpg, .mpv2, .mts, .png, .RMI, .SND, .tif, .tiff, .TS, .TTS, .wav, .WAX, .wdp, .wm, .wma, .wmd, .wms, .wmv, .WMX, .wmz, .WPL, .WVX
I hope this information can helps someone.

Or right click on a file of the type you want to modify and go to open with...
Sent from my SCH-I510 using Tapatalk 2

JihadSquad said:
Or right click on a file of the type you want to modify and go to open with...
Sent from my SCH-I510 using Tapatalk 2
Click to expand...
Click to collapse
If you read the thread title, you would realize that this is referring to programmatic modification of default associations. MS "prohibits" programs from modifying the default file associations, so this is a valid workaround.

Related

Declare Function Help

Hi
I'm simply trying to use a dll written in eVC, with a small app written in vVB.
The dll has mostly been wizard generated with an extra function call testing, which returns a 4 as an int.
I've compiled the dll as 'dll_test.dll' and after much messing about i've managed to register the pvbdecl.dll file which seems to be needed. Now i get the following error. 'dll_test.dll was loaded, but the DllRegistryServer entry point was not found'
I hope this is a small common problem? thanks for any help/hints in advance
just a follow up:
i cracked it. i was using the wrong naming convention in my dll. meaning that vb couldn't find the functions in the dll. (also removed some of the c++ stuff from the dll)
now i can use my dll with vb or c (using loadlibrary etc...). next step is to use it in c with just including the h file and linking to the lib file
if anyone is interested then let me know and i'll explain more.

[App][WM6.5] CHome Visual Editor - compatible with all kinds of CPR

[31/08/2009] New release is avaliable, you can download the new verison from: http://cve.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=32228
CHome Visual Editor is a visual CPR editor for Windows Mobile 6.5.
** You need install .net 3.5 sp1 in your computer in order to run CVE. **
With CVE, you can edit:
Titanium
LS_AlarmScene
LS_LockScene
LS_PhoneAlertScene
LS_PhoneCallScene
LS_SimplePinScene
StartMenu_GridScene
For this release, you can:
Open CPR file visually and move elements visually.
Modify all properties of the selected element by the property grid on the right side.
Change & Save (auto) the screen resolution.
Change & Save (auto) the scale rate.
Undo/Redo
Setup folder mapping between PPC and your OS.
Import registry file to load the element values (text, image source)
Save the modification.
More functions not listed.
This release only provide two language resource. The embedded language is Chinese, en-US is provided. If your OS language is not en-US, you may need to open configuration.xml and add one line to display en-US:
<language>en-us</language>
or you will get Chinese character.
wow.. looks like very good application
downloading & trying it now!!!!
Looks good indeed! Just downloaded but I can't try it now...
Got some problem here, I can't open any .cpr file to edit???
morningmoon said:
Got some problem here, I can't open any .cpr file to edit???
Click to expand...
Click to collapse
do you mean the application crash when you open *.cpr? can you upload error.log file here under CVE folder? it's all about the exceptions, none private will recorded in this file.
<?xml version="1.0"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<scale>1</scale>
<language>en-us</language>
<resolution>
<Width>240</Width>
<Height>320</Height>
</resolution>
<directory name="\Windows">
<mapping>Windows</mapping>
<mapping>E:\WindowsMobile\i780_21501_Kitchen\SYS\Lockscreen_DPI_96</mapping>
</directory>
<directory name="\Program Files">
<mapping>Program Files</mapping>
</directory>
</configuration>
Click to expand...
Click to collapse
Placed the language line in like above. But still no English.
Is there some thing we need to do more.
ebsbow said:
Placed the language line in like above. But still no English.
Is there some thing we need to do more.
Click to expand...
Click to collapse
This is strange, i copied your configuration and tested it in my comupoter, it works fine.
If you opened CVE and close it normally (the configuration will be saved again while cloing), the configuration should not not looks like your posted. the lanuguage should be the first element of configuration node. It may caused by path you placed CVE or permission issue.
JerryJiang said:
do you mean the application crash when you open *.cpr? can you upload error.log file here under CVE folder? it's all about the exceptions, none private will recorded in this file.
Click to expand...
Click to collapse
No. not crash, just can't get the Open File box to display, so I can't choose any file to open???
morningmoon said:
No. not crash, just can't get the Open File box to display, so I can't choose any file to open???
Click to expand...
Click to collapse
I never wrap the open file dialog. The open file dialog i am using is system provided, do you have any other WPF application in your computer that with a open file feature, if so, can you tested it whether it works fine?
error
Opening any CPR file the application is crashing. I am uploading the error log file. Please look and give a resolution.
Copied the "<language>en-us</language>" just below the configuration tag. But the problem is still the same.
All is in Chinees. is there anything else I need to check?
I have added the last error log.
ajeshm said:
Opening any CPR file the application is crashing. I am uploading the error log file. Please look and give a resolution.
Click to expand...
Click to collapse
The exception is caused by some color string of TextStage element in your CPR file, normally, i define the color in CPR file use the #FFxxxxxx pattern.
it seems that the color definition between WM and WPF have inconsistent rules. So can you look through the CPR file and try to find out whether there is any color definition in <TextStage/> section is not follow the rule?
I will update my code to fix the problem if you can kindlly post the inconsistant rule. Thx.
ebsbow said:
Copied the "<language>en-us</language>" just below the configuration tag. But the problem is still the same.
All is in Chinees. is there anything else I need to check?
I have added the last error log.
Click to expand...
Click to collapse
<?xml version="1.0"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<language>en-US</language>
<enable_effect>true</enable_effect>
<scale>1</scale>
<resolution>
<Width>240</Width>
<Height>320</Height>
</resolution>
<directory name="\Windows">
<mapping>Windows</mapping>
</directory>
<directory name="\Program Files">
<mapping>Program Files</mapping>
</directory>
</configuration>
karim_31 said:
<?xml version="1.0"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<language>en-US</language>
<enable_effect>true</enable_effect>
<scale>1</scale>
<resolution>
<Width>240</Width>
<Height>320</Height>
</resolution>
<directory name="\Windows">
<mapping>Windows</mapping>
</directory>
<directory name="\Program Files">
<mapping>Program Files</mapping>
</directory>
</configuration>
Click to expand...
Click to collapse
Thanks for posting your configuration. I should update my build package to include the language element instead of let the users update the xml by themselves.
ebsbow said:
Copied the "<language>en-us</language>" just below the configuration tag. But the problem is still the same.
All is in Chinees. is there anything else I need to check?
I have added the last error log.
Click to expand...
Click to collapse
Could you please try again with karim_31's configuration?
Unfortunately I don't have one. Still can't use this application
Any suggestion? What do I need to install for the open file to work?
Thanks!
JerryJiang said:
I never wrap the open file dialog. The open file dialog i am using is system provided, do you have any other WPF application in your computer that with a open file feature, if so, can you tested it whether it works fine?
Click to expand...
Click to collapse
The language works now,
Thanks, but the app seems to crash a lot when loading an cpr.
Disabling effects helps, but the apps crashes on other actions as well.
ebsbow said:
The language works now,
Thanks, but the app seems to crash a lot when loading an cpr.
Disabling effects helps, but the apps crashes on other actions as well.
Click to expand...
Click to collapse
Can you upload your error.log so that i can do some analysis to improve the quality of the application.
Sure. Here you go.
ebsbow said:
Sure. Here you go.
Click to expand...
Click to collapse
It's caused by color token:
http://forum.xda-developers.com/showpost.php?p=3952898&postcount=12
i will add more check of the token, by unless i get the inconsistant token, the color may not display correctly.
I cant even launch it
No error log... so where do i need to install all the files? it simply says that the app fails... thats all!
what im a doing wrong?
I set all in C:\ and the stwater added to windows directory

XML help

I'm new to vb.net and writing my first app for windows mobile 6.
I need help with an XML reader/writer. Is there anyone willing to help me with this.
I have an AT&T Fuze and want to use the AT&T tab in manilla as a game tab
I can edit the file nessary(att_tabitems.xml) on my desktop with notepad and all works fine. But if I edit it on the phone with the program I made after saving the file It is half the size an the At&t tab in manila can't read the file; however, opening each file the origional and the one my app created on the phone they seem to have the same information in them. word for word.
I use the readfiles/writefiles options in vb to read and write the file. I think I need to use a method of writing XML I did try and use the System.XML xmlDocument to try and read in the xml file but was unable to get it to work.
I was hoping someone here had an example of an app they had writen that reads/writes XML on the smartphone.
Hmm...You are editing it with an app you made? Any chance you can PM me the source and maybe I can figure it out from there. My best bet would be that you are forgetting to Close() the file, creating an access issue...
I'd be able to give you a better answer if you send me the code

Contents.xml

SystemFS\User\MultiStage\Contents.xml
You could extract this file from *.FFS or grab from handset.
Maybe some tweaking possible...
S5PC110_EVT1_UM10.pdf
2D Graphic Engine
− BitBLT
− Supports maximum 8000x8000 image size
Click to expand...
Click to collapse
<FileFormat>
<JPG>
<MaxFileSize value="4096000"/>
<MaxWidth value="5000"/>
<MaxHeight value="5000"/>
<ThumbNail>
<MaxWidth value="1280"/>
<MaxHeight value="1024"/>
</ThumbNail>
</JPG>
There are more infos in this file...
<MaxInstallCount>
<NativeApp value="100"/>
<NativeWidget value="50"/>
<JavaApp value="-1"/>
</MaxInstallCount>
</AStore>
</Contents>
</SDP>
Check out, maybe interesting or helpfull.
Best Regards
I already tryed to increase the max. resolution to 8000x8000px for jpg a week ago but it didnt worked
This file exists 2 times and I flashed them correctly to the wave (tested with sTunes after flash), the limits seems to be set somewhere else...
The image sizelimit is also higher than 4096000 byte (or what it is) - about 10 mb.
I would have liked to tweak this setting to 200 or more and see but unfortunately there are not that many good apps to install.
<MaxInstallCount>
<NativeApp value="300"/>
<NativeWidget value="50"/>
<JavaApp value="-1"/>
</MaxInstallCount>
Btw, what does this Java value mean ? Could it be that it controls whether to show icon in Menu or not ?
SystemFS\User\MultiStage
User\MultiStage
@ st0rmi
Thanks.
Yes, via sTune this file is twice.
It seems writeprotected files are most in folder SystemFS... as Backup.
If you check via TriX Firmware files. Then Contents.xml is in *.FFS... maybe edit before flashing. Then changes in both files on handset.
Not tested yet...
@ rex4u
At the moment I have nothing changed in this file, so no idea what happens.
Maybe soon few tests...
Best Regards
@adfree: Yeah thats what I have done
I just used sTunes to copy the contents.xml back to my pc and view if the edited xlm are really on my phone because it didnt worked...
@adfree
No bro' I was offering my own suggestions to this configuration file.
It might allow us to install more than 100 apps in phone and show in Menu.
Second it might show Java apps icons in Menu.
My 2 cents
xml parser
please help me
a want to parser punker xml data base.
rex4u said:
I would have liked to tweak this setting to 200 or more and see but unfortunately there are not that many good apps to install.
<MaxInstallCount>
<NativeApp value="300"/>
<NativeWidget value="50"/>
<JavaApp value="-1"/>
</MaxInstallCount>
Btw, what does this Java value mean ? Could it be that it controls whether to show icon in Menu or not ?
Click to expand...
Click to collapse
it's into the 'app counter' field, '-1' may be means 'unlimited' number of java apps installable, but I haven't read yet the whole xml... anyway if it is editable it's an interesting thing..
I saw that file a while ago while looking for something inside my phone (very special thing that made me to copy the whole phone)
there is a lot of interesting things but i never tried tweaking it
Maybe if someone have enough knowledge to add few new extensions and test them
Also removing some stupid limits would be awsome
Sorry i've no time to test that with you guys but would appreciate results
Best Regards
You dont need modif ffs or other just use pfs file to modif what you want and in real time direct phone flash pfs file and not have write protect problem
Just says Thank
Example file : dont give attention of boot img cause i dont take time to do it in 800x480 but its 400x240 then its make bug but with pfs file you can upload anything you want to change !!!
Good hack !!!
Maybe with this you can create dual boot or i dont know what a pro smoker can do, you can also try to put her rc2 or rc1 directory i dont try it !!!
Download example, in this one you can see SystemFS and Registry directory, off course you can put her all directory you want to flash pfs, using trix to modified or wave remaker more faster :
https://rapidshare.com/files/809973956/Circle.pfs
An idea its like you can make your one firmware with personal Widget installed and other idea welcome....Just take file registry and Widget folder on phone and put it on PFS
i can not open new thread
i went to parser an xml file with structure like this.
<?xml version="1.0"?>
<node1>
<node2>
<node3>
<node4>
<node5>
text
</node5>
</node4>
</node3>
</node2>
</node1>
Click to expand...
Click to collapse

[HACK] Customizing Bada OS

Hi all, using TkFileExplorer 2.4 you can see and edit Bada system files, in this thread I will report all usefull changes I will find and you could perform using this tool
If you find something other, you might write it here so we have all them collected in the same place
How to use TkFileExplorer:
-Connect your wave to PC with usb cable;
-Select USB Debug connection;
-Start TkFileExplorer and clic Connect;
-if the program fails to connect, try changing the COM port number in Settings;
-Make a backup of the files you change;
-...and try at your own risk!
Changing default browser brightness:
File: Phone:/Settings/Default/Registry/BrowserSettings.ini
Customize power on/off screen:
for configuration:
File: Phone:/Settings/Default/Registry/PowerOnOff.ini
for resources:
Directory: Phone:/SystemFS/PowerOnOff/
Change volume presets for calls, audio player, fm radio, video player, ringtone...:
File: Phone:/SystemFS/Driver/volpresets.xml
Cleaning themes preview images:
Simply clean the files in:
Directory: Phone:/User/Mass/Theme/Default/
Change camera settings:
File: Phone:/Settings/Default/Registry/CamSetting.ini
File: Phone:/SystemFS/Driver/CameraCaps/DevCamDeviceCapsNConfig_Primary.xml [only Bada 1.2]
Change Samsung LBS settings:
File: Phone:/Settings/Default/Registry/LbsConfig.ini
for using external bluetooth gps antenna, change BtGPS=1 (not tested yet) in:
File: Phone:/Settings/Default/Registry/LbsAppRegistry.ini
Usefull directories:
Internal user storage: Phone:/Media
MicroSD storage: Phone:/Mount/Mmc
Preinstalled apps: Phone:/Osp/Application/
Hey thanks a lot for the heads up! I just had a question... Can we really change the intro animation..? I mean completely replace it..? Or is that not possible??
Reply soon....
Hi all, I find the file /User/OspSys/LifeLog/Database/lifelog.db.
It's SQLite (view by sqlitebrowser.sourceforge.net )
There are many information, calls, deleted messages (but only 100 chars).
I hope, it's information isn't send anywhere, because my wave is trying to connect once a day (it's maybe one of the widget)
sonalswaroop said:
Hey thanks a lot for the heads up! I just had a question... Can we really change the intro animation..? I mean completely replace it..? Or is that not possible??
Reply soon....
Click to expand...
Click to collapse
hi, today I just gave a quick look to all files, but I think it's possible, in PowerOnOff.ini there are clear bindings to two .swf files and a startup / shutdown .wav sound contained in the resource path Phone:/SystemFS/PowerOnOff not sure, need to watch those files, I'll verify in next days..
guari said:
Change volume presets for calls, audio player, fm radio, video player, ringtone...:
File: Phone:/SystemFS/Driver/volpresets.xml
Click to expand...
Click to collapse
Yes, you can change this too in Trix but in fact nothing change. Exp. you can't change "volume level" (exp. in MediaPlayer there is limit to 14 steps, if you change that to 15 steps and add one more <spklevel> and <earlevel>-so that there will be 15 steps, but nothing change in Wave, you can still able go to max. 14 steps in MediaPlayer) and you can't change that may mp3 playing miusic lauder as well as playing video, even if you copy and paste settings from VideoPlayer to MediaPlayer (only test that on speaker not on headphones).
In Registry\MainMenu_reg.ini you can remove any icons from the main menu (except SamsungApps). The file format is clear, I will note only that the system items will have MenuType=0, custom user applications - MenuType=1, SamsungApps - MenuType=2.
And, of course, make a backup before any manipulations with MainMenu_reg.ini
to be clear
adfree had made all those expermintes before & we already know these things
if there is something new please post it
Is there a file in registry where are the settings for the screen lock?Or other display related settings?
azcv said:
Is there a file in registry where are the settings for the screen lock?Or other display related settings?
Click to expand...
Click to collapse
Unfortunately I have not found anything like that using tkFileExplorer...
Assuming that replacing original browser it's difficult to do, source code is available (http://opensource.samsung.com/reception/reception_main.do?method=reception_list&menu_item=mobile thanks to sabianadmin) but the browser seems deeply integrated in the os files (also notice that Samsung Dolfin is not the open source browser Dolphin..): is there anyone who found in filesystem files the textures used by the browser GUI? if aren't cripted it will be possibile to change them for having a more usable GUI on our little screen (I'm thinking of upper/lower bars..)
guari said:
Assuming that replacing original browser it's difficult to do, source code is available (http://opensource.samsung.com/reception/reception_main.do?method=reception_list&menu_item=mobile thanks to sabianadmin) but the browser seems deeply integrated in the os files (also notice that Samsung Dolfin is not the open source browser Dolphin..): is there anyone who found in filesystem files the textures used by the browser GUI? if aren't cripted it will be possibile to change them for having a more usable GUI on our little screen (I'm thinking of upper/lower bars..)
Click to expand...
Click to collapse
I think the browser user interface might be in the file called BrowserAppControl.so which can be found in the SystemFS>Osp folder. All files in that folder are in .so formats. But they are RSA 1024bit signed. And they are not like other settings in phones which are written in html or xml. These files are similar to the .dll files on Windows. .so files are Linux format files.
Is there anyway to modify an *.ini file to enable "Noise Reduction" to always be on during calls?
tibere86 said:
Is there anyway to modify an *.ini file to enable "Noise Reduction" to always be on during calls?
Click to expand...
Click to collapse
I will check on that and get back to you.
astrotom said:
I will check on that and get back to you.
Click to expand...
Click to collapse
Thank you astrotom!
Can I changing default brightness in the VideoPlayer?
Hello
This software doesn't work with my phone. I can't click on the connection i receved error message : "Warning : Unable to open the specified port. Please try again". But i can't configure in the settings.
Thanks for your help.
I'm sory for my bad english, but i'm french.
vort said:
Hello
This software doesn't work with my phone. I can't click on the connection i receved error message : "Warning : Unable to open the specified port. Please try again". But i can't configure in the settings.
Thanks for your help.
I'm sory for my bad english, but i'm french.
Click to expand...
Click to collapse
i got the same error
im running the latest firmware s8530DXKB1/s8530OLBKB1
you have to specify the port you are using for connection from settings
in Phone:/SystemFS/Driver/CameraCaps/DevCamDeviceCapsNConfig_Primary.xml
you can change max ISO and max resolution parameters for phone camera, so you can set iso1600 or 8mp for photos, probably it is useless but it's still a hack
thanks to: http://www.badaitalia.com/2011/06/13/fotografie-con-poca-luce-a-iso-1600/
(on Bada 1.0.2 this system folder is missing so it's not possible..)
Yeah, I read it. Tonight I'll try and I'll let you know.

Categories

Resources