Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: wntAccessAdd Redirection WinXP Win XP x64 64-bit 64
AddExtender("WWWNT34I.DLL") sPath = 'c:\Windows\System32\Test' ; Disable redirect oldvalue = IntControl( 92, "disable", 0, 0, 0 ) ;Delete and recreate directory if DirExist(sPath) then DirRemove(sPath) DirMake(sPath) ;Add permissions wntAccessAdd("", sPath, "Users", 300, "Dir:Change") Pause(sPath,"Successfully applied permissions") ; Remove test directory DirRemove(sPath) Pause(sPath,"Successfully removed test directoy") ; Enable redirect IntControl( 92, "revert", oldvalue, 0, 0 )
Based on our testing it turns out that the file redirection issue is only on Windows XP x64. So you have a couple of options.
;cacls c:\windows\system32\test /t /e /g Users:c sCacls = "c:\windows\system32\cacls.exe" sFolder = "c:\Windows\System32\Test" sParam = "/t /e /g Users:c" ;Users Change ; Disable redirect oldvalue = IntControl( 92, "disable", 0, 0, 0 ) ;Delete and recreate directory if DirExist(sFolder) then DirRemove(sFolder) DirMake(sFolder) ;Add permissions Pause(sFolder,"Before applying permissions") ShellExecute(sCacls, sFolder : " " : sParam, FilePath(sFolder), @NORMAL, "") Pause(sFolder,"Successfully applied permissions") ; Remove test directory DirRemove(sFolder) Pause(sFolder,"Successfully removed test directoy") ; Enable redirect IntControl( 92, "revert", oldvalue, 0, 0 )
linkd c:\windows\Sysnative c:\windows\system32We have tested this and it does work. I don't think the linkd command comes with WinXP x64 but it can be download from MSFT. I think it is part of the Win2k3 resource kit. Or you can use the free Sysinternals download that makes symbolic links Junction v1.05
sPath = 'c:\Windows\Sysnative\Test'Complete example:
AddExtender("WWWNT34I.DLL") sPath = 'c:\Windows\Sysnative\Test' ;Delete and recreate directory if DirExist(sPath) then DirRemove(sPath) DirMake(sPath) ;Add permissions wntAccessAdd("", sPath, "Users", 300, "Dir:Change") Pause(sPath,"Successfully applied permissions") ; Remove test directory DirRemove(sPath) Pause(sPath,"Successfully removed test directoy")Details: http://msdn.microsoft.com/en-us/library/aa384187(VS.85).aspx
Another option is to
Article ID: W17651
Filename: wntAccessAdd Redirection on WinXp x64.txt
File Created: 2009:10:07:08:48:08
Last Updated: 2009:10:07:08:48:08