0

There is a Click-Once .NET application that is installed to varios virtual machines.

Our RPA process needs to launch the application on each VDi but in order to do so, we need to programmatically determine the location of the EXE. Here are a couple of locations where the exes were found.

C:\Users\LANID\AppData\Local\Apps\2.0\BL50Q362.B8N\4M60XWAQ.VAT\wing..tion_6e52ce6bb7aec45c_07e4.0004_5cb44fe4b2f70aab\APPNAME.exe

C:\Users\LANID\AppData\Local\Apps\2.0\5A5ZDX2W.EEY\Z02P1K1M.GRO\wing..tion_6e52ce6bb7aec45c_07e4.0004_5cb44fe4b2f70aab\APPNAME.exe

How can I do that? I expect the shortcut to be on the desktop but I don't know how to extract it.

Chad
  • 23,658
  • 51
  • 191
  • 321
  • according to this: https://stackoverflow.com/a/3991953/1113766 you need `System.Reflection.Assembly.GetExecutingAssembly().Location`, does that get you the information ? – Juan Apr 13 '20 at 18:09
  • If I were already running the exe in question, then yes. But I need to programmatically find the exe location first. The only thing I can expect is a shortcut on my desktop. The app is being launched programmatically using RPA; it's not being launched by a user) – Chad Apr 13 '20 at 18:15
  • Thanks for the reply, btw. :-) Just to elaborate, I need to pro grammatically start this click once exe on many virtual machines and I don't know where to expect to find it installed, so I am looking for a programmatic way to determine the location of the exe so I can run the app, – Chad Apr 13 '20 at 18:22
  • 1
    Does your installation create a start menu entry or a desktop shortcut? If so, you could perhaps use that to run it or to determine the exe location. – Collen Apr 13 '20 at 19:09
  • Yes, that is what I did. I opened up the desktop shortcut, which to my surprise, was a text format file, i took the URL that URL and pasted into Internet Explorer and t hat launched the app. I now can launch it by running IE and passing this URL as a param. Thank you for your help. – Chad Apr 13 '20 at 19:29

0 Answers0