Windows PharoLauncher cannot create "C:\Program Files (x86)\Pharo\Pharo.image"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows PharoLauncher cannot create "C:\Program Files (x86)\Pharo\Pharo.image"

Ben Coman
I popped over to Windows for a moment to try to make my CloudflareUn crossplatform,
and installed PharoLauncher from the downloads page...

I logged in as an Admin to do this, but when I open it I get an error...
   "PrimitiveFailed: primitive #createDirectory: in WindowsStore failed"

where...
path ==> "Path / 'C:' / 'Program Files (x86)' / 'Pharo' / 'pharo-local'"
encodedPath ==> C:\Program Files (x86)\Pharo\pharo-local
(self isDirectory: parent)  ==> true

in...
WindowsStore(DiskStore) >> createDirectory: path
| parent encodedPathString pathString result |
pathString := self stringFromPath: path.
encodedPathString := Primitives encode: pathString.
result := Primitives createDirectory: encodedPathString.
result
ifNil: [ 
parent := path parent.
(self exists: path)
ifTrue: [ 
(self isFile: path)
ifTrue: [ self signalFileExists: path ]
ifFalse: [ self signalDirectoryExists: path ] ].
(self isDirectory: parent)
ifFalse: [ ^ self signalDirectoryDoesNotExist: parent ].
self primitiveFailed ].
^ self

A few calls down the stack is  OmSessioNStore>>resetWithStoreNamed: 

Does this happen for anyone else?

Version Info...

OS 
-----
Windows 10

Image
-----
C:\Program Files (x86)\Pharo\Pharo.image
Pharo6.0
Latest update: #60528
Unnamed

Virtual Machine
---------------
C:\Program Files (x86)\Pharo\Pharo.exe
CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $ Plugins: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $

Win32 built on Jul 20 2017 20:21:26 GMT Compiler: 5.4.0
VMMaker versionString VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $ Plugins: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $
CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017


Also, I would expect trouble for Non-Admin users trying to use the Admin installed Pharo Launcher.trying to write to "pharo-local" under "Program Files".    Does PharoLauncher have its own CI testing to ensure it can open okay and run an image?   I'm glad to see it promoted in importance but with this it probably needs such CI testing of its own separate to the usual Pharo CI testing.  On Windows such CI testing *should* run as a Non-Admin user.

btw, requiring Administrative privileges to install PharoLauncher is going to lock out people who don't have administrative control over their PCs e.g. University student labs. Wanting to run a quick demo for someone in a corporate office.  Why don't we make it the same as OSX and Linux and be usable without Admin privileges.   That would lower a barrier to entry.

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: Windows PharoLauncher cannot create "C:\Program Files (x86)\Pharo\Pharo.image"

demarey
Hi Ben,

Le 16 mars 2018 à 13:22, Ben Coman <[hidden email]> a écrit :

I popped over to Windows for a moment to try to make my CloudflareUn crossplatform,
and installed PharoLauncher from the downloads page...

I logged in as an Admin to do this, but when I open it I get an error...
   "PrimitiveFailed: primitive #createDirectory: in WindowsStore failed »

Did you try to right-click on the installer and select « Run as administrator « ? I’m not sure that apps are all run with admin privileges even if you are logged in with an admin account.

Also, I would expect trouble for Non-Admin users trying to use the Admin installed Pharo Launcher.trying to write to "pharo-local" under "Program Files ». 

Yes, that for sure!
For now, if you are admin, you could install PharoLauncher under « Program Files » but then, you also need to be admin to run it. If you are not admin, you should install PharoLauncher elsewhere.

I did not yet had time to test what Vincent on app packaging but probably, it will solve the issue as Pharo Launcher does not need to write anything to the installation directory (was needed by tools like GT, epicea, stdout).

  Does PharoLauncher have its own CI testing to ensure it can open okay and run an image?   I'm glad to see it promoted in importance but with this it probably needs such CI testing of its own separate to the usual Pharo CI testing.  On Windows such CI testing *should* run as a Non-Admin user.

Functional testing like this is done by hand for this part. There are unit tests. you can check that on CI: https://ci.inria.fr/pharo-ci-jenkins2/job/PharoLauncher/
There is room for improvement here. If you have an idea on how to automate functional testing like this, it would be a great addition!

btw, requiring Administrative privileges to install PharoLauncher is going to lock out people who don't have administrative control over their PCs e.g. University student labs.

It was like that before. I removed this check from the installer so that standard users can install PharoLauncher in a folder where they have write access. This way, PharoLauncher works.

Wanting to run a quick demo for someone in a corporate office.  Why don't we make it the same as OSX and Linux and be usable without Admin privileges.   That would lower a barrier to entry.

It is already possible. Just, do not install PharoLauncher in a folder requiring admin rights.

Thanks for feedbacks,
Christophe
Reply | Threaded
Open this post in threaded view
|

Re: Windows PharoLauncher cannot create "C:\Program Files (x86)\Pharo\Pharo.image"

Peter Uhnak
For now, if you are admin, you could install PharoLauncher under « Program Files » but then, you also need to be admin to run it. If you are not admin, you should install PharoLauncher elsewhere.

As I see this recommendation for the Nth time, maybe it is time the default location to C:\Pharo (or C:\PharoLauncher) ... 

other languages don't seem to have any problem with that whatsoever (I see in my dir C:\Python27, C:\Ruby24-x64, cygwin, msys, mingw, ...)

If the installer cannot escalate on its own, it shouldn't try in the first place. Otherwise it's just bad experience in literally the first step people will take with Pharo.

Interestingly Python 3 has installed itself in %APPDATA%\Local\Programs\Python\Python36-32 ... so maybe that's also a location to consider which doesn't require admin rights.

Peter

On Fri, Mar 16, 2018 at 1:53 PM, Christophe Demarey <[hidden email]> wrote:
Hi Ben,

Le 16 mars 2018 à 13:22, Ben Coman <[hidden email]> a écrit :

I popped over to Windows for a moment to try to make my CloudflareUn crossplatform,
and installed PharoLauncher from the downloads page...

I logged in as an Admin to do this, but when I open it I get an error...
   "PrimitiveFailed: primitive #createDirectory: in WindowsStore failed »

Did you try to right-click on the installer and select « Run as administrator « ? I’m not sure that apps are all run with admin privileges even if you are logged in with an admin account.

Also, I would expect trouble for Non-Admin users trying to use the Admin installed Pharo Launcher.trying to write to "pharo-local" under "Program Files ». 

Yes, that for sure!
For now, if you are admin, you could install PharoLauncher under « Program Files » but then, you also need to be admin to run it. If you are not admin, you should install PharoLauncher elsewhere.

I did not yet had time to test what Vincent on app packaging but probably, it will solve the issue as Pharo Launcher does not need to write anything to the installation directory (was needed by tools like GT, epicea, stdout).

  Does PharoLauncher have its own CI testing to ensure it can open okay and run an image?   I'm glad to see it promoted in importance but with this it probably needs such CI testing of its own separate to the usual Pharo CI testing.  On Windows such CI testing *should* run as a Non-Admin user.

Functional testing like this is done by hand for this part. There are unit tests. you can check that on CI: https://ci.inria.fr/pharo-ci-jenkins2/job/PharoLauncher/
There is room for improvement here. If you have an idea on how to automate functional testing like this, it would be a great addition!

btw, requiring Administrative privileges to install PharoLauncher is going to lock out people who don't have administrative control over their PCs e.g. University student labs.

It was like that before. I removed this check from the installer so that standard users can install PharoLauncher in a folder where they have write access. This way, PharoLauncher works.

Wanting to run a quick demo for someone in a corporate office.  Why don't we make it the same as OSX and Linux and be usable without Admin privileges.   That would lower a barrier to entry.

It is already possible. Just, do not install PharoLauncher in a folder requiring admin rights.

Thanks for feedbacks,
Christophe

Reply | Threaded
Open this post in threaded view
|

Re: Windows PharoLauncher cannot create "C:\Program Files (x86)\Pharo\Pharo.image"

Ben Coman


On 16 March 2018 at 22:23, Peter Uhnák <[hidden email]> wrote:
For now, if you are admin, you could install PharoLauncher under « Program Files » but then, you also need to be admin to run it. If you are not admin, you should install PharoLauncher elsewhere.

As I see this recommendation for the Nth time, maybe it is time the default location to C:\Pharo (or C:\PharoLauncher) ... 

other languages don't seem to have any problem with that whatsoever (I see in my dir C:\Python27, C:\Ruby24-x64, cygwin, msys, mingw, ...)

If the installer cannot escalate on its own, it shouldn't try in the first place. Otherwise it's just bad experience in literally the first step people will take with Pharo.

Interestingly Python 3 has installed itself in %APPDATA%\Local\Programs\Python\Python36-32 ... so maybe that's also a location to consider which doesn't require admin rights.

Peter

I think Python 3 has it right.  Its also where GitForWindows installs itself.

Alternatively the parent %APPDATA%\Local\    
(equivalently %LOCALAPPDATA% which can be typed into Windows Explorer)
is where many apps seem to put their main executable.
On my system I discover...
%LOCALAPPDATA% \ Discord \ app-0.0.298 \ Discord.exe
%LOCALAPPDATA% \ Atom \ atom.exe
%LOCALAPPDATA% \ GitHubDesktop \ GitHubDesktop.exe
%LOCALAPPDATA% \ slack \ slack.exe
%LOCALAPPDATA% \ Roblox \ Versions \ RobloxStudioLauncherBeta.exe


cheers -ben
 


On Fri, Mar 16, 2018 at 1:53 PM, Christophe Demarey <[hidden email]> wrote:
Hi Ben,

Le 16 mars 2018 à 13:22, Ben Coman <[hidden email]> a écrit :

I popped over to Windows for a moment to try to make my CloudflareUn crossplatform,
and installed PharoLauncher from the downloads page...

I logged in as an Admin to do this, but when I open it I get an error...
   "PrimitiveFailed: primitive #createDirectory: in WindowsStore failed »

Did you try to right-click on the installer and select « Run as administrator « ? I’m not sure that apps are all run with admin privileges even if you are logged in with an admin account.

Also, I would expect trouble for Non-Admin users trying to use the Admin installed Pharo Launcher.trying to write to "pharo-local" under "Program Files ». 

Yes, that for sure!
For now, if you are admin, you could install PharoLauncher under « Program Files » but then, you also need to be admin to run it. If you are not admin, you should install PharoLauncher elsewhere.

I did not yet had time to test what Vincent on app packaging but probably, it will solve the issue as Pharo Launcher does not need to write anything to the installation directory (was needed by tools like GT, epicea, stdout).

  Does PharoLauncher have its own CI testing to ensure it can open okay and run an image?   I'm glad to see it promoted in importance but with this it probably needs such CI testing of its own separate to the usual Pharo CI testing.  On Windows such CI testing *should* run as a Non-Admin user.

Functional testing like this is done by hand for this part. There are unit tests. you can check that on CI: https://ci.inria.fr/pharo-ci-jenkins2/job/PharoLauncher/
There is room for improvement here. If you have an idea on how to automate functional testing like this, it would be a great addition!

btw, requiring Administrative privileges to install PharoLauncher is going to lock out people who don't have administrative control over their PCs e.g. University student labs.

It was like that before. I removed this check from the installer so that standard users can install PharoLauncher in a folder where they have write access. This way, PharoLauncher works.

Wanting to run a quick demo for someone in a corporate office.  Why don't we make it the same as OSX and Linux and be usable without Admin privileges.   That would lower a barrier to entry.

It is already possible. Just, do not install PharoLauncher in a folder requiring admin rights.

Thanks for feedbacks,
Christophe


Reply | Threaded
Open this post in threaded view
|

Re: Windows PharoLauncher cannot create "C:\Program Files (x86)\Pharo\Pharo.image"

Ben Coman
In reply to this post by demarey


On 16 March 2018 at 20:53, Christophe Demarey <[hidden email]> wrote:
Hi Ben,

Le 16 mars 2018 à 13:22, Ben Coman <[hidden email]> a écrit :

I popped over to Windows for a moment to try to make my CloudflareUn crossplatform,
and installed PharoLauncher from the downloads page...

I logged in as an Admin to do this, but when I open it I get an error...
   "PrimitiveFailed: primitive #createDirectory: in WindowsStore failed »

