Home

Publishing an exe that resides on a file share

%3CLINGO-SUB%20id%3D%22lingo-sub-660077%22%20slang%3D%22en-US%22%3EPublishing%20an%20exe%20that%20resides%20on%20a%20file%20share%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-660077%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20Azure%20Windows%20Virtual%20Desktop%2C%20has%20anyone%20published%20an%20app%20from%20a%20network%20drive%20yet%3F%3CBR%20%2F%3EI%20have%20an%20Azure%20file%20share%2C%20mounted%20as%20a%20mapped%20network%20drive%20on%20my%20session%20host%20pool.%20I%20managed%20to%20publish%20an%20.exe%20from%20the%20file%20share.%20However%2C%20it%20does%20not%20run%20every%20time%20that%20I%20launch%20it.%3CBR%20%2F%3EFirst%20thing%20in%20the%20morning%2C%20I%20can%20run%20the%20remote%20app%20successfully.%20However%2C%20when%20you%20close%20the%20remote%20app%20and%20the%20session%20changes%20status%20from%20active%20to%20disconnected%20-%20then%20when%20you%20try%20to%20open%20the%20app%20again%2C%20you%20get%20the%20message%2C%20%22the%20program%20did%20not%20start%20on%20the%20remote%20computer.%22%20Tried%20using%20%22Invoke-RdsUserSessionLogoff%22%20in%20PowerShell%20but%20still%20can't%20open%20the%20remote%20app.%20If%20you%20close%20the%20remote%20app%20and%20reopen%20it%20before%20the%20session%20becomes%20disconnected%2C%20then%20you%20can%20reopen%20the%20remote%20app%20no%20problem.%20Is%20there%20an%20error%20log%20somewhere%20that%20I%20can%20check%3F%3CBR%20%2F%3EThis%20only%20appears%20to%20be%20an%20issue%20for%20the%20app%20that%20I%20have%20published%20from%20the%20network%20drive%2Ffile%20share.%20The%20published%20apps%20which%20are%20locally%20installed%20don't%20have%20this%20issue.%20Any%20and%20all%20help%20would%20be%20greatly%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-662073%22%20slang%3D%22en-US%22%3ERe%3A%20Publishing%20an%20exe%20that%20resides%20on%20a%20file%20share%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-662073%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F352444%22%20target%3D%22_blank%22%3E%40tadhgclifford%3C%2FA%3E%26nbsp%3B%3A%20What%20kind%20of%20application%20are%20you%20trying%20to%20run%20from%20the%20file%20share%20(is%20it%20a%20click-to-run)%3F%20If%20you%20just%20connect%20to%20that%20VM%20directly%20and%20run%20the%20same%20command%20to%20launch%20the%20application%2C%20is%20it%20typically%20reliable%3F%20Lastly%2C%20are%20you%20able%20to%20launch%20a%20full%20desktop%20session%20(through%20Windows%20Virtual%20Desktop)%20then%20launch%20the%20application%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPrimarily%2C%20we%20don't%20see%20this%20scenario%20very%20often%20and%20would%20like%20to%20understand%20why%20it%20can't%20be%20installed%20locally.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-667104%22%20slang%3D%22en-US%22%3ERe%3A%20Publishing%20an%20exe%20that%20resides%20on%20a%20file%20share%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-667104%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F305776%22%20target%3D%22_blank%22%3E%40christianmontoya%3C%2FA%3E%26nbsp%3BYes%20it%20is%20a%20click-to-run%20exe.%20It's%20always%20reliable%20when%20launching%20the%20exe%20from%20a%20full%20desktop%20session.%20I%20have%20not%20tried%20to%20run%20it%20from%20a%20command%20based%20session.%20I%20was%20under%20the%20impression%20that%20I%20could%20not%20do%20this%20through%20PowerShell%20as%20the%20file%20share%20is%20mounted%20as%20a%20mapped%20drive.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20current%20app%20design%20requires%20that%20it%20is%20installed%20centrally%20and%20then%20the%20users%20run%20the%20exe%20by%20clicking%20a%20shortcut%20from%20their%20desktop%20which%20points%20at%20the%20central%20location%2C%20i.e.%20file%20share%20which%20is%20mounted%20as%20a%20mapped%20drive.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-674718%22%20slang%3D%22en-US%22%3ERe%3A%20Publishing%20an%20exe%20that%20resides%20on%20a%20file%20share%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-674718%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F305776%22%20target%3D%22_blank%22%3E%40christianmontoya%3C%2FA%3Ea%20little%20bit%20more%20info%20on%20our%20app...%3C%2FP%3E%3CP%3Ewhen%20the%20exe%20is%20run%20for%20the%20first%20time%20from%20the%20file%20share%2Fnetwork%20location%2C%20it%20installs%20files%20into%20the%20appdata%20directory.%20The%20application%20then%20runs%20from%20there.%3C%2FP%3E%3CP%3EOn%20the%20WVD%20environment%2C%20it%20would%20appear%20that%20there%20is%20a%20file%20share%20mapping%20problem%20when%20the%20load%20balancer%20launches%20a%20session%20to%20one%20of%20the%20virtual%20desktops.%20As%20I%20said%20previously%2C%20this%20is%20only%20an%20issue%20after%20a%20previous%20session%20has%20been%20disconnected.%20It%20always%20works%20first%20time%20in%20the%20morning!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-680832%22%20slang%3D%22en-US%22%3ERe%3A%20Publishing%20an%20exe%20that%20resides%20on%20a%20file%20share%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-680832%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F352444%22%20target%3D%22_blank%22%3E%40tadhgclifford%3C%2FA%3E%20hello%20publishing%20a%20remote%20app%20from%20a%20network%20share%20has%20not%20been%20evaluated%20and%20its%20not%20a%20scenario%20we%20recommend%20(or%20the%20AppFoundation%20team%20recommends).%20In%20general%20for%20RDS%2FVDI%20apps%20must%20be%20present%20on%20the%20machine%20prior%20to%20user%20logged%20in%20or%20installed%20by%20the%20user%20after%20session%20is%20established.%20With%20click-to-run%20apps%20there%20are%20set%20of%20internal%20procedure%2Fmicro-services%20that%20do%20certain%20cleanup%20upon%20user%20logoff.%20Not%20all%20do%20it%20%E2%80%A6%20it%20really%20depends%20how%20the%20app%20was%20written%20(if%20app%20was%20written%20not%20to%20put%20setting%20in%20the%20user%20profile%20should%20not%20be%20a%20problem...I%20tested%20this%20scenario%20a%20while%20back).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EClick-to-run%20apps%20to%20run%20from%20network%20share%20but%20there%20are%20challenges%20(like%20those%20that%20you%20are%20experiencing)%20(additionally%20click-to-run%20apps%20do%20some%20weird%20stuff%20with%20user%20data%20unless%20coded%20for%20such%20scenario).%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ELogs%3A%3C%2FSTRONG%3E%20Try%20looking%20here%26nbsp%3B%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23000000%3B%20font-family%3A%20Segoe%20UI%2CSegoeUI%2C'Helvetica%20Neue'%2CHelvetica%2CArial%2Csans-serif%3B%20font-size%3A%2015px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20400%3B%20letter-spacing%3A%20normal%3B%20-ms-text-size-adjust%3A%20none%3B%20orphans%3A%202%3B%20overflow-wrap%3A%20break-word%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%25LocalAppData%25%5CTemp%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlso%20check%20converting%20Click-to-run%20to%20MSIX%20(repackage%20it%20there%20is%20a%20tool%20in%20the%20store).%20MSIX%20has%20the%20procedure%2Fcapabilities%20to%20clean%20itself%20quite%20nicely%20upon%20session%20disconnect.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-689291%22%20slang%3D%22en-US%22%3ERe%3A%20Publishing%20an%20exe%20that%20resides%20on%20a%20file%20share%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-689291%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F352444%22%20target%3D%22_blank%22%3E%40tadhgclifford%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnother%20suggestion%20I%20would%20like%20to%20add%20to%20Christian%20%26amp%3B%20Stefan%3A%3C%2FP%3E%3CP%3ETry%20to%20publish%20a%20logon-script%20as%20the%20application%20in%20stead%20of%20the%20actual%20application%2C%20and%20start%20the%20application%20from%20the%20script.%3C%2FP%3E%3CP%3EFor%20example%3A%20create%20a%20super%20small%20vbs-script%2C%20where%20you%20test%20the%20network%20drive%20mapping%20to%20Azure%20Files%2C%20and%20then%20launch%20the%20application.%3C%2FP%3E%3CP%3EWhen%20you%20can%20publish%20the%20application%2C%20publish%20cscript.exe%2Fwscript.exe%20and%20add%20the%20script%20location%20as%20a%20parameter.%3C%2FP%3E%3CP%3EOr%20a%20powershell-script%20could%20do%20the%20same%20trick.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20way%2C%20the%20exe%20that%20is%20launched%20initially%20is%20locally%20available%20on%20the%20server.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-727833%22%20slang%3D%22en-US%22%3ERe%3A%20Publishing%20an%20exe%20that%20resides%20on%20a%20file%20share%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-727833%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F298270%22%20target%3D%22_blank%22%3E%40michawets%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F305776%22%20target%3D%22_blank%22%3E%40christianmontoya%3C%2FA%3E%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F195573%22%20target%3D%22_blank%22%3E%40Stefan%20Georgiev%3C%2FA%3E%20My%20remote%20app%20application%20has%20been%20working%20really%20well%20all%20week.%20I%20have%20not%20made%20any%20changes%20at%20all%2C%20yet%20it%20has%20been%20working%20consistently.%20Have%20you%20guys%20made%20any%20changes%2Fimprovements%20on%20the%20remote%20app%20side%20of%20WVD%3F%20If%20so%2C%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E
tadhgclifford
New Contributor

