Link to home
Start Free TrialLog in
Avatar of Lonnus_Maximus
Lonnus_Maximus

asked on

Fool the MS call GetComputerName to use UserName? (Contact Plus Pro on Terminal Server)

I just started serving a client that has 2 Terminal Servers running the application Contact Plus Pro.

I installed a new terminal server to put into the farm, and only 1 person can run Contact Plus Pro at a time.

I called their Technical Support, and it had to do with each users Temp Files being stored in C:\CPPRO\PRIV\%COMPUTERNAME% - and %COMPUTERNAME%  of course is the same for every user on a Terminal Server.  Their support said they were looking at the source code, and it calls the MS Function Get Computer Name ( http://msdn.microsoft.com/en-us/library/ms724295(VS.85).aspx )

However, on the existing 2 Terminal Servers (The person that installed them died with no documentation)  it for some reason creates the TEMP directories as C:\CPPRO\PRIV\%USERNAME% which works!  The developer of the software took control of my RDP session, saw me delete my username, saw me log back into the program, and it created the directory of my Username instead of the machine name, and said "No idea what was done to that server.  Our software uses Computername.  To run it on a terminal server make directories called "CPPRO1, CPPRO2, CPPRO3" etc for each user, copy the program into each directory, and have each users desktop icon point to their own personal copy of the software...... ???????????  WTF?  For 30 people.... RIGHT!

Finally, I copied the C:\CPPRO directory structure from the working server to the new terminal server, and it did not help, so it basically can't be the developer code, and has to be something done to the server or active directory.  

All terminal servers point to a 'Server' install of the program on a different server, and it is in Paradox.

I looked at Set statements in startup (let %COMPUTERNAME%=%USERNAME% or something like that)... nothing.  I searched the registry on CPPRO\PRIV (the temp directory they are created in) can't find it.  No files in the program directory have '\priv' in them with an MS search of the program directory inside files...

What could it be?  I would give 1000 points for this one if I could!
Avatar of Volox
Volox
Flag of United States of America image

Have you checked to see if there are any registry entries associated with the applicaiton?  And if so, have you compared them between the working machine and the new one to see if there was some magic registry tweak?
Avatar of Lonnus_Maximus
Lonnus_Maximus

ASKER

Yes.  If I search on CPPRO all I get is the registered executables, dlls, etc.
ASKER CERTIFIED SOLUTION
Avatar of Volox
Volox
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That did it!  Thank you sir!