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

Hidden Application after installation on Windows 11 #1904

Closed
umlaeute opened this issue Mar 5, 2023 · 20 comments · Fixed by #1907
Closed

Hidden Application after installation on Windows 11 #1904

umlaeute opened this issue Mar 5, 2023 · 20 comments · Fixed by #1907
Labels
os:windows issues primarily affecting Windows pending this issue is resolved, but not released/merged into master yet

Comments

@umlaeute
Copy link
Contributor

umlaeute commented Mar 5, 2023

I've just installed Pd-0.53-1 on a "Windows 11 Home" machine (that was just converted from "Windows 11 S-Mode" and while that installation was almost a year old, no significant modding happened (as is the case with S-Mode), so I consider the machine almost "pristine").

After installation (with the default exe-installer), Pd is launched just fine.

However, afterwards I can no longer find the Pd application launcher.
I can find the pd.exe of course, but there is

  • no Application shortcut on the Desktop
  • no Entry in any "App" menu of the system

of course I am a total noob when it comes to Windows (and even more so in a crippled version like "Home"), so I might just be looking in the wrong places.

Sidenote: file associations work fine.
It just seems to be a problem with registering Pd as an "App" to the system.

@umlaeute umlaeute added the os:windows issues primarily affecting Windows label Mar 5, 2023
@Lucarda
Copy link
Contributor

Lucarda commented Mar 5, 2023

I had just tested the installer on Windows 11 pro and I get the descktop shortcut and the entry on the App menu:

win11-post-install

I think that on Win11 home you have to run the installer with admin rights.

you can first uninstall the app from:

Control Panel\All Control Panel Items\Programs and Features (paste this on a file explorer address)

re-run the installer (right-click on the installer -> Run as administrator)

Note: This is one of many issues that makes one consider upgrading from home to pro :)

@umlaeute
Copy link
Contributor Author

umlaeute commented Mar 6, 2023

thanks for confirming.

I think that on Win11 Home you have to run the installer with admin rights.

I think I did.
I'm pretty sure that I had to enter the admin-password for the installer (but probably I did not "Run as Administrator").
I'm going to try again in the next few days.

a quick question about your screenshot: in the "Pinned" section it says pd (all lower-case), rather than Pure Data (64bit) (as in the "Recommended" section).
Is this by your doing, or something automatic (e.g. because the actual executable is called pd.exe rather than Pure Data (64bit).exe)?
And does this launch the pd-core or the pd-gui? (see #1905)

Note: This is one of many issues that makes one consider upgrading from home to pro :)

it's not that I'm actually going to use either Home nor Pro.
However, I would like users be able to run Pd, even if they somehow decide that they Home is their thing.

@Lucarda
Copy link
Contributor

Lucarda commented Mar 6, 2023

