Old 31st October 2008, 15:58   #1
Fredmontreal
Junior Member
 
Join Date: Oct 2008
Location: Quebec
Posts: 2
Delete a .sys file from system32\drivers\ on VISTA64

Hi,

In my installer, I try to delete an old driver (ex: test.sys) already installed in C:\Windows\System32\drivers\test.sys of a Windows VISTA BUSINESS (64 bits). In my script, I do


RequestExecutionLevel admin
...
Delete "$WINDIR\System32\drivers\test.sys"
...

It's working on Windows XP64 (file deleted) but the file is still there on VISTA64.

The problem seems to come from permissions. Any clue on how to remove this file on VISTA64?

Thanks in advance!
Fredmontreal is offline   Reply With Quote
Old 31st October 2008, 16:58   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
probably FS redirection, try the macros in x64.nsh

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 31st October 2008, 18:42   #3
Fredmontreal
Junior Member
 
Join Date: Oct 2008
Location: Quebec
Posts: 2
Thanks Anders! Works like a charm ;-) !

Here is my updated code(I used Modern UI 2 + NSIS 2.40):

RequestExecutionLevel admin
!include "x64.nsh"
...
!insertmacro DisableX64FSRedirection
Delete "$WINDIR\System32\drivers\test.sys"
!insertmacro EnableX64FSRedirection
...
Fredmontreal 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