Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Script:
new_file_path="o:\rpc.w2k\" new_file="ole32.dln" Ziel="ole32.dll" Gosub Tausch new_file_path="o:\rpc.w2k\" new_file="rpcrt4.dln" Ziel="rpcrt4.dll" Gosub Tausch new_file_path="o:\rpc.w2k\" new_file="rpcss.dln" Ziel="rpcss.dll" Gosub Tausch exit :Tausch new_file_path=StrCat(new_file_path,new_file) SystemDir=DirWindows (1) old_file=StrCat(SystemDir,Ziel) tmp_new_file=StrCat(SystemDir,new_file) Newer=FileCompare(new_file_path,old_file) if newer==2 FileCopy(new_file_path,tmp_new_file, @False) FileAttrSet(old_file,"r") ret=IntControl(30,tmp_new_file,old_file,0,0) ;Message ("Returncode für IntControl",ret) endif return
There has to exist a Registry entry:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager] "AllowProtectedRenames"=dword:00000001So adding the following code to my script solved the problem:
RegSetDword(@REGMACHINE, "SYSTEM\CurrentControlSet\Control\Session Manager[AllowProtectedRenames]", 1)Hope this also is helpfull for other users.
Article ID: W15952
File Created: 2004:03:30:15:42:00
Last Updated: 2004:03:30:15:42:00