bugGNU Octave - Bugs: bug #43824, Network share not ready after...

 
 

bug #43824: Network share not ready after installation

Submitter:  Armin Müller <arm_in>
Submitted:  Mon 15 Dec 2014 11:02:55 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  Fixed Assigned to:  lostbard
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.2 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 25 Dec 2014 01:32:52 PM UTC, comment #12: 
John Donoghue <lostbard>
Group Member
Mon 22 Dec 2014 10:36:41 AM UTC, comment #11: 

Thank you very much for the installer, John.

I downloaded the Dropbox version and installed it on a Windows 7 machine.

  • Octave GUI comes up
  • IL "Medium"
  • No network shares at home, but I'm confident it will work
Armin Müller <arm_in>
Thu 18 Dec 2014 02:59:00 PM UTC, comment #10: 

Oh no. Dropbox is being blocked at work :-/ I'll try later.

Armin Müller <arm_in>
Thu 18 Dec 2014 01:27:54 PM UTC, comment #9: 
John Donoghue <lostbard>
Group Member
Thu 18 Dec 2014 01:26:28 PM UTC, comment #8: 

Yes would need to build the installer.

The default for the bat runs the viewer - originally it did not, but not is needed to pass the program to run for explorer.

I will send a link to a prebuilt version on dropbox.

John Donoghue <lostbard>
Group Member
Thu 18 Dec 2014 08:07:22 AM UTC, comment #7: 

Thank you for the patch.

I'm not shure how to test it. I did a build of Octave on Cygwin once, which took hours and grew the swap file to >100GB. This time, I would have to build the installer using the MXE environment, right?

Btw, the last parameter "--force-gui" is dropped with the patch. But I guess it is OK, because the default behaviour for "octave.bat" without parameter is to launch the GUI.

Armin Müller <arm_in>
Wed 17 Dec 2014 07:19:36 PM UTC, comment #6: 

Does this patch work?


(file #32687)

John Donoghue <lostbard>
Group Member
Tue 16 Dec 2014 03:56:50 PM UTC, comment #5: 

The problem is well-known. Just Google for "NSIS MUI_FINISHPAGE_RUN UAC" and get more than 1000 hits.

Possible solutions found:

  • Launch new Explorer process (seems most reasonable to me)

https://stackoverflow.com/questions/16555625/how-to-launch-an-executable-on-the-end-of-installation-correctly

Exec '"$WINDIR\explorer.exe" "$TEMP\MyUnElevatedProcess.exe"'


  • NSIS "UAC" Plugin (seems to be difficult to use)

http://nsis.sourceforge.net/UAC_plug-in

  • NSIS "ShellExecAsUser" Plugin

http://nsis.sourceforge.net/ShellExecAsUser_plug-in

Armin Müller <arm_in>
Tue 16 Dec 2014 03:00:47 PM UTC, comment #4: 

No, this is not what I suggested. I agree with you that the installer needs admin rights (UAC) during installation.

The problem might be around makeinst-script.sh line 112


!define MAIN_APP_EXE "octave.bat"
...
!define MUI_FINISHPAGE_RUN "\$INSTDIR\\\${MAIN_APP_EXE}"
!define MUI_FINISHPAGE_RUN_PARAMETERS "--force-gui"
...


There should be some mechanism to restore Integrity Level after installation. I'm thinking of something like


runas /user:%USERDOMAIN%\%USERNAME% "\$INSTDIR\\\${MAIN_APP_EXE}" "--force-gui"


The drawback here is that the user has to type his/her password again. Maybe there is some more elegant solution. I'm not the NSIS expert, unfortunately.

Armin Müller <arm_in>
Tue 16 Dec 2014 12:07:27 PM UTC, comment #3: 

So you suggest to set "RequestExecutionLevel user" (http://nsis.sourceforge.net/Reference/RequestExecutionLevel)
in makeinst-script.sh line 127 (http://hg.octave.org/mxe-octave/file/bb70aeee012e/makeinst-script.sh#l127)?

I don't use Windows but I think you're then not able to install Octave for all users. Is this intended?

Can you try the installer with RequestExecutionLevel changed?

I think not beeing able to access mapped network shares during installation is a small glitch. Can we force the Installer to not start the GUI at the End or force to close the GUI?

Andreas Weber <andy1978>
Group Member
Tue 16 Dec 2014 09:38:39 AM UTC, comment #2: 

Hmmm, I did a diff on the Octave installation folder, "octaverc" files etc. but nothing special here.

How about this theory:

When launching the installer, UAC is asking for confirmation (no "administrator password"). After that, the installer is running under Integrity Level = High. The installer is spawning Octave, also under Integrity Level = High.

When exiting Ocatave and launching again manually, then Integrity Level = Medium.

Citing Microsoft

Some Programs Cannot Access Network Locations When UAC Is Enabled

"This problem occurs because UAC treats members of the Administrators group as standard users. Therefore, network shares that are mapped by logon scripts are shared with the standard user access token instead of ..."

So, I would suggest that the installer has to launch Octave under "Medium" IL to fix the behaviour.

Armin Müller <arm_in>
Mon 15 Dec 2014 10:19:25 PM UTC, comment #1: 

A bit of speculation: such issues can also be caused by the installation routines invoked in Windows, or some inheritance of the installer's process properties by Octave, maybe even related by anti-malware SW.
Did you have to specify the administrator password?

Admittedly it may not be as it should, but I'm not too worried that Octave lacks a bit of functionality until after a first restart.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 15 Dec 2014 11:02:55 AM UTC, original submission:  

I just did a new installation of MXE Octave 3.8.2-4
http://mxeoctave.osuv.de/

  • Uninstall previous 3.8.2-3
  • Install actual 3.8.2-4
  • The installer is asking "[X] Run Octave"


In this constellation, Octave will not have access to network shares. Example:


cd 'X:\'
error: X:\: No such file or directory


Now

  • Exit Octave
  • Start Octave GUI manually



cd 'X:\'
% OK!


It seems that when finishing the installation, but before exiting the installer tool, some prerequisite is missing to Octave to be able to mount network shares.

Seen on Windows 7 64 bit

Armin Müller <arm_in>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #32687:  bug43824.patch added by lostbard (924B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Updated the item)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by arm_in (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-12-29 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-12-25 lostbard StatusPatch Submitted Ready For Test
        Assigned toNone lostbard
    2014-12-17 lostbard Attached File- Added bug43824.patch, #32687
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code