Did you try to right-click on the installer and select « Run as administrator « ? I’m not sure that apps are all run with admin privileges even if you are logged in with an admin account.

I tried "Run as administrator" from Non-Admin account with the same result.
An Admin privileged that is no the "Administrator" account (which Microsoft have hard to access)
only needs UAC to ask the question to approve things to happen.
 

Also, I would expect trouble for Non-Admin users trying to use the Admin installed Pharo Launcher.trying to write to "pharo-local" under "Program Files ». 

Yes, that for sure!
For now, if you are admin, you could install PharoLauncher under « Program Files » but then, you also need to be admin to run it. If you are not admin, you should install PharoLauncher elsewhere.

Strange. I tried and the Installer hung when I tried to Browse for a new directory.  I'll try again later after a reboot.
 

I did not yet had time to test what Vincent on app packaging but probably, it will solve the issue as Pharo Launcher does not need to write anything to the installation directory (was needed by tools like GT, epicea, stdout).

  Does PharoLauncher have its own CI testing to ensure it can open okay and run an image?   I'm glad to see it promoted in importance but with this it probably needs such CI testing of its own separate to the usual Pharo CI testing.  On Windows such CI testing *should* run as a Non-Admin user.

Functional testing like this is done by hand for this part. There are unit tests. you can check that on CI: https://ci.inria.fr/pharo-ci-jenkins2/job/PharoLauncher/
There is room for improvement here. If you have an idea on how to automate functional testing like this, it would be a great addition!

I've not much time with my current 12 hour work roster and side commitments, but I'll keep it in mind to look if I get the chance. 
 
tw, requiring Administrative pbrivileges to install PharoLauncher is going to lock out people who don't have administrative control over their PCs e.g. University student labs.

It was like that before. I removed this check from the installer so that standard users can install PharoLauncher in a folder where they have write access. This way, PharoLauncher works.

Wanting to run a quick demo for someone in a corporate office.  Why don't we make it the same as OSX and Linux and be usable without Admin privileges.   That would lower a barrier to entry.

It is already possible. Just, do not install PharoLauncher in a folder requiring admin rights.

One improvement would be if there lack of Admin rights is detected, suggest an alternate default install location,
but I guess thats highly dependent on what is available from the installer-system.
 
cheers -ben



Thanks for feedbacks,
Christophe

Reply | Threaded
Open this post in threaded view
|

Re: Windows PharoLauncher cannot create "C:\Program Files (x86)\Pharo\Pharo.image"

demarey
In reply to this post by Ben Coman

Le 16 mars 2018 à 17:05, Ben Coman <[hidden email]> a écrit :



On 16 March 2018 at 22:23, Peter Uhnák <[hidden email]> wrote:
For now, if you are admin, you could install PharoLauncher under « Program Files » but then, you also need to be admin to run it. If you are not admin, you should install PharoLauncher elsewhere.

As I see this recommendation for the Nth time, maybe it is time the default location to C:\Pharo (or C:\PharoLauncher) ... 

other languages don't seem to have any problem with that whatsoever (I see in my dir C:\Python27, C:\Ruby24-x64, cygwin, msys, mingw, ...)

If the installer cannot escalate on its own, it shouldn't try in the first place. Otherwise it's just bad experience in literally the first step people will take with Pharo.

Interestingly Python 3 has installed itself in %APPDATA%\Local\Programs\Python\Python36-32 ... so maybe that's also a location to consider which doesn't require admin rights.

Peter

I think Python 3 has it right.  Its also where GitForWindows installs itself.

Alternatively the parent %APPDATA%\Local\    
(equivalently %LOCALAPPDATA% which can be typed into Windows Explorer)
is where many apps seem to put their main executable.
On my system I discover...
%LOCALAPPDATA% \ Discord \ app-0.0.298 \ Discord.exe
%LOCALAPPDATA% \ Atom \ atom.exe
%LOCALAPPDATA% \ GitHubDesktop \ GitHubDesktop.exe
%LOCALAPPDATA% \ slack \ slack.exe
%LOCALAPPDATA% \ Roblox \ Versions \ RobloxStudioLauncherBeta.exe

Very good idea. I updated Pharo Launcher to use LOCALAPPDATA.
Thanks Ben