Old 29th July 2014, 10:52   #1
krischeu
Junior Member
 
Join Date: Mar 2013
Posts: 13
NSIS 2.64 vs 3.0a

Dear all,
I am using a plugin "access controll" on both PC with NSIS edit 2.0.3.
Compiling works on NSIS 2.64
Error comes up at NSIS 3.0a --> stops compiling at:


# Make the directory "$INSTDIR\database" read write accessible by all users
AccessControl::GrantOnFile "$INSTDIR\SafetyWissen.fmp12" "(S-1-5-32-545)" "FullAccess"
AccessControl::GrantOnFile "$INSTDIR\SafetyWissen.exe" "(S-1-5-32-545)" "FullAccess"

I extracted the zip accescontroll.zip and copied all stuff into the folder as usual.

Is there anyone who can give me a help?

Best Regards,

Heinz
krischeu is offline   Reply With Quote
Old 29th July 2014, 11:28   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,539
...and the error message from the compiler is?

You are giving us very little to go on, my only guess is that you did not extract the .dll to the correct plugin subfolder in v3.0. Also, 3.0a is old now, switch to the beta.

And finally, you are not supposed to give all users write access to .exe files in %ProgramFiles%, doing that is a potential security issue. In fact, having to change the ACL on anything in %ProgramFiles% is a sign that your application is not following the design guidelines...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 30th July 2014, 11:17   #3
krischeu
Junior Member
 
Join Date: Mar 2013
Posts: 13
Hi,
I need full access to only 2 files. Mostly in big offices, the user have limited access to program directory. fmp12 is a database directory. Full access is mandatory.

# Make the directory "$INSTDIR\database" read write accessible by all users
AccessControl::GrantOnFile "$INSTDIR\SafetyWissen.fmp12" "(S-1-5-32-545)" "FullAccess"
AccessControl::GrantOnFile "$INSTDIR\SafetyWissen.exe" "(S-1-5-32-545)" "FullAccess"

Error with AccessControll Plugin is still there with Version 3.0b.
I copied it into the NSIS program directory. Perhabs I am missing anything?

Could you give me a help?

Best Regards,
Heinz
krischeu is offline   Reply With Quote
Old 30th July 2014, 14:51   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Which sub-folder did you copy to? What is the error message?

Stu
Afrow UK is offline   Reply With Quote
Old 30th July 2014, 20:42   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,539
So did you not read anything I wrote? Without a compiler error message or any other information our only guess is that you did not put the .dll in the correct directory.

Quote:
Originally Posted by krischeu View Post
Mostly in big offices, the user have limited access to program directory. fmp12 is a database directory. Full access is mandatory.
You don't have to give people write access to the .exe file!

I assume this database can handle multiple users at the same time or you just don't care about multiple users/User Switching or Terminal Server/Remote Desktop?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 31st July 2014, 07:21   #6
krischeu
Junior Member
 
Join Date: Mar 2013
Posts: 13
Well, I read everything you wrote. Did you do the same?
Ok, it is my fault to create 2 problems into one discussion.

PC1: problem with Access modul
PC2: compiler problem

PC1: Win8.1 / NSIS version 3.0b
PC2: Win7 / NSIS 2.64

Problem with Access modul
InstallPath (where I found pieces of the software):
C:\Program Files (x86)\NSIS\Contrib\AccessControl
C:\Program Files (x86)\NSIS\Docs\AccessControl
--> quite uncommon
C:\Program Files (x86)\NSIS\Plugins\Plugins\

Hope this could help.
Compiler errors will be delivered little bit later.
krischeu is offline   Reply With Quote
Old 31st July 2014, 07:53   #7
krischeu
Junior Member
 
Join Date: Mar 2013
Posts: 13
Compiler error #12345: error mmapping file (0, 10180164) is out of range.
krischeu is offline   Reply With Quote
Old 31st July 2014, 09:44   #8
krischeu
Junior Member
 
Join Date: Mar 2013
Posts: 13
Something new!

I installed version 3.0b and the access modul on another laptop. Compiling - same error, says access modul not availiable/not found ....

OK. I deinstalled Version 3.0b and install the 2.64 and also the access modul.
--> It works! Access modul is running.

So in my mind, there is something wrong with version 3.0b and the access modul.
krischeu is offline   Reply With Quote
Old 31st July 2014, 11:19   #9
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,539
Let me quote myself from my first post:

Quote:
Originally Posted by Anders View Post
... my only guess is that you did not extract the .dll to the correct plugin subfolder in v3.0.
If you go into NSIS\Plugins you should see \Plugins\x86-ansi where all the ANSI target .dll's should be. ( See also: http://nsis.sourceforge.net/How_can_..._installations )

As far as the mmapping error goes, are your files several gigabytes in size?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 1st August 2014, 08:34   #10
krischeu
Junior Member
 
Join Date: Mar 2013
Posts: 13
Well,
the hint with 2 installations and a plugin directory for both version sounds like a goog idea for me. I will give this a try.
krischeu is offline   Reply With Quote
Old 1st August 2014, 09:43   #11
krischeu
Junior Member
 
Join Date: Mar 2013
Posts: 13
Hi,
my Installation of nsis 2.4.6 and nsis 3.0b are done.
I installed it to:
C:\prog..(x86)\nsis246\
C:\prog..(x86)\nsis30b\

and I created a Folder for the 3rd Party addons
C:\Program Files (x86)\NSISPlugins\
here I copied the extracted Folder from Access modules into it
C:\Program Files (x86)\NSISPlugins\AccessControl
It has now the subfolder: contrib, Docs,Plugins, and Unicode

Now I want to do some changes in the file
C:\Program Files (x86)\NSIS246\nsisconf.nsh

It is described at: http://nsis.sourceforge.net/How_can_..._installations

But I do not understand, which path do I have to change, that my installation will find the plugins ....

Which is the path to: %AppData% ?

I copied the following stuff into
C:\Program Files (x86)\NSIS246\nsisconf.nsh

; %AppData%\nsisconf.nsh example
!ifdef NSIS_WIN32_MAKENSIS
!define NSISCONF_3 ";" ; NSIS 2 tries to parse some preprocessor instructions inside "!if 0" blocks!
!addincludedir "$%AppData%\NSIS\Include"
!if ${NSIS_PACKEDVERSION} > 0x02ffffff ; NSIS 3+:
!define /redef NSISCONF_3 ""
${NSISCONF_3}!addplugindir /x86-ansi "$%AppData%\NSIS\Plugins-i386-ansi"
${NSISCONF_3}!addplugindir /x86-unicode "$%AppData%\NSIS\Plugins-i386-unicode"
!else ; NSIS 2:
!addplugindir "$%AppData%\NSIS\Plugins-i386-ansi"
!endif ;~ NSIS_PACKEDVERSION
!undef NSISCONF_3
!endif ;~ NSIS_WIN32_MAKENSIS
krischeu is offline   Reply With Quote
Old 1st August 2014, 11:15   #12
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,539
The point of saving it as %AppData%\nsisconf.nsh is that you don't have to modify the NSIS installs. If you want to put the plugins somewhere else then you have to modify the !add* lines...


Quote:
Originally Posted by krischeu View Post
Which is the path to: %AppData% ?
Why do you have to ask? There are so many ways you can figure this out on your own:
  • Put %AppData% in the Explorer address bar and hit enter.
  • Put !error "$%AppData%" in a .nsi.
  • Read about AppData and other constants in the NSIS help file.
  • The internet

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump