-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallsccmclient.cmd
32 lines (32 loc) · 1.79 KB
/
installsccmclient.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
:: +:::-----------------------------------------------------------------+
:: Copyright (C) 2017 Anne Gerben van Assen
:: +--------------+-----------------------------------------------------+
:: File: uninstall.cmd
:: +--------------+-----------------------------------------------------+
:: Purpose : remove sccm client and open log
:: +--------------+-----------------------------------------------------+
:: Author: Anne Gerben van Assen
:: +--------------+-----------------------------------------------------+
:: Date: 17-08-2017
:: +--------------+-----------------------------------------------------+
:: Version: 1.0.0
:: +--------------+-----------------------------------------------------+
:: File History:
:: +-------+----------+-------------------------------------------------+
:: Name Date Change
:: +-------+----------+------------------------------------------------+
:: AG 17-08-2017 initial version
:: AG 19-08-2017 fixed some bugs
:: +-------+----------+------------------------------------------------+
:: +--------------------------------------------------------------------+
title install SCCM client
cls
pushd "%~dp0"
echo rename logfile and start uninstall
powershell.exe -Command "Start-Process cmd '/c rename %systemdrive%\Windows\CCMsetup\logs\ccmsetup.log beforeinstall_ccmsetup.log && cd /d %cd% && %systemdrive%\Windows\ccmsetup\ccmsetup.exe SERVER HERE && exit' -Verb RunAs"
echo open logfile
cd..
xcopy %CD:~0,3%\trace32.exe C:\dxc\ /y
C:\dxc\trace32.exe %systemdrive%\Windows\CCMsetup\logs\ccmsetup.log
exit