RDP won't start program on server - File name, directory name or volume label syntax is incorrect

I have an MS Server 2008 R2, SP2 server that gives me the following message when I set the Terminal Services to start a program upon connection:  The filename, directory name or volume label syntax is incorrect.  This working directory is invalid: "C:\Program files."

I had the same program on an MS Server 2003 working before that server crashed.  I built this server and installed the relevant program.  I have also tried running a simple batch file and receive the same error.  I get the same error whether I put the program in C:\Program files or C:\Program files(x86).  If I disable the automatic start of the program(s), I can remote to the machine and manually start them with no problem.  I have shared the drive, which seemed unnecessary but I did it anyway.  I have experimented with permissions on the programs.  I have set the option to start a program upon connection in GPE, Terminal Services Configuration and Remote Desktop.  I know the directories/program paths are valid.  I copy/paste them into "Run" and the programs run with no errors.  I set up a security group and put them in Remote Desktop Users.  I have logged on as a domain admin and as a domain user - with the same error occurring.  I have Client Access licenses installed.  The vendor of the main program worked with me on this for over 2 hours to no avail, both on their program and the simple batch files.

Thank you for your help.
sksaathoffAsked:
Who is Participating?
 
sksaathoffAuthor Commented:
Deployed using the TSRemoteApp manager.  Left all the settings discussed above disabled.
0
 
David Johnson, CD, MVPOwnerCommented:
path's with spaces require a deliminator i.e. " Since you went from S2K3 32bit to S2K8R2 64 bit then the programs will be in c:\program files (x86)\directory\filename.exe you can change the c:\program files (x86) to %programfiles(x86)% to eliminate one of the spaces
0
 
sksaathoffAuthor Commented:
I experimented with the spaces and that seemed to help, but I still couldn't get it to work.  I un- and re-installed Terminal Services, and re-installed the licenses, then used the TS Remote App Manager wizard to deploy the app, rather than using the GPE to start the program.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.