My Lightwright app has been happily running on both Mac and Windows for many years, but recently I’ve had 4 bug reports that it won’t launch on Windows 10. It’s a 64-bit app, and runs on hundreds of other user’s Windows systems just fine.
3 of the reports are simply that Lightwright doesn’t even launch, with no message from Windows. One other report involves two different computers where one user’s computer runs Lightwright fine, the other fails to launch. The IT guy in that case says both computer’s configurations are identical. Not sure I believe that, but…
I’m baffled, the only thing I can think of is that these computers might be missing the Windows Universal C Runtime, but I am surprised that Windows doesn’t say anything.
Some additional info came just now. One of my users got a dialog message that says “Unable to execute file: C:\Program Files\Lightwright 6\LW6.exe, CreateProcess failed; code 740. The requested operation requires elevation”
I searched the internet for this message, the only thing I saw was something that applied to .zip files where WinZip couldn’t open the file because the user was already elevated? Lightwright is installed using InnoSetup, FWIW.
Yeah, the first thing I did was have them right-click and choose Run As Administrator, but no luck. I’m going to suggest they take a look at the property of the lw6.exe file and see if they can set it to always run as admin, which might be another way to solve the problem…?
As far as a place to write, that’s been less of an issue on Windows than it has been on Mac lately. When it gets really rough is when an IT department gets in lockdown mode and wants to limit access to pretty much everything, or when all of the data is on a remote drive that needs all kinds of contortions to get to it.
[quote=“John_McKernon, post:4, topic:67682”]
Yeah, the first thing I did was have them right-click and choose Run As Administrator, but no luck. I’m going to suggest they take a look at the property of the lw6.exe file and see if they can set it to always run as admin[/quote]
If running as admin didnt work, set it to always run as admin is not going to be any different.
If the problem is permissions and runing as admin does not work, maybe the path you are trying to write requires higher permissions than administrator. Try to right click on the folder you are using and check the security tab, add the admin or the Everyone user with write rights.
Yes windows has no mayor issues. If you write to a private folder for internal files, try to use the SpecialFolder.ApplicationData, for another not changing path, you can set the permissions with inno at the install.
BUT, you should trap all the writing errors in your code, using the iswritable and a Try and show a message tho the user that the access to a file was not successfull.
You might want to check and see if they are trying to run your app in terminal services. That is, installed on a server and run under Remote Desktop. That config may require additional permissions.
The only other thing I can think of off the top of my head is to find out if the users are part of a Domain on their network and if their home directories are in fact on a networked drive instead of local. I remember having lots of issues with that at my pre-Xojo job.
I checked, I do have two ShellExecute calls, but they’re not called on App launch, they’re only used once to launch a helper app when the user is saving settings to their system registry. Once the settings are in the registry, Lightwright just reads them - and those methods are all heavily trapped for exceptions.
Just to be sure as I don’t see it mentioned above, but are you including the Visual C++ Redistributable with your installer? I don’t know what, if any, specific error messages are shown when this isn’t installed, but I thought it worth mentioning. I think it’s installed via Windows Update in later Windows 10 versions, but better safe than sorry.
Actually no, I don’t include the Redistributable in the install. I always assumed (perhaps wrongly) that if the redistributable was needed and wasn’t there, that the Xojo app would say something to that effect when it tried to run.
I did ask the users with this problem to make sure they have installed all Windows updates, all say they have…
If I make the redistributable part of the installer, will users running older versions of Windows run into problem with it?