Update a provisionned appx - windows-store-apps

I've developed a LOB App and want to provision the package for it on a Windows 10 PC.
I want use the DISM Cmdlet:
Add-AppxProvisionedPackage -Online -PackagePath ..\cordova-appx\my.appx -SkipLicense
but this cmdlet works only for the new Users, not for the existing users.
Moreover, if my application version changes (forcing a new package to be deloyed), the provision doesn't update for active the users of the PC.
What's the solution? How do you do this properly?
Thanks for your help.

Add-AppxPackage add appx for the connected user at the tablet
Add-AppxProvisionedPackage do available the appx for the new user but not for the existing user
Moreover if I reinstall my appx the appx is not updated
The solution is to create a scheduled task when the user logged at the tablet
Register-ScheduledJob -FilePath C:\myApp\Test.ps1 -Name Install_AppxAtLogOn -MaxResultCount 30 -ScheduledJobOption (New-ScheduledJobOption –DoNotAllowDemandStart) -Trigger (New-JobTrigger -AtLogOn)
test.ps1 verify if the appx exists and verify the version and reinstall but it doesn't work, it work only for the user which create the scheduled task
do you have a another idea for my problem ?
Thanks a lot

Updating Provisioned LOB Apps
The newer version of the provisioned LOB App
can only be applied by an
> Add-AppxPackage
operation (via powershell) for each user that
has signed into the PC running the Windows image.
SEE MICROSOFT DOCS: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/sideload-apps-with-dism-s14
You see, provisioning the LOB App will stage it in the image and schedule it be installed for every user of the Windows image at first logon or at the next logon, if the user account is already created. So you cannot rely on it to update the installed application, because all provisioning does, is supply the app to a user if it doesn't already have it installed.
A Possible Workaround
Remove the provisioned LOB App from the image:
> Remove-AppxProvisionedPackage -Online -PackageName MyAppxPkg
Uninstall occurrences of the old version the application from each user that has been active:
> Remove-AppxPackage MyAppxPkg
Provision it again with the new version:
> Add-AppxProvisionedPackage -Online -FolderPath C:\Appx -SkipLicense
Warning: Make sure all users are logged off of the machine (I recommend PSExec with a -s passed so it runs under SYSTEM, and that there are not more than 24 apps provisioned on the image already.

Related

Can't access SSRS folders on a local server following installation

edit
I also have the same problem as an admin on a domain
I just installed SSRS locally on a machine for and I cannot access the reports I deployed. Everything was installed as admin
when going to the web portal I get this massage
Could not load folder contents
You are not allowed to view this folder. Contact your administrator to obtain the necessary permissions.
and when trying to access the web service via the config manager I get this one:
The permissions granted to user <username> are insufficient for performing this operation. (rsAccessDenied)
Additionally in the web portal I got no "manage" folder and only "my subscriptions" under the settings button .
Everything is running locally and as admin, the OS is windows 11 and the SSRS is version 15.0.1102.1002 and running in native mode.
I've looked all over the place and found out something about certificates, but almost everything in google is about access problems via remote server.
adding the URL to the trusted sites didn't help
it certainly look like you don't have permission. Are you administrator? When you were installing did you set up some users to be administrators?
Find which account is administrator and then add yourself from the SSRS site. Is there another account you can run or Run as administrator?
Another way to install again.
If you decide to install again pay attention on the page with the users.

start windows store app automatically during system restart?

I am system admin and wondering if there is a way to start windows store app automatically during system restart? Using Window Server 2012 R2 64 bit. Thanks.
regards,
Lin
You can achieve that by creating a uri launch protocol and launch the app by this protocol.. this is the only way I see in this situation.
See more here:
https://msdn.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation
UPDATE:
Now for launching that automatically, use start command, this command allow us to start modern apps (Windows Store Apps).. for example, this will launch the store # home page:
start ms-windows-store://home
In real scenario:
create .cmd file and write your command name (Your app protocol) and move this file to C:\Users\{username}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
I tried the same a few weeks ago but for now is not supported. please read this answer UWP app start automatically at startup

Unable to RDP into windows server on GCE : No remote desktop license servers available

I have windows server machine on GCE.Whenever I try to take remote or RDP into machine it is showing
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license.
Please contact the server administrator
I have reset the machine but didn't work. The solutions that I got on the net needs access to the machine first, but I am not able to access the machine. Here is a link http://www.dell.com/support/Article/us/en/04/635765/EN to troubleshoot this, but I am not able to access machine as the machine is on google server.
In my case license has been expired. But I was able to take remote in admin mode. Use the command in Run to take remote in admin mode
mstsc /admin
Then I added new license to continue remote service. For more detail on remote desktop licensing check out the link https://technet.microsoft.com/en-us/library/cc732684.aspx
According to this post the solution is to delete the following key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
I Followed Sunil Garg's instructions:
mstsc /admin
to remote into the server.
Then I deleted the key. Please note you must run regedit as System user to delete the key. Use the RunAsSystem tool to achieve this
This problem made by some kind of caching of remote desktop licensing in clients you can solve this by remove the bellow key in registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing
It's much easier to make a reg file and run it so .
Make a empty text file
Name it "mypatch.reg" or "mypatch.reg"
Put bellow text in it and save it
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing]
Run it by dubble click on file!
It should remove the key.

Customizing a GCE Ubuntu VM image

I have a Google Cloud Platform account that I access from a VirtualBox VM. I am using the Google Compute Engine for a project that I am currently working on, and I had to create a custom image based on the Ubuntu 14.04 image that's available there.
I made changes to the Ubuntu image by ssh'ing into an Ubuntu 14.04 instance, (from my Vbox VM terminal) installing the Matlab compiler runtime, and downloading some other files that I needed. I created the custom image by following the steps according to the documentation.
However, now the changes I made are only available to me when I SSH from my Vbox VM terminal. I need to be able to run a certain matlab program Via startup scripts, how can I make it so that all users using this image have access to the customizations I made? Is there a way I can do this without having to make the edits by ssh'ing from the developers console and redoing all the changes?
EDIT: I don't think I was very clear so Ill give some examples. say my Google account is alexanderlang. When I ssh into an instance created from my custom image from the developers console, bash prompt looks like:
alexanderlang#myinstance $
My Vbox username is alex, and when I ssh into the same instance from my vbox terminal, bash prompt looks like:
alex#myinstance $
alex#myinstance can run matlab programs, but alexanderlang#myinstance cannot. I'm talking about the same instance, created from the same image. I think this might have something to do with the ssh keys for my custom image, but I don't know how to change or remove those keys.
When you connect to your VM instance via ssh by using either Developers Console or gcloud, the user account is dynamically created (if it doesn't already exist) by setting metadata on the VM. The question is: how does each tool choose your username?
When you use Google Developers Console, the only information it knows about you is your Google Account name, so it uses that, e.g., <first-name>_<last-name> or similar.
When you connect to your instance via gcloud, it knows the value of $USER so it uses that instead.
Note that in either case, your account has passwordless sudo access, so if you want to switch from one account to the other, you can run:
sudo su alex
while logged in as alexanderlang and then you have access to all the programs that alex does.
Similarly, you can run:
sudo su alexanderlang
while logged in as alex to do the reverse.
Startup scripts run as root. To run commands as another user, you need to do two things:
change to that username
run commands as that user
sudo su alex will create a new shell and hence ignore the rest of the script (until you manually exit the user shell, which is not what you want).
You can use sudo su alex -c 'command to run' but since what you want to run is a complex script, you need to first save the script to a file, and then run it.
Your options are:
pre-create the shell script to run
dynamically generate it from the startup script
Doing (1) is easy if the script never changes. For frequently-changing scripts (and it sounds like, many dynamically created VMs), you want to use option (2).
Here's how to do this in a startup script:
cat > /tmp/startup-script-helper.sh <<EOF
# ... put the script contents here ...
EOF
sudo su alex -c '/tmp/startup-script-helper.sh'
You can use Packer to create a derived image from a stock GCE VM image. Packer will let you do the following very easily:
boot a GCE VM using an image you specify
run some customization step, e.g., shell script, or Chef/Puppet/etc.
save the resulting image in your Google Cloud Platform project
Then, you can boot any number of new VMs using your newly-created image.
Note that since your VM image will be stored on Google Cloud Storage, you will be charged for the space it uses. Current pricing for Google Cloud Storage standard class is USD $0.026 / GB / month. A typical VM image should be less than 1GB.
You can see a complete example of how I used Packer to build VMs and pre-installed Ambari on it via my GitHub repo.

Openstack trove database instance status=error after creating a new instance

Recently I installed openstack trove using the automated script (devstack). After it is installed successfully and creating some user and projects, I manged to create a database instance and database inside it. unfortunately every database instance that I am going to build (via command line or horizon dashboard) trove gave me error status. Therefore when I tried to create database inside each of created database instance I stock with database instance is not ready.
I did some google and some people mentioned that I should check nova-compute.log, but unfortunately I did not find this log file. Would you please guide me?
Regards.
If you are running devstack it creates a screen session for all the services and it contains the logs. Try running "screen -x" to attach to the screen session and you can view the logs from there. Each window within the screen session is a separate service running.
If you had an issue creating an instance from trove it maybe because the image you are using is not setup correctly for trove because it needs the trove guest agent installed and a configuration for the guest agent baked in the image.
We have a repo that uses devstack to create a development trove installation that might be of use to test things out. This readme should help getting you started.
https://github.com/openstack/trove-integration/blob/master/README.md