Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mDesktop has crashed, do you want to restore the last desktop #14

Closed
BikerScott opened this issue Jul 3, 2014 · 12 comments
Closed

mDesktop has crashed, do you want to restore the last desktop #14

BikerScott opened this issue Jul 3, 2014 · 12 comments
Assignees
Milestone

Comments

@BikerScott
Copy link

What steps will reproduce the problem?

  1. Install on Windows 8.1
  2. Change number of desktops to 6
  3. Give each desktop a name and set to start on boot
  4. Application runs with no issues all day
  5. Shut down computer
  6. start computer and when it tries to start an error is thrown "mDesktop has crashed, do you want to restore the last desktop".
  7. Answering yes or no makes no difference, mDesktop starts but with all previously changed settings back to default.

What is the expected output? What do you see instead?
Expected it to launch with my previously saved settings

What version of the product are you using? On what operating system?
Latest version (1.6 I think), Windows 8.1

Each restart I have to right click on the tray icon, open, and "save settings" before the application will start working again. It works flawlessly after that.

@octalmage octalmage added this to the mDesktop 1.6 milestone Jul 10, 2014
@octalmage
Copy link
Owner

Thanks for the bug report!

This has to do with where I store the settings. On newer versions of Windows you can't write to the programs directory without administrator privileges, so mDesktop is unable to save the settings. To get around this you can right click mDesktop and run as administrator.

I'll fix this in the next version by storing the settings in %A_appdata%\mDesktop. This will return a directory safe to write to on all versions of Windows.

@MPagel
Copy link

MPagel commented Aug 4, 2014

can we install a junction/mklink for a particular file from the mDesktop programs directory to a same-named file in a directory that has the proper permissions as a temporary work-around?

@octalmage
Copy link
Owner

Alright I believe I've fixed this issue!

Can y'all install AutoHotkey then try running mDesktop from source?

@MPagel
Copy link

MPagel commented Aug 14, 2014

I've installed AutoHotkey, NSIS from Nullsoft (with multiple plugins needed to get past various compile errors), but am still encountering issues. Opening the nsi file with VIM gives an error saying the last line is incomplete. It is indeed, missing a "]" and a <CR>.

I'll re-download and re-extract the source package. If that doesn't work, I'll manually close out the opencandy call (section below the end of Function .onGUIEnd)

I also don't have an OCSetupHlp, but as all the spamware lines all seem commented out anyway that probably doesn't matter.

@MPagel
Copy link

MPagel commented Aug 14, 2014

Re-downloaded source, same problem with the end-of-file still exists. Deleted or commented out all opencandy stuff. Running install script still fails, saying essentially that mDesktop.exe doesn't exist. Commenting out the line in the script that specifies the exe results in the exe not being created by the install script.

@MPagel
Copy link

MPagel commented Aug 14, 2014

ahh, okay. right click on the ahk file and clicking "compile" creates the exe that the installer was referring to.

@octalmage
Copy link
Owner

You don't need the installer! Just run mDesktop.ahk

@octalmage
Copy link
Owner

Or run the created exe. I just want to know if my latest commit fixes this issue for you.

@MPagel
Copy link

MPagel commented Aug 20, 2014

Yes. Sorry for the lack of response.
There are still other issues with running without elevating as an admin (some windows appear on all desktops, even - in rare cases - if the app was launched as the same non-admin user).

But this setting fix appears to work to fix this bug (#14).

@octalmage
Copy link
Owner

No worries thanks for checking it out!

I'm not sure what we can do about controlling windows created by apps running as administrator. Except for running mDesktop as administrator. Does Windows still do that UAC popup thing? I set up a Windows 8 VM the other day and I don't remember it doing it.

@MPagel
Copy link

MPagel commented Aug 26, 2014

Yes, and my network at work is very intent on me not changing windows security policies, even with an admin login. I don't want to start a war with IT, so I won't firewall them out and then drop my UAC level.

Vista's UAC was very intrusive. Windows 7 was much better from my perspective. 8.1 is a bit more intrusive than 7.

Is it possible to have mDesktop have a system service running which the main application tells what it wants done? I'm not sure this is any better from a security model or end user perspective though as it still requires an aspect of mDesktop to run as an admin/system user.

@octalmage
Copy link
Owner

I've never worked with services so I'm not sure what that would take or accomplish. But I can use something like this to request administrator privileges:

DllCall("shell32\ShellExecuteA", uint, 0, str, "RunAs", str, A_ScriptFullPath, str, """" . PARAM1 . """", str, A_WorkingDir, int, 1)

I'll start a new ticket for further discussion since the original issue is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants