-create a file .bat
-copy those lines
netsh wlan set hostednetwork mode=allow ssid=XXXX key=XXXXPSWD
netsh wlan start hostednetwork
-run the file as administrator
<Extensions> <FileTypeAssociation Name="Windows Phone SDK test file type" TaskID="_default" NavUriFragment="fileToken=%s"> <Logos> <Logo Size="small" IsRelative="true">Assets/sdk-small-33x33.png</Logo> <Logo Size="medium" IsRelative="true">Assets/sdk-medium-69x69.png</Logo> <Logo Size="large" IsRelative="true">Assets/sdk-large-176x176.png</Logo> </Logos> <SupportedFileTypes> <FileType ContentType="application/sdk">.sdkTest1</FileType> <FileType ContentType="application/sdk">.sdkTest2</FileType> </SupportedFileTypes> </FileTypeAssociation></Extensions>
namespace sdkAutoLaunch { class AssociationUriMapper : UriMapperBase { private string tempUri; public override Uri MapUri(Uri uri) { tempUri = uri.ToString(); // File association launch if (tempUri.Contains("/FileTypeAssociation")) { // Get the file ID (after "fileToken="). int fileIDIndex = tempUri.IndexOf("fileToken=") + 10; string fileID = tempUri.Substring(fileIDIndex); // Get the file name. string incomingFileName = SharedStorageAccessManager.GetSharedFileName(fileID); // Get the file extension. string incomingFileType = Path.GetExtension(incomingFileName); // Map the .sdkTest1 and .sdkTest2 files to different pages. switch (incomingFileType) { case ".sdkTest1": return new Uri("/sdkTest1Page.xaml?fileToken=" + fileID, UriKind.Relative); case ".sdkTest2": return new Uri("/sdkTest2Page.xaml?fileToken=" + fileID, UriKind.Relative); default: return new Uri("/MainPage.xaml", UriKind.Relative); } } // Otherwise perform normal launch. return uri; } } }
more info :
http://msdn.microsoft.com/library/windows/apps/jj206987(v=vs.105).aspx
Enjoy!