a quick question about your screenshot: in the "Pinned" section it says pd (all lower-case), rather than Pure Data (64bit) (as in the "Recommended" section).
Is this by your doing, or something automatic (e.g. because the actual executable is called pd.exe rather than Pure Data (64bit).exe)?
And does this launch the pd-core or the pd-gui? (see #1905)

What you see in the pic (the names of the app in the "pinned" and in the "desktop icon") where right after running the installer. Nothing done by me.

it lunched the pd-core when finished with default options from the installer (ticked "see readme" and "start pd"). I think this is what your question is about.

@umlaeute
Copy link
Contributor Author

umlaeute commented Mar 6, 2023

it launched the pd-core when finished with default options from the installer (ticked "see readme" and "start pd"). I think this is what your question is about.

ah, no. the question is, what gets launched if you click the pd icon (rather than the Pure Data (64-bit) icon)

@umlaeute
Copy link
Contributor Author

umlaeute commented Mar 6, 2023

hmm. i checked on that computer again, and:

  • when logged in with the Admin account (where i guess i performed the installation), there's an app icon on the desktop.
  • when logged in as a normal user, there's no app icon (which i guess is expected).

as the normal user, i cannot find the Application in none of the pinned, recommended and All apps

@Lucarda
Copy link
Contributor

Lucarda commented Mar 7, 2023

may be this https://nsis.sourceforge.io/Reference/RequestExecutionLevel helps.

I tried RequestExecutionLevel user but this one can't write the files to C:\Program Files.

here I used RequestExecutionLevel highest and it works for me as i am admin.

https://nc.nubegris.com.ar/index.php/s/ZjrJy9NgMLwPpaD

Can you test it on your win-home non-admin user?

it is supposed to ask your user password.

@Lucarda
Copy link
Contributor

Lucarda commented Mar 7, 2023

ah, no. the question is, what gets launched if you click the pd icon (rather than the Pure Data (64-bit) icon)

At this time I can't get that icon anymore and I'm not sure if that was a trick of mine (probably not as there should be some left over shortcut somewhere but could not find it (this is a secondary and rather clean machine))

@umlaeute
Copy link
Contributor Author

umlaeute commented Mar 7, 2023

Can you test it on your win-home non-admin user?

not before tomorrow.

anyhow, the docs for RequestExecutionLevel talk only about Vista and Win7. I would have assumed that to mean "this is a compat flag for old versions of Windows and is not needed anymore". But of course it could also mean that the docs (are 15 years old and) mean "this flag is required for newer versions of Windows, starting with Vista/Win7"...

@Lucarda
Copy link
Contributor

Lucarda commented Mar 7, 2023

But of course it could also mean that the docs (are 15 years old and) mean "this flag is required for newer versions of Windows, starting with Vista/Win7".

I think that it means "starting with Vista/Win7" as it took effect on my win11 tests.

@umlaeute
Copy link
Contributor Author

umlaeute commented Mar 9, 2023

afaict, the problem is, that the launcher is not installed into C:\ProgramData\Microsoft\Windows\Start Menu\Programs (presumably %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs).
Manually copying the launcher-shortcut into this folder, makes it visible in to all the users.

See also:

@Lucarda
Copy link
Contributor

Lucarda commented Mar 9, 2023

I can't get into this until next monday.

of course there should be an nsis way to install to all users. but I would like to know anyway how the above link installer work, the RequestExecutionLevel highest thing should be what non-admin users want.

Please test : https://nc.nubegris.com.ar/index.php/s/ZjrJy9NgMLwPpaD in your winn11:home non-admin-user.

EDIT: first uninstall Pd from the admin account

EDIT2: about the pd icon on pinned start menu (from the pic above in this thread): It was surely me forgetting I did "pin to start" from a zip version. sorry for the confusion.

@umlaeute
Copy link
Contributor Author

umlaeute commented Mar 10, 2023

OK.

my system has two account:

  • admin (with admin privileges)
  • user (without admin privileges)
  • there's other non-account users as well (but only a single admin-account)
  1. I uninstalled my previous Pd installation
  2. log in as user
  3. Downloaded https://nc.nubegris.com.ar/index.php/s/ZjrJy9NgMLwPpaD as user
  4. Run the installer as user (double-clicking).
    • this started OK, but as soon as it came to actually copying files, it would stop

InstallPd 2023-03-10 090221

  • Repeat just shows the error again
  • Skip shows the error for the next file.
  • After a while, I decided to Cancel instead.
  1. Right-click the installer (as user) and "Run As Adminstrator"
    • this asks me for the credentials of my admin account. after giving them, the installer proceeds and eventually finishes.
  2. Selecting the "Launch Pd now" option, launches the Pd-GUI (so obviously Pd-core is launched in post-installer (rather than Pd-gui) #1905 is fixed :-))
  3. There are No traces of a "Pure Data" installation. E.g. this is the user's "All Apps" view:

AppsUser 2023-03-10 090727

  1. Switch to (login as) admin
  2. The admin can see the "Pure Data" installation as expected:

AppsAdmin 2023-03-10 090859

  1. I see that Pure Data is installed into the admin's %AppData%\Microsoft\Windows\Start Menu\Programs
  2. I see that there is no Pd in the global %ProgramData%\Microsoft\Windows\Start Menu\Programs.
  3. So I copied the "Pure Data" folder into %ProgramData%\Microsoft\Windows\Start Menu\Programs
  4. Switch to user
  5. I now have a Pure Data (folder-)app in my start menu change width and height to be correct after update idletasks in ::pd_bindings::patch_configure #1236

so to conclude:

  • your package fixes Pd-core is launched in post-installer (rather than Pd-gui) #1905
  • however, it does not fix this issue with "Application not being in Start Menu except for the user how installed Pd"
  • it makes things slightly worse (at least, I cannot remember seeing these "Error opening file for writing" popups when running Pd as a non-admin user.

Sidenotes about the visual appearance of the startmenu:

  • the "Pure Data" app-name now looks good (no more "64bit")
  • the "Uninstall" looks a bit sad. Could that me named "Uninstall Pure Data" instead?
    (while searching for the uninstall option of Pd via my Win11 global search, I encountered a lone "Uninstall" application without any context of what would be uninstalled if i clicked it. This might have been Pd's uninstaller or not (it might have been called Uninst, cannot remember right now; but i'm pretty sure it featured the generic NSIS-uninstaller icon), but it reminded me, that we might improve UX by giving more context)
  • why is there no icon for the website?

@umlaeute
Copy link
Contributor Author

I've moved the "visual appearance" remarks into a separate ticket:

@Lucarda
Copy link
Contributor

Lucarda commented Mar 10, 2023

good

  • however, it does not fix this issue with "Application not being in Start Menu except for the user how installed Pd"

we will have to tackle that based on what you posted above.

  • it makes things slightly worse (at least, I cannot remember seeing these "Error opening file for writing" popups when running Pd as a non-admin user.

:(

RequestExecutionLevel does not buys us anything. we can wipe it and leave the installer as it was before. I expected that user/pass were asked.

I'll look into all this on next monday.

@Lucarda
Copy link
Contributor

Lucarda commented Mar 13, 2023

@umlaeute please test

https://nc.nubegris.com.ar/index.php/s/HgGHiGr6NBWd7NP

  • it installs for all users but you need admin rights (default behavior)

    • also admin rights are required to uninstall
  • website icon from shell32.dll on the target machine.

@umlaeute
Copy link
Contributor Author

umlaeute commented Mar 13, 2023

i'll try to test tonight.

it installs for all users but you need admin rights (default behavior)

is it possible to also install as a normal user (who has does not know any admin credentials), falling back to the old behavior?
to be honest, i have no clue, but iirc Pd by default tries to install into %ProgramFiles%, which requires admin privileges. however you can ask it to install into some other place (where you are allowed to write). if this is the use-case for a given user, it would also be nice if they could install the new version (which might require to answer a question in the installer, whether they want to make the application available for everybody. or somesuch.

something like:

OTOH, i just checked with VLC, and it seems they are unconditionally trying to install for "all users":
https://github.com/videolan/vlc/blob/0f92f19cfcccd3e248e38c21b466a73fb901428c/extras/package/win32/NSIS/vlc.win32.nsi.in#L257

so I guess it is OK to do it like that...

@umlaeute
Copy link
Contributor Author

so here's the result of my test.

installation

  1. first i uninstalled Pd (at least i think i uninstalled it; but later on i discovered some leftovers)
  2. starting the new installer as a "normal2 (non-admin) user immediately asks for the admin password.
  3. after that, it's a smooth ride.

being asked for the admin-password felt natural (keep in mind that I am not a Windows guy), so you probably can disregard my last comment on supporting both admin and non-admin installation.

availability ("hidden-ness")

once the installation was done, the "Pure Data" application did show up in my "Apps".
switching to another (non-admin) user, "Pure Data" still shows up.

🎉 mission accomplished 🎆

URL-icon

the link to puredata.info now has some generic icon.
i'm slightly confused which icon is used, as at first it seemed that it was just the Edge-icon (which is the default browser for that account), but later on it was an unknown-to-me icon with a monitor and a world (see screenshot).

i could associate both icons with "the internet", and it does look much nicer than the blank "document" icon.
so:

🎉 mission accomplished 🎆

Uninstaller name

this confused me most.

  1. in the "Apps" view, i do not see any uninstaller.
  2. if I navigate to %ProgramFiles%\Pd\, I can see an uninst application 😏
  3. there's still the "Uninstall" option in the Settings->Apps.

Screenshot 2023-03-13 210749

i'm honestly not sure whether this is an improvement or not.
i don't recally any application having an "Uninstall" option in the "Apps" view, so it's probably a good idea that Pd doesn't have one either.
the uninst application in %ProgramFiles%\Pd\ is definitely uglier than what I remember (but I figure that people are not advised to go into %ProgramFiles%\Pd\ anyhowm so it's probably not a big deal.

@Lucarda
Copy link
Contributor

Lucarda commented Mar 14, 2023

installation

being asked for the admin-password felt natural (keep in mind that I am not a Windows guy), so you probably can disregard my last comment on supporting both admin and non-admin installation.

I would like to stay away from non-admin installation for now. It seems complicated for he registry settings.

https://nsis.sourceforge.io/Docs/MultiUser/Readme.html

It can be done surely but it will take me toooooo long testing and I think most people have rights on their computers and eventually in a desperate need you have the zip package.

URL-icon

this is taken from Windows system icons "%SYSTEMROOT%\system32\shell32.dll" 14 14 is the index of one of them. They are different on each OS release.

win11:

uninstallwin11

win10

ununstallwin10

Uninstaller name

this confused me most.

Me to.

NOTE: I used Millers installer on Win10 and I could see the uninstaller icon in the start menu folder. 2 seconds later it was gone. Same with my installer. Don't ask. and also don't ask me why I can't reproduce with the last installer I did.

Also while changing the code there where sometimes where I could not see it in my Win11 dev machine. I thought there was white-space trouble in the expansion on "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall ${PRODUCT_NAME}.lnk"
so now I switched to Uninstall-Pd.lnk to put the code in the safest possible state.


I will push to #1909 to expose the changes

@Lucarda
Copy link
Contributor

Lucarda commented Mar 14, 2023

here is an installer as 900dc36

https://nc.nubegris.com.ar/index.php/s/LatM7ECyX2d4iJ9

@umlaeute
Copy link
Contributor Author

The uninstaller now looks good (kind of :-))

Screenshot 2023-03-14 193617

@umlaeute umlaeute added the pending this issue is resolved, but not released/merged into master yet label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:windows issues primarily affecting Windows pending this issue is resolved, but not released/merged into master yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants