change default install location of windows 10 store uwp app - c#

I have a windows 10 uwp app that runs fine when i have it sideloaded in my computer or any users computer where they have full admin priviliges. i use appxbundle and click on install button to install the same. Even powershell installation works fine.
Some of our clients don't have access to C: drive and the installation of UWP app is incomplete or fails because they don't have any install permissions.
Is it possible to run UWP app stand alone or specify a different install location which is other than C drive where user has both read and write permissions .
I tried to use .exe generated in the bin folder of uwp x64/Release folder but that doesn't run as uwp doesn't support exe

Currently, there is no such feature in UWP. UWP can't change the install process when installing, which means UWP apps can't choose where apps should be installed.
But there is a setting for Windows 10 that could change the location where the UWP apps are installed.
You could go to the Settings app and navigate to System > Storage.
Under the More Storage Settings heading click on the link that says Change where new content is saved.
You can choose one drive from the drop-down menu under "New apps will save to" and then click Apply. A new folder called "WindowsApps" will be created in the drive you've chosen. And any new UWP app will be installed in this folder. Please note Windows 10 will only install new apps to the currently selected location. Existing apps do not get moved to the new location.
Like this:

Related

Winform application not running after installing into program files directory

I had created a windows form application and used setup project to create installer. But after installing my application the application is not opening from the location it is installed("c:\Programs Files(86x)\"). But the application runs fine if i copy the entire installed files to another drive. Actually my application is creating some folder inside the installed directory when running. so i thought it is some problem related to windows permissions. I had set app privileges as "requireAdministrator" and still not working. Can anyone help me with a solution?
Actually my application is creating some folder inside the installed directory when running.
Don't do that!
The Program Files folder is read only to standard users, and has been since Windows 2000. And since Windows Vista even Administrator users will require elevation to get write access into this folder.
Use the All Users Application Data folder instead (Environment.SpecialFolder.CommonApplicationData).
The alternative is an advanced installer product (meaning purchasing the full version of InstallShield or similar rather than the version included with Visual Studio) which supports adding an action to your install process that both creates the folder and sets new permissions, and does this at install time. But that's really a cheat, anyway. Just use Application Data.

Windows Phone 8.1 build appx file with Visual Studio Ultimate 2013

I use Visual Studio Ultimate 2013 to build first Windows Phone 8.1 app.
After build, I get appxupload file and appx file.
And after that, I upload file to store, but I get Attention is can't test my app.
So, I use real phone to test with appxupload file and appx file, but 2 file can't install on phone.
And I build app again, I see "the option to create x86 package is disabled because it's not valid package that can be published to the windows phone store".
Do I miss something?
Why appxupload file and appx file can't install on phone?
How to build correct file upload to store?
Do I miss something? Why appxupload file and appx file can't install on phone?
For Windows Phone 8.1 app, you could deploy and test your app in Windows Phone Emulator first. While it would be highly recommended to test your app on actual device before you upload it to the Store.
For sideloading Windows Phone 8.1 app, you could try to use the Application Deployment tool:
• First you have generate your app package
• Then make sure the device is registered and connected
• Find the Application Deployment tool in Start menu
• Run the tool and browse the package file (.appx) then click deploy
For details, please refer to Deploy Windows Phone 8.1 apps with the Application Deployment tool.
How to build correct file upload to store?
To make your app pass the certification, you could re-create your app package following Create a Windows 8.1 app package.
After you finish generating package, please ensure your app pass the Windows App Certification Kit test first, which is not necessary but a best practice before submitting package to the Store.
It seems that your app fail to pass the certification for “the app must be testable”. You might as well add some notes for certification to the tester:
e.g. if your app requires users to sign in to a service, you need to provide a test account in it. This can ensure your app is tested correctly.

menu > Project > Store is not enabled(windows xamarin crossplatform)

I created a Xamarin portable platforms app which contains four projects, Portable, Android, iOS and Windows Phone. When I make the Windows Phone project the start up project and then select menu > Project > Store, the store menu is disabled. St this point I am not able to reserve an app name or link my app to a registered app name. Menu item Associate app with the store is also disabled. Is there anyway of fixing this problem, I have no way of publishing my app.
An easier way to publish your app is through the dashboard. Go to http://dev.windows.com.
Sign in, reserve your app name and setup all the artwork etc for your app.
Then when you compile your Windows Phone or Store app, just get the generated file (.xap or .appx) and upload.
But to make sure the Store menu option is enabled also try these things.
1. Select the Windows Phone App in the solution explorer
2. Make sure you are in release mode
3. Make sure you have it compiling for ARM.
However I have never actually deployed from Visual Studio (something I should check in to). All I have in my menu is launching the Windows App Certification Kit.

WPF app in Program File(x86) cant create/modify xml/xaml files successfully

In my WPF application (say MyApp), I have an option where I need to create/modify XML and XAML files. The app is installed in Program Files(x86)\MyAppFolder and location of these xaml/xml files is in a subfolder named "Config" within MyAppFolder. So whenever I try to create or modify xml/xaml files using MyApp and relaunch the MyApp next time I get prompted with the windows installer with a message "Please wait while windows configures MyApp". Windows installer runs and overwrites my changes back to original. When I installed the application I selected "Everyone" option to install it for all the users. The app is available to all the users but works for the user whom we installed from.
This C#/WPF application requires .NET 4 and I am running Windows 7 home premium.
I am creating the installer using the Setup Project type from the Visual Studio 2010 as follows:-
New Project -> Other Project Types -> Setup and Deployment -> Visual Studio Installer -> Setup Project
As of Windows Vista programs do not run as administrator by default. Only programs that are run as administrator can write to program files. You need to write your config files to CommonApplicationData instead.
var commonAppData = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)
var configFolder = Path.Compbine(commonAppData, "MyAppFolder")
On Windows Vista and up configFolder will likely equal C:\ProgramData\MyAppFolder.

How can I test the update path for my Windows 8 app?

When I develop for Windows Phone, I am able to side load the current version of the app (version on the Windows Store) and then run the app in development in the same emulator. This give me an idea if the app update work.
I am trying to do the same thing with Windows 8 App but it doesn't work. I side load the current version of the app and then run the app in development and I get the following message: "The app ... is already installed on this machine".
How can I test the update path for my Windows 8 app?
Thanks!
When you build an app from the Windows Store it gets packed up into a an .appx file, which, you can submit for certification or side load using the PowerShell script.
When you run it in a development environment (pressing “play” in Visual Studio) it installs an unpackaged version in a different directory. What this means is that you must remove the packaged version before you can install the unpackaged one.
However, you can build a package and side load that one, as long as the version number is larger than the one already installed:
In Visual Studio, right click on your project and select “Store” and then "Create App packages...". When asked if you need to build the package for upload to the Windows Store, select "No".
Choose an output location and enter a version number higher than the one of the currently installed version
Wait for the project to build.
Start Windows PowerShell from the start screen, and navigate to the output directory from the above step
Navigate to the sub directory for the correct build of your app (eg. “MyApp_1.0.1_x64_Debug”)
Run .\Add-AppDevPackage.ps1 and wait for the app to install.
This will have upgraded your current packaged install to the new version, which will allow you to test that any upgrade code in your app works, you will not, however be able to debug it in Visual Studio.
Note, that when your done testing, you should use the remove-appxpackage <Your app ID> (Documentation) PowerShell command to uninstall the side loaded version to prevent you from having issues if you try and install a version from the Windows Store.
Hope that's helpful.
-Andy.
Update: I forgot to mention, you may have to run Set-ExecutionPolicy RemoteSigned from an admin PowerShell window before you are able to execute .ps1 scripts - http://technet.microsoft.com/en-us/library/hh849812.aspx

Categories