In Azure Windows Virtual Desktop, has anyone published an app from a network drive yet?
I have an Azure file share, mounted as a mapped network drive on my session host pool. I managed to publish an .exe from the file share. However, it does not run every time that I launch it.
First thing in the morning, I can run the remote app successfully. However, when you close the remote app and the session changes status from active to disconnected - then when you try to open the app again, you get the message, "the program did not start on the remote computer." Tried using "Invoke-RdsUserSessionLogoff" in PowerShell but still can't open the remote app. If you close the remote app and reopen it before the session becomes disconnected, then you can reopen the remote app no problem. Is there an error log somewhere that I can check?
This only appears to be an issue for the app that I have published from the network drive/file share. The published apps which are locally installed don't have this issue. Any and all help would be greatly appreciated!

6 Replies

@tadhgclifford : What kind of application are you trying to run from the file share (is it a click-to-run)? If you just connect to that VM directly and run the same command to launch the application, is it typically reliable? Lastly, are you able to launch a full desktop session (through Windows Virtual Desktop) then launch the application?

 

Primarily, we don't see this scenario very often and would like to understand why it can't be installed locally.

@christianmontoya Yes it is a click-to-run exe. It's always reliable when launching the exe from a full desktop session. I have not tried to run it from a command based session. I was under the impression that I could not do this through PowerShell as the file share is mounted as a mapped drive.

 

The current app design requires that it is installed centrally and then the users run the exe by clicking a shortcut from their desktop which points at the central location, i.e. file share which is mounted as a mapped drive.

@christianmontoyaa little bit more info on our app...

when the exe is run for the first time from the file share/network location, it installs files into the appdata directory. The application then runs from there.

On the WVD environment, it would appear that there is a file share mapping problem when the load balancer launches a session to one of the virtual desktops. As I said previously, this is only an issue after a previous session has been disconnected. It always works first time in the morning!

@tadhgclifford hello publishing a remote app from a network share has not been evaluated and its not a scenario we recommend (or the AppFoundation team recommends). In general for RDS/VDI apps must be present on the machine prior to user logged in or installed by the user after session is established. With click-to-run apps there are set of internal procedure/micro-services that do certain cleanup upon user logoff. Not all do it … it really depends how the app was written (if app was written not to put setting in the user profile should not be a problem...I tested this scenario a while back).

 

Click-to-run apps to run from network share but there are challenges (like those that you are experiencing) (additionally click-to-run apps do some weird stuff with user data unless coded for such scenario). 

 

Logs: Try looking here %LocalAppData%\Temp 

 

Also check converting Click-to-run to MSIX (repackage it there is a tool in the store). MSIX has the procedure/capabilities to clean itself quite nicely upon session disconnect.

Hi @tadhgclifford ,

 

Another suggestion I would like to add to Christian & Stefan:

Try to publish a logon-script as the application in stead of the actual application, and start the application from the script.

For example: create a super small vbs-script, where you test the network drive mapping to Azure Files, and then launch the application.

When you can publish the application, publish cscript.exe/wscript.exe and add the script location as a parameter.

Or a powershell-script could do the same trick.

 

That way, the exe that is launched initially is locally available on the server.

@michawets @christianmontoya @Stefan Georgiev My remote app application has been working really well all week. I have not made any changes at all, yet it has been working consistently. Have you guys made any changes/improvements on the remote app side of WVD? If so, thanks!

Related Conversations
Extentions Synchronization
Deleted in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies