Cannot start applications from CD in Vista

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Cannot start applications from CD in Vista

Post by *Flint »

I have a CD containing TC 7 beta distribution (tcmd7pb2.exe file). When I try to start this installation from CD I get the "File not found" message. When I put the name into command line with Ctrl+Enter and then press Enter, the installation is working fine. Vista shows a UAC message when I do it, so this may be the cause of the problem.
Screenshot
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC calls WinExec when starting files from CD, because ShellExecute doesn't work correctly with files which have invalid short names (which is quite common with CDs). Unfortunately Microsoft forgot to add elevation support for WinExec, only ShellExecute supports elevation.

I will therefore not change this behaviour.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
What about a partial solution? TC looks if the file has valid short name, if yes - uses ShellExecute, if no - uses WinExec.

BTW, why does in this case Ctrl+Enter/Enter work?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

What about a partial solution? TC looks if the file has valid short name, if yes - uses ShellExecute, if no - uses WinExec.
Yes, this should be doable.
BTW, why does in this case Ctrl+Enter/Enter work?
The command line seems to always use ShellExecute to handle parameters correctly. It will not work with badly authored CDs then. As you can see, there is always at least one drawback...
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed now. Could someone with Vista please test it?
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

Yes, it works now!
The only issue is that when I double-click the EXE file, the UAC window is shown and a temporary name is given there:
http://flint-inc.ru/Temp/uac.png

It does not affect the functionality itself, when I press Continue, the installator is started normally, when I press Cancel, TC shows "Error executing program" message.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

a temporary name is given
This is a known bug in Vista: This strange tmp name is shown when the EXE does not contain any version info resource. Apparently the Microsoft programs all contain such a version info resource, so the developpers at Microsoft never encountered that bug.
Author of Total Commander
https://www.ghisler.com
Post Reply