none
Error: The system cannot find the file specified. The initial program cannot be started

    Question

  • I have a 2008 R2 server setup for testing and am getting this error on one published application but only under certain circumstances.

    The application works from RDP file or RD Web access just fine on Windows based devices. However other OS thin clients get the error.

    I have uninstalled, reinstalled, checked paths, changed the setting to allow users to run listed and unlisted applications and still nothing for this one application. Others work fine under all operating systems and clients.

    Ideas?

    Wednesday, February 16, 2011 7:10 PM

Answers

  • Hi,

    For iTap RDP and rdesktop clients, you are specifying the initial program that you want it to start, not which RemoteApp to start.  The server will take what you supply and attempt to start the program.  This is similar to if you were logged on to the server and clicked Start-->Run, typed something into the textbox, and then clicked the OK button.

    If you do not specify the complete path to the exe then windows will attempt to find it by looking in the current directory, check if it is registered in app paths registry key and retrieve its full path from there, as well as checking in the directories listed in the PATH environment variable.  Many programs (like Excel) register themselves in the app paths key during install, so that is why you are able to launch excel by simply typing excel.

    I recommend you specify the full path and exe file name that you are trying to start for your ERP application.

    -TP

    Friday, February 25, 2011 5:11 PM
    Moderator

All replies

  • Anyone?
    Tuesday, February 22, 2011 3:06 PM
  • mt_100,

    So, it works, just not for the thin client test. Weird. But points to the thin client as being the issue...

    Can you give more information?

    • What thin clients are having issues?
    • What application?
    • Is there anything special about this app (does it use mapped drives or anything like that that could be coming up different on the thin client setup) that could be the difference between the thin client and RDWA setup?
    • In the RDP file or RemoteApp Manager, do you have any custom commands added to the apps that run when the app starts up?
    • Anything in the event logs on the RDSH server?

    Thanks for the info,

    Kristin L. Griffin

    SUPER BIG fan of the Remote Desktop Virtualization Team!!!) 

    My RDS blog: blog.kristinlgriffin.com

    The new Microsoft Windows Server 2008 R2 Remote Desktop Services Resource Kit is now available!
    Tuesday, February 22, 2011 4:48 PM
    Moderator
  • Kristin, thank you for your help. Hopefully I can give more info for each of your questions.

    • Thin clients are iTap on the iPad and rdesktop from Linux.
    • Application is a BAAN ERP client
    • The application uses an argument after the exe to call the default config file. If the argument isn't there the EXE launches without a config, however it will still not launch on a non Windows RDP client without it. (Same error). So the argument doesn't appear to be the problem.
    • I do get an error in the Event Viewer Application log. Event 510 "Folder redirection policy application has been delayed until the next logon because the group policy logon optimization is in effect." Oddly enough I don't see that same error when I launch an application from the same client for an application that does work. (In this case Excel is on the TS and on the Linux client it launches just fine but the error appears for the BAAN client)

     

    Tuesday, February 22, 2011 7:16 PM
  • More testing, and interesting find.

    I created an RDP file on my Windows box to test, and oddly enough got the error posted in the subject. Seemed interesting as I set it up, put the application name in the Start the following program on connection field, but it wouldn't work.

    The RDP files generated from the terminal server do.

    I opened the two RDP files side by side in a text editor and compared them, removing fluff lines about screen size. Quickly I discovered lines related to remote application that were either missing or had different values from the one I created manually. After copying and pasting a bit, and 25 or so connections to test after each line there are a few key lines missing that once added to the manually created RDP file allow it to work. Here they are:

    remoteapplicationmode:i:1
    remoteapplicationprogram:s:||BaanVirt
    remoteapplicationname:s:BaanVirt

    I noticed in the file created by the server the line remoteapplicationmode:i:1 had a value of 1 but the file I created had 0. I changed it to 1 and got an error "Please specify either a remote program to run or a remote file to open.", putting the line that reads remoteapplicationprogram:s:||BaanVirt in allowed it to work fine without error.

    It appears that the server needs extra variables from the client to work properly even under Windows and without them will generate the same error.

    EXCEPT....

    Interesting twist. I tested with another application on the terminal server, in this case Excel. I used the generated RDP file to connect, and it worked, then I use the default.rdp to connect and specified in the GUI the Program to start on connection just like before. It worked.

    Opening the RDP file showed that it did not have the remoapplicationmode:i:1, it was set to 0 like the one I created for the application before that did not work under the same circumstances. It also was missing the other two lines shown above.

    So, it could be client side, but also there is something on the server side that will allow it to work.

    I investigated the registry on the server looking for differences in the two applications to see if I could find something. So far I found that in the [HKLM]\Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList\Applications\ key for each one that the one that didn't work didn't have a value in the VPath field. I filled that in with a correct value, nothing.

    I then noticed that the [HKLM]\SOFTWARE\Wow6432node\Microsoft\Windows\CurrentVersion\App Paths had a key for Excel which worked but none for the other app that did not. I created one but still nothing.

    Also tried adding an entry to [HKLM]\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths. No luck.

    Still looking but wanted to pass on my findings to brighter minds that may be able to shed some light on things. I think however there is something with 32 bit applications installed on R2 terminal server that doesn't create all the correct registry information and the path is lost to the terminal server. Just a thought.

    Thursday, February 24, 2011 6:05 PM
  • Last interesting tidbit. I put the application on a UNC share and then published it from there on the terminal server, and it works. Really not thinking it is the RDP client at this point.
    Thursday, February 24, 2011 6:41 PM
  • Hi,

    This error means that the system is unable to launch the specified file because it cannot find it.  In other words, the actual path/file name that is getting through to the server via the client is invalid.  For example, let's say that in the client you specified c:\program files\internet explorer\iexplore.exe, but for some reason the client did not send the text through properly so the server received c:\program with an argument of files\internet which of course is invalid.

    iTap RDP and rdesktop do not support RemoteApps as far as I can tell from the docs.  What this means is that when you connect from these devices you are specifying an initial program to start and not launching a RemoteApp.  This may seem like a small difference, but I wanted to let you know it is significant.  For example, the remoteapplicationmode/etc. settings are relevant to RemoteApps.  Multiple RemoteApps launched by a single user will run in the same session.  There are other differences as well.

    If you want you could use Process Monitor to see the actual path/file name that is attempting to be started when connecting from one of the problem devices.  This will give you a clue as to what is going wrong.  Once you know what is happening you can make adjustments like adding/removing quotes, launching from a cmd file instead, etc.

    -TP

    Thursday, February 24, 2011 7:05 PM
    Moderator
  • The odd thing is in the client we aren't specifying a path, only the alias of the application on the TS.

    So I specify the alias of "EXCEL" as the start up program and it works. If I specify the alias of "BaanVirt" it does not and gives the error. There must be something on the server that fills in the blanks, or gets the path from somewhere when a client request comes in using the alias.

    Friday, February 25, 2011 2:58 PM
  • Hi,

    For iTap RDP and rdesktop clients, you are specifying the initial program that you want it to start, not which RemoteApp to start.  The server will take what you supply and attempt to start the program.  This is similar to if you were logged on to the server and clicked Start-->Run, typed something into the textbox, and then clicked the OK button.

    If you do not specify the complete path to the exe then windows will attempt to find it by looking in the current directory, check if it is registered in app paths registry key and retrieve its full path from there, as well as checking in the directories listed in the PATH environment variable.  Many programs (like Excel) register themselves in the app paths key during install, so that is why you are able to launch excel by simply typing excel.

    I recommend you specify the full path and exe file name that you are trying to start for your ERP application.

    -TP

    Friday, February 25, 2011 5:11 PM
    Moderator