Working with VM Application Names

Joseph Calev

I admit that VM Application names can be a bit tricky, or at least non-intuitive. The basic issue is this, you have some binary – let’s call it MyApp.exe – and you want to install it on your VM.

Therefore, you create a blob with the name MyBlob and set your install script to the following:

myApp.exe /S

You then name your VM Application “MyVmApp” and deploy it to a VM. The install will not work.

Why? Because when we download your package to your VM, we’ll rename it as “MyVmApp” (no extension). Why do we do that? Well, the VM doesn’t know what name your package should be called. Therefore, it gives it the best name it can – which is the name of the application itself – MyVmApp. It sets no extension because it has no idea what the original extension was.

There are several ways around this. One way is to change your script to this.

move .\\MyVmApp .\\myApp.exe & myApp.exe /S

Here, you just rename the file and then execute it. In practice, I see most customers just do this. However, there are two other possibilities.

The primary one is to use the “packageFileName” (there’s also a corresponding “configFileName”) property. This tells us what to rename your file. So, if you set it to “MyApp.exe”, then your install script only needs to be.

myApp.exe /S

Now, here’s the kicker. If your blob was originally named “myApp.exe” instead of MyBlob, then the above would have worked without setting packageFileName!

This is us trying to help you, though at times I admit we’ve confused you more. Obviously, we look at telemetry to see what problems our customers are having. We want you to use our features and so we look at all failures. When VM Applications first shipped, we noticed that the renaming was causing considerable frustration. Therefore, we try to help out with the following logic.

If packageFileName isn’t specified and the install script does not contain the application name and the install script does contain the blob name, then we automatically set packageFileName to the blob name for you. In other words, it just works.

Unfortunately, we’ve seen a few cases where customers are confused how this rename automatically occurs. We’re just trying to help you. If you don’t want any help, then just set packageFileName yourself and we’ll get out of your way.

Note that the packageFileName and configFileName properties are available today in Portal, Powershell, and CLI.

0 comments

Discussion is closed.

Feedback usabilla icon