Jump to content

4.19 no longer working in Batch file


Lazarus98

Recommended Posts

I use a batch file to install remotely.

 

CC-1.bat:

psexec @COMP.txt -c -d -f -s CC-2.bat
pause

 

CC-2.bat:

\\server\INSTALLS\CCleaner\ccsetup.exe /S
DEL "%SystemDrive%\Users\Public\Desktop\CCleaner.lnk"
DEL "C:\Documents and Settings\All Users\Desktop\CCleaner.lnk" /F /Q
RMDIR /S /Q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\CCleaner"
RMDIR /S /Q "C:\Documents and Settings\All Users\Start Menu\Programs\CCleaner"
COPY /y "\\server\INSTALLS\CC\ccleaner.ini" "C:\Program Files\CCleaner"

 

This used to work fine last install was 4.18, but 4.19 will no longer work this way. Any ideas or fixes

Link to comment
Share on other sites

So after reworking the batch files a tad, I have a work around, but it doesn't make a lot of sense as to why the issue is there to begin with, but what I did was break up the batch as below:

 

CC-1.bat:

psexec @COMP.txt -c -d -f -s \\server\INSTALLS\CCleaner\ccsetup.exe /S

psexec @COMP.txt -c -d -f -s CC-2.bat
pause

 

CC-2.bat:

DEL "%SystemDrive%\Users\Public\Desktop\CCleaner.lnk"
DEL "C:\Documents and Settings\All Users\Desktop\CCleaner.lnk" /F /Q
RMDIR /S /Q "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu\Programs\CCleaner"
RMDIR /S /Q "C:\Documents and Settings\All Users\Start Menu\Programs\CCleaner"
COPY /y "\\server\INSTALLS\CC\ccleaner.ini" "C:\Program Files\CCleaner"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.