Has anyone figured out how to open and run an EXE when using IE in WM 6.5? When we click on a link to an EXE file in IE, we get the prompt to download the file. However, the option to "Open file after download" is grayed out, so we can't select it. On WM 6.1, we are able to open the EXE in IE. Any idea if there is a REG key that will re-enable this in WM 6.5? Thanks, Ken
Running an EXE from IE in WM 6.5// Expert user has replied. |
4 Replies
Following on from my example setup.dll. I have modified it so that it will read the registry for the application to run and any command line options. You can also specify a warm boot as well. You can set the registry values in the CAB -they are added before the application is run.
[HKEY_LOCAL_MACHINE\Software\Motorola\SetupDll]
Application – name of the application to run. You must specify the full path and name
Command Line - The command line options to pass to application. Optional
Application Wait – Time in milliseconds to wait for application to exit. 0 indicates no wait
Reboot – If 0 will not warm boot the terminal any other value to reboot. If you are rebooting then you will need to wait for the application to exit before rebooting so the “Application Wait” should be specified.
Ken; Microsoft apparently decided in WM65 that this was a security enhancement and so far as I know they didn't provide any way to turn it off. The only workaround that I know is that if you package the .EXE in a .CAB file, IE will allow the .CAB file to be downloaded and executed eventhough it would not allow the loose .EXE file to be downloaded and executed. It is a bit of a hassle constructing a .CAB file extracts and runs the .EXE file, but once that is done, you get approximately the result you were looking for. Allan
Thanks Allan. When we create the CAB file, is there a specific name we need to use for the EXE so the CAB will auto run it? Or do we need a special DLL in the CAB that will execute the EXE?
I had to do the same for another customer this week - execute a .exe from the CAB. The CAB can have a custom setup.dll that has 4 predefined entry points for before/after install and uninstall. I have attachted some sample code. To run the .exe after installing its something like // Install_Exit codeINSTALL_EXIT Install_Exit( HWND hwndParent, LPCTSTR pszInstallDir, WORD cFailedDirs, WORD cFailedFiles, WORD cFailedRegKeys, WORD cFailedRegVals, WORD cFailedShortcuts ) { // // Run the app // const TCHAR *szApp = TEXT("\\Application\\GetDeviceInfo.exe") ; PROCESS_INFORMATION pi={0}; CreateProcess( szApp, NULL, NULL,NULL, false, 0,NULL,NULL, NULL, &pi) ; if ( pi.hProcess != NULL ) { WaitForSingleObject( pi.hProcess, 5000 ); CloseHandle( pi.hProcess ); } return codeINSTALL_EXIT_DONE; }