Hi,
I have a self extracting EXE that dumps the below script into %temp% as well as a screensaver. The script does not appear to be able to handle copying the screensaver to %windir%\system32.
@ECHO ON
Set RegVar=HKLM\Hardware\Description\System\CentralProcessor\0
REG.exe Query %RegVar% 2>NUL | find /I /N "x86">NUL
If [%ERRORLEVEL%] == [0] (
echo X86
cd %windir%\system32
If exist brian.scr ren brian.scr brianold01.scr
GOTO FILEMOVE1
) ELSE (
echo AMD64
cd %windir%\system32
If exist brian.scr ren brian.scr brianold01.scr
cd %windir%\sysWOW64
If exist brian.scr ren brian.scr brianold01.scr
GOTO FILEMOVE2
)
:FILEMOVE1
MOVE /Y %~dp0\brian.scr %windir%\system32\brian.scr
exit
:FILEMOVE2
COPY /Y %~dp0\brian.scr %windir%\system32\brian.scr
MOVE /Y %~dp0\brian.scr %windir%\sysWOW64\brian.scr
exit
Any ideas as to what could be broken?
problem with script files
Moderator: DosItHelp
Re: problem with script files
It doesn't cater for long pathname elements - and will probably need to be run as Admin to copy files into system32.
Re: problem with script files
Tried running it as admin (right clicked the EXE created by WinRAR).
This does appear to work on XP x86 systems (file is copied to system32)
This is not working on W7 x64 systems.
Any other ideas?
This does appear to work on XP x86 systems (file is copied to system32)
This is not working on W7 x64 systems.
Any other ideas?