Quantcast
Channel: Symantec Connect - Client Management Suite - Discussions
Viewing all articles
Browse latest Browse all 2021

batch script problem

$
0
0
I need a solution

Hi,

I have a self extracting EXE (I have imported it into Software Catalog) created from WinRAR that dumps the below script into %temp%. It is supposed to also copy or move the screensaver out of the EXE and into its respective directory.

@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

I think the part of the script that is broken is related to renaming or copying the file on AMD64 (x64) in c:\windows\system32. When I run this outside of Altiris I right click and choose run as admin.

Help appreciated.


Viewing all articles
Browse latest Browse all 2021

Trending Articles