I took a look at the Windows batch file and it contained lines like:
copy xxx.dll "%WINDIR%\System32"
regsvr32 xxx.dll
When I launched the script, it complained about access denied, so I right-clicked the script and ran it as administrator. But running as administrator, it complained it cannot find the xxx.dll.
That's when I noticed the execution directory became c:\windows\system32 when I executed the script as administrator, even thought the script was located in another drive letter and path.
The solution was to update the batch file as follows:
copy <path>\xxx.dll "%WINDIR%\System32"
regsvr32 xxx.dll
and then run it as administrator.
No comments:
Post a Comment