You are here

Two Question Regarding NSIS

8 posts / 0 new
Last post
Patrick Patience
Offline
Last seen: 4 years 3 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Two Question Regarding NSIS

With the portable version of A Note I made, (in the Beta Forums) everything's working almost as perfectly as could be. There is, however, a couple questions I have. I have them in the beta post as well, but I don't think many people have looked there. They are:

1.Is there a way to copy a whole folder of settings from Application Data to the
portable device without it taking up to thirty seconds?

2.All the times I tried to make the script delete the folder "A Note" under Application Data, it won't do anything. I figured there's some reason because it's program settings and files, so I just renamed it, then deleted it, but for the next release, I would like to have it just delete the folder, is there a way to force it too?

Number one is much more important to me. Go download A Note and check out the source if you don't know why either. Please help me out, thanks in advance.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 14 years 6 months ago
Joined: 2006-01-06 21:27
.
  1. Assuming you don't want the old settings folder to stay there, try Rename "$APPDATA\Blah\" "$EXEDIR\Data\backup" (note: may not work; just off the top of my head)
  2. Delete /REBOOTOK "$APPDATA\A Note" - Tells Windows to delete on next startup if it can't be deleted now.

----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

"If you're not part of the solution, you're part of the precipitate."

Patrick Patience
Offline
Last seen: 4 years 3 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Nope.

Number one is what it is already doing.

Number two is not a possible solution, as I have to delete that folder, and then rename the local settings to same folder.

I really need number one, cause the renaming will be fine I suppose, I'll post the script in a few minutes.

Edit: Here's the source, when I first rename the portable settings to the local spot, transfer is quick, but when I rename back at the end, it is much slower, maybe I have that line in the wrong area. Source.

_____________________________
I felt so different without a signature.

Simeon
Simeon's picture
Offline
Last seen: 9 years 5 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
.

On line 231, shouldn it be

CopyFiles /SILENT "$EXEDIR\Data\settings\A Note" "$APPDATA\A Note"

instead of

CopyFiles /SILENT "$EXEDIR\Data\settings\A Note" "$APPDATA"

???
And in line 248, did you try what Ryan suggested?
"Rename" instead of "CopyFiles /SILENT"??
“Science is the belief in the ignorance of the experts” - Richard P. Feynman

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Patrick Patience
Offline
Last seen: 4 years 3 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Nope.

If I do what you suggested, it will put the A Note Folder inside of a folder named A Note in APPDATA, then the settings wouldn't be found.

And for the other one, if you're talking about the REBOOTOK thing, nope, because I need to rename "A Note Backup" "A Note" and I can't renamed the backup to the original is the portable settings are still their.

If that makes sense. Blum

_____________________________
I felt so different without a signature.

Patrick Patience
Offline
Last seen: 4 years 3 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Edit.

Actually. The renaming seems to be working quicker, and if I rename, and it doesn't work, I don't have to worry about deleting a folder that doesn't want to be renamed. And then I don't have to rename it to A Note Delete, I'll try it out, I think I may have already tried this though.

_____________________________
I felt so different without a signature.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 14 years 6 months ago
Joined: 2006-01-06 21:27
Well,

That's cause Windows has the rename function built in to the kernel itself (or something similar). During a rename, the physical information stays in the same place, just the pointer is changed. The copy operation actually makes a physical copy, which takes longer.

At least, as far as I can remember.
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

"If you're not part of the solution, you're part of the precipitate."

Patrick Patience
Offline
Last seen: 4 years 3 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Ohhh.

I see, well, yea, I'll give the renaming a shot.

_____________________________
I felt so different without a signature.

Log in or register to post comments