Archive: Problem to copy a file to $sysdir\drivers on windows 7


Problem to copy a file to $sysdir\drivers on windows 7
Hi and hello :)

I´m trying to write my first installer with NSIS :)

Now i have the problem, to copy an *.sys file into $sysdir\drivers

The installer works without errors, but he dont copy the file.sys into $sysdir\drivers

i try it with AccessControl but no positive result :(


Section -InstallDriver
AccessControl::GrantOnFile \
"$SYSDIR\drivers" "(BU)" "GenericRead + GenericExecute + GenericWrite + Delete"
SetOutPath "$SYSDIR\drivers"
File "C:\Users\SkullSplitter\Desktop\Razer\Others\Lycosa.sys"
SectionEnd


can anyone give me an working example, what i must do, that the installer write/copy the file.sys into $sysdir\drivers ?

thx in advance

cheers

Skull

We already told you on IRC, if this is x64 you need to use the macros in x64.nsh to turn off file redirection.

That AccessControl::GrantOnFile looks nasty, you should not be changing the security of the drivers folder!

And finally, you need to be administrator to write stuff to $sysdir, see this elevation code: http://nsis.pastebin.com/63tS3AS2#RequireAdmin


Ah,
play a little bit arround and now its working ... i missunderstand the function, but after playing i must say its easy and simple :)

thanks for it

i´m still learning , its my first one :)


Cheers

Skull