Announcement

Collapse
No announcement yet.

Shell.Execute and File.Run stopped working after using App Compatibility Manager

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shell.Execute and File.Run stopped working after using App Compatibility Manager

    Hi! I downloaded the "Application Compatibility Manager" from Microsoft and used it to add "RunAsInvoker" to my autoplay.exe and the final .exe in C:/Program Files so that the annoying warning from Windows is not always shown. But now it seems no Shell.Execute (I tried File.Run, too) does work anymore. The command returns "0" and App.LastError is 0, too. So why does it not work if no errors occur?

    Code:
    			HTTP.Download("http://www.playbird.at/sites/Bl4ckSh33p/apps/launcher/B4SLauncherSetup.exe", _TempFolder.."\\B4SLauncherSetup.exe", MODE_BINARY, 20, 80, nil, nil, DLProgress);
    			LastError = Application.GetLastError();	
    			StatusDlg.Hide();
    			if LastError == 0 then
    				-- Run Setup, Close Launcher
    				test = Shell.Execute(_TempFolder.."\\B4SLauncherSetup.exe", "open", "", "", SW_SHOWNORMAL, false);
    				--test = File.Run(_TempFolder.."\\B4SLauncherSetup.exe", "", "", SW_SHOWNORMAL, false);
    				LastError = Application.GetLastError();	
    				
    				Dialog.Message("DEBUG", "Return Code: "..test, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    				if LastError == 0 then
    					Application.Exit(0);
    				end
    Bl4ckSh33p-Soft - Custom Software and Indie Games

  • #2
    It seems to work when I build the app first but not in the F5 Preview. (even after uninstalling the App compat. Manager modifications). Dont know why but its ok as long as the finished app can run it.
    Bl4ckSh33p-Soft - Custom Software and Indie Games

    Comment

    Working...
    X