Page 7 of 7

Posted: Mon 25 Oct 2010, 01:56
by noryb009
Is "C:\Backups\BCD Backup" a file?

Can you overwrite the 3.1 main.nsi with the attachment, then try again? IT IS NOT ZIPPED, just remove the .gz

Thank you!

New main.nsh

Posted: Mon 25 Oct 2010, 02:26
by shinobar
I see "C:\Backups\BCD Backup".
noryb009 wrote:Can you overwrite the 3.1 main.nsi with the attachment
Thanks. I am trying. But seems same result (freeze).
I suspect creating new item sucseeds (return 0), but somthing wrong in handling the returned ID.

Additional info: Re-run the installer after killing the primer installer, it completes with sucsess, of couse without rewrting the BCD.
My repeated proccess is then uninstall from the menu.

bcdedit reply

Posted: Mon 25 Oct 2010, 03:00
by shinobar
Well, this may be important info:
My Windows 7 is Japanese version, so the 'bcdedit' replies in Japanese.

ExecWait

Posted: Mon 25 Oct 2010, 06:13
by shinobar
Hi, noryb.
I am looking up your last main.nsi.
At line 364-366:

Code: Select all

    messagebox MB_OK 'Debug: command run:$\r$\nbcdedit /export "C:\Backups\BCD Backup"' #debug
    ExecWait 'bcdedit /export "C:\Backups\BCD Backup"' $1
    messagebox MB_OK 'Debug: result:$\r$\n$1'
At line 372-379:

Code: Select all

    messagebox MB_OK 'Debug: command run:$\r$\nbcdedit /create /d "${WHAT_TO_CALL_ON_BOOT}" /application bootsector' #debug
    ExecWait 'bcdedit /create /d "${WHAT_TO_CALL_ON_BOOT}" /application bootsector' $5
    messagebox MB_OK 'Debug: result:$\r$\n$5'
    StrCpy $4 "$5" #debug
    push $5
      call BetweenBrackets
    pop $5
Both i see the debug dialog - 'result: 0'
Means both the command 'bcdedit' returns the exit code '0', may mean success.
The last 'ExecWait' sets the exit code, $5 = 0.
The function BetweenBrackets proceeds '0' and get in an infinitive loop.

How to get the reply of the command 'bcdedit' with NSIS, that is the question.

Posted: Mon 25 Oct 2010, 19:58
by noryb009
Thank you for that. I looked it up again and found execwait does return the return code, not the output, I think I found how to get it, though.

Ok, firstly, check your C:\Program Files\NSIS\Pulgins, and make sure nsexec is there. (if it isn't, you may have to reinstall NSIS and select it)

Uninstall puppy (if it's in your menu, otherwise, don't worry), and remove the entry from bcdedit.

Then, try out the attached main.nsi (again, just rename it).

nsexec

Posted: Tue 26 Oct 2010, 01:23
by shinobar
Thanks, noryb.
I have nsexec.
Tried new main.nsi. A bit forward? But still freezes after the 'result: 0' at the same point.

Code: Select all

    nsExec::ExecToStack 'bcdedit /create /d "${WHAT_TO_CALL_ON_BOOT}" /application bootsector'
    pop $5
    messagebox MB_OK 'Debug: result:$\r$\n$5'
I see still 'result: 0' .

Log left:

Code: Select all

Output folder: C:\Puppy-Linux-511
Extract: lupq-511.sfs... 100%
Extract: vmlinuz... 100%
Extract: initrd.gz... 100%
Extract: readme.txt
Output folder: C:\Puppy-Linux-511
Output folder: C:\Backups
Output folder: C:
Extract: grldr... 100%
Extract: grldr.mbr... 100%

Posted: Tue 26 Oct 2010, 02:07
by noryb009
I see now. The stack had the return code, then the output. I changed the installer and added another "pop $1".

Posted: Tue 26 Oct 2010, 04:15
by shinobar
noryb009 wrote:I see now. The stack had the return code, then the output. I changed the installer and added another "pop $1".
Promising!
I cannot test it right now because i am out now.
You will see the result maybe tommorow.

Thanks, noryb.

almost got it

Posted: Tue 26 Oct 2010, 13:28
by shinobar
We've almost got it, noryb!
Double pop works well and succeeded to modify the BCD!

But the menu.lst was broken because the $1 was overwritten.
I think next order is better for the tasks:
  1. save the files, vmlinuz, etc.
  2. save the grldr
  3. make the menu.lst
  4. make new entry in BCD(or boot.ini)
The entry of menu.lst was reverted using (hd0,0).

I made a small change against your main.nsi and got a success.:D
Attached the main.nsi i used.
The LupQ installer made, Lucid-Puppy-Quickset-511-Installer.exe, available here.

We need more test, but we have almost got it!

Posted: Tue 26 Oct 2010, 19:13
by noryb009
That's great news! The only other thing I have to test on 7 is a non-admin user trying to install it. I also have to do a little more 9x testing, and then I think it's done!
The entry of menu.lst was reverted using (hd0,0).
Yes, I forgot about changing that.

Posted: Tue 26 Oct 2010, 21:16
by noryb009
I made a small script to test if the user is an admin. Can you test it out? (again, not zipped, just right click > compile, then run "AdminTest.exe"). Can you also try it on a user that isn't admin? (it should ask for the admin password, try it correctly and incorrectly)

AdminTest

Posted: Wed 27 Oct 2010, 00:29
by shinobar
noryb009 wrote:I made a small script to test if the user is an admin.
All success in my test!
  1. The account 'shino' on Windows 7 is the Administrator with no passward.
    I ran the AdminTest.exe. A dialog arised asking to allow the program modifying the computer. Reply just 'Yes', it says 'You are admin.'
  2. Made a 'guest' account. It is the default of the Windows 7. I need just activate the account.
    Switched to the account 'guest'. Ran the AdminTest.exe. Same dialog as before. Just reply 'Yes' is enough in this case because the admin not require password. The script says 'You are admin.'
  3. Made a password all lower case for the account 'shino', the Administrator.
    Of course 'shino' is not required password to execute the AdminTest.exe.
    All is the same regardless with or without password for the account 'shino'.
  4. Switched to 'guest'. Ran the AdminTest.exe. A dialog arised same as before but with the password entry for account 'shino', the Administrater. 'Yes' with no password entry denied and the dialog again. Enter the correct password and 'Yes'. the script says 'You are admin.'
  5. Changed the password of 'shino' with Upper case and lower case included. Same result as the all lower case above.
All is perfect i think. Thanks.

Lucid-Puppy-Quickset-511-Installer

Posted: Wed 27 Oct 2010, 00:46
by shinobar
Hi, noryb!

I enter my Windows 7 with account 'guest'.
Un-installed the Puppy of the yesterday. Required the password, enterd it, the un-install performed correctly.

Again i run with the account 'guest', Lucid-Puppy-Quickset-511-Installer.exe i made yesterday.
The password required. I enter the password. The install goes on with success.
Great! The admin issue may already be cleared with your former installer maker, i guess.

Thanks.

Posted: Wed 27 Oct 2010, 01:00
by noryb009
Great! The admin issue may already be cleared with your former installer maker, i guess.
The new type works with all windows versions.

Thank you for all your help!

Puppy Linux Installer Creator V1.0

Posted: Sun 31 Oct 2010, 19:29
by noryb009
I finished the Puppy Linux Installer Creator V1.0.

Moved here: http://murga-linux.com/puppy/viewtopic.php?t=61404