Puppy-Win32-Installer

A home for all kinds of Puppy related projects
Message
Author
noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#121 Post 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!
Attachments
main.nsi.gz
(37.97 KiB) Downloaded 412 times

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

New main.nsh

#122 Post 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.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

bcdedit reply

#123 Post by shinobar »

Well, this may be important info:
My Windows 7 is Japanese version, so the 'bcdedit' replies in Japanese.
Attachments
bcdedit_add_entry.PNG
Windows 7 Japanese version
(4.49 KiB) Downloaded 1003 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

ExecWait

#124 Post 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.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#125 Post 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).
Attachments
main.nsi.gz
(38.1 KiB) Downloaded 516 times

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

nsexec

#126 Post 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%
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#127 Post by noryb009 »

I see now. The stack had the return code, then the output. I changed the installer and added another "pop $1".
Attachments
main.nsi.gz
(38.36 KiB) Downloaded 422 times

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

#128 Post 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.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

almost got it

#129 Post 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!
Attachments
main.nsi.gz
NOT ZIPPED. Just change the name to 'main.nsi'.
(38.48 KiB) Downloaded 407 times
Last edited by shinobar on Sun 31 Oct 2010, 12:06, edited 1 time in total.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#130 Post 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.

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#131 Post 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)
Attachments
Test.nsi.gz
Not zipped, just rename.
(274 Bytes) Downloaded 389 times

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

AdminTest

#132 Post 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.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Lucid-Puppy-Quickset-511-Installer

#133 Post 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.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#134 Post 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!

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

Puppy Linux Installer Creator V1.0

#135 Post by noryb009 »

I finished the Puppy Linux Installer Creator V1.0.

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

Post Reply