Téléverser les fichiers vers "Panther/InstalCustome"
This commit is contained in:
parent
a087911899
commit
70996ad393
31
Panther/InstalCustome/Layout.xml
Normal file
31
Panther/InstalCustome/Layout.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout">
|
||||
<LayoutOptions StartTileGroupCellWidth="6" />
|
||||
<DefaultLayoutOverride>
|
||||
<StartLayoutCollection>
|
||||
<defaultlayout:StartLayout GroupCellWidth="6" />
|
||||
</StartLayoutCollection>
|
||||
</DefaultLayoutOverride>
|
||||
<CustomTaskbarLayoutCollection>
|
||||
<defaultlayout:TaskbarLayout>
|
||||
<taskbar:TaskbarPinList>
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%AppData%\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Firefox.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Logeproj\Logeproj.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\Word 2013.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\Excel 2013.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\PowerPoint 2013.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\Access 2013.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\QGIS 2.18\QGIS Desktop 2.18.24 with GRASS 7.4.1.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%WinDir%\System32\calc.exe" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Inkscape\Inkscape.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Adobe Acrobat.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\PDFsam Basic\PDFsam Basic.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Picasa 3\Picasa 3.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Notepad++.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\Zoom\Zoom.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%ProgramData%\Microsoft\Windows\Start Menu\Programs\TeamViewer.lnk" />
|
||||
<taskbar:DesktopApp DesktopApplicationLinkPath="%AppData%\Roaming\Microsoft\Windows\Start Menu\Programs\3CX Ltd\3CX Desktop App.lnk" />
|
||||
</taskbar:TaskbarPinList>
|
||||
</defaultlayout:TaskbarLayout>
|
||||
</CustomTaskbarLayoutCollection>
|
||||
</LayoutModificationTemplate>
|
||||
75
Panther/InstalCustome/Set-WindowState.ps1
Normal file
75
Panther/InstalCustome/Set-WindowState.ps1
Normal file
@ -0,0 +1,75 @@
|
||||
function Set-WindowState {
|
||||
<#
|
||||
.LINK
|
||||
https://gist.github.com/Nora-Ballard/11240204
|
||||
#>
|
||||
|
||||
[CmdletBinding(DefaultParameterSetName = 'InputObject')]
|
||||
param(
|
||||
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]
|
||||
[Object[]] $InputObject,
|
||||
|
||||
[Parameter(Position = 1)]
|
||||
[ValidateSet('FORCEMINIMIZE', 'HIDE', 'MAXIMIZE', 'MINIMIZE', 'RESTORE',
|
||||
'SHOW', 'SHOWDEFAULT', 'SHOWMAXIMIZED', 'SHOWMINIMIZED',
|
||||
'SHOWMINNOACTIVE', 'SHOWNA', 'SHOWNOACTIVATE', 'SHOWNORMAL')]
|
||||
[string] $State = 'SHOW',
|
||||
[switch] $SuppressErrors = $false,
|
||||
[switch] $SetForegroundWindow = $false
|
||||
)
|
||||
|
||||
Begin {
|
||||
$WindowStates = @{
|
||||
'FORCEMINIMIZE' = 11
|
||||
'HIDE' = 0
|
||||
'MAXIMIZE' = 3
|
||||
'MINIMIZE' = 6
|
||||
'RESTORE' = 9
|
||||
'SHOW' = 5
|
||||
'SHOWDEFAULT' = 10
|
||||
'SHOWMAXIMIZED' = 3
|
||||
'SHOWMINIMIZED' = 2
|
||||
'SHOWMINNOACTIVE' = 7
|
||||
'SHOWNA' = 8
|
||||
'SHOWNOACTIVATE' = 4
|
||||
'SHOWNORMAL' = 1
|
||||
}
|
||||
|
||||
$Win32ShowWindowAsync = Add-Type -MemberDefinition @'
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern bool SetForegroundWindow(IntPtr hWnd);
|
||||
'@ -Name "Win32ShowWindowAsync" -Namespace Win32Functions -PassThru
|
||||
|
||||
if (!$global:MainWindowHandles) {
|
||||
$global:MainWindowHandles = @{ }
|
||||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
foreach ($process in $InputObject) {
|
||||
$handle = $process.MainWindowHandle
|
||||
|
||||
if ($handle -eq 0 -and $global:MainWindowHandles.ContainsKey($process.Id)) {
|
||||
$handle = $global:MainWindowHandles[$process.Id]
|
||||
}
|
||||
|
||||
if ($handle -eq 0) {
|
||||
if (-not $SuppressErrors) {
|
||||
Write-Error "Main Window handle is '0'"
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
$global:MainWindowHandles[$process.Id] = $handle
|
||||
|
||||
$Win32ShowWindowAsync::ShowWindowAsync($handle, $WindowStates[$State]) | Out-Null
|
||||
if ($SetForegroundWindow) {
|
||||
$Win32ShowWindowAsync::SetForegroundWindow($handle) | Out-Null
|
||||
}
|
||||
|
||||
Write-Verbose ("Set Window State '{1} on '{0}'" -f $MainWindowHandle, $State)
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Panther/InstalCustome/SetupAdmin.ps1
Normal file
81
Panther/InstalCustome/SetupAdmin.ps1
Normal file
@ -0,0 +1,81 @@
|
||||
# Choix Geo #
|
||||
$xmlCode =[xml](Get-Content -Path C:\Windows\Panther\unattend.xml -Force)
|
||||
$Code = $xmlCode.unattend.settings.component.FirstLogonCommands.SynchronousCommand[2].CommandLine
|
||||
if($? -eq $false){$?
|
||||
$Code = '4269'}
|
||||
|
||||
# Install Module #
|
||||
Install-PackageProvider -Name NuGet -Confirm:$false -Force
|
||||
if( $? -eq $false){$?}
|
||||
Install-Module -Name AudioDeviceCmdlets -Confirm:$false -Force
|
||||
if( $? -eq $false){$?}
|
||||
Import-Module C:\Windows\Panther\InstalCustome\Set-WindowState.ps1 -Force
|
||||
if( $? -eq $false){$?}
|
||||
|
||||
# Audio 0% #
|
||||
Set-AudioDevice -PlaybackVolume 0
|
||||
if( $? -eq $false){$?}
|
||||
|
||||
# Stop Edge #
|
||||
ps msedge | Stop-Process -Force
|
||||
if( $? -eq $false){$?}
|
||||
|
||||
# Copy Hosts #
|
||||
Copy-Item C:\Windows\Panther\InstalCustome\hosts -Destination C:\Windows\System32\drivers\etc -Force
|
||||
if( $? -eq $false){$?}
|
||||
|
||||
# Impriment Supprime #
|
||||
Start-Sleep -Seconds 2
|
||||
Remove-Printer -Name "OneNote"
|
||||
Remove-Printer -Name "Microsoft XPS Document Writer"
|
||||
if( $? -eq $false){$?}
|
||||
|
||||
# Impriment Crée 4269#
|
||||
if($code -like '4269'){
|
||||
Start-Sleep -Seconds 2
|
||||
set-ItemProperty -path "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" -name "LegacyDefaultPrinterMode" -Value 1
|
||||
pnputil.exe -i -a '\\xxx.xxx.xxx.xx\Nuage\SI_Systeme d information\[INSTALL_2020]\_POUR_INSTALL_POST_WAPT\IMPRIMANTES\VOURLES\MPC3004ex_ETAGE\64bits_MpC3004ex_PCL 6 Driver_z79276L16\disk1\oemsetup.inf'
|
||||
Add-PrinterDriver -Name "RICOH MP C3004 PCL 6"
|
||||
Add-PrinterPort -Name "xxx.xxx.xxx.xx" -PrinterHostAddress "xxx.xxx.xxx.xx"
|
||||
Add-Printer -DriverName "RICOH MP C3004 PCL 6" -PortName "xxx.xxx.xxx.xx" -Name "RICOH MP C3004 PCL 6 (Vourles Etage)"
|
||||
$MYPRINTER = "RICOH MP C3001 PCL 6 (Vourles Etage)"
|
||||
$PRINTERTMP = (Get-CimInstance -ClassName CIM_Printer | WHERE {$_.Name -eq $MYPRINTER}[0])
|
||||
$PRINTERTMP | Invoke-CimMethod -MethodName SetDefaultPrinter | Out-Null
|
||||
if( $? -eq $false){$?}}
|
||||
|
||||
|
||||
# Play Fox #
|
||||
Start-Process -FilePath "C:\Windows\Panther\InstalCustome\Firefox Installer.exe" "/verysilent"
|
||||
Do{
|
||||
Start-Sleep -Seconds 5
|
||||
$fox = Get-Process -Name 'Firefox Installer'
|
||||
$fox
|
||||
Start-Sleep -Seconds 2
|
||||
}Until($fox.SI -lt 1)
|
||||
$loopnum = 0
|
||||
Do{
|
||||
Start-Process firefox https://www.mozilla.org/fr/firefox/set-as-default/thanks/
|
||||
Start-Sleep -Seconds 4
|
||||
if($loopnum -ge 5){$loopnum = 0
|
||||
break}
|
||||
$loopnum++
|
||||
$ProgIDname = (Get-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice' -Name ProgId).ProgID
|
||||
$ProgIDname
|
||||
}Until($ProgIDname -like "Firefox*")
|
||||
Stop-Process -Name firefox
|
||||
if( $? -eq $false){$?}
|
||||
|
||||
# Alimentation #
|
||||
powercfg /l
|
||||
powercfg /setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
|
||||
powercfg /setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
|
||||
if( $? -eq $false){$?}
|
||||
|
||||
# ShadowStorage #
|
||||
Enable-ComputerRestore -Drive c:
|
||||
vssadmin Resize ShadowStorage /For=C: /On=C: /Maxsize=10%
|
||||
vssadmin list shadowstorage#
|
||||
if( $? -eq $false){$?}
|
||||
|
||||
# Registre Meteo #
|
||||
reg import C:\Windows\Panther\InstalCustome\Feeds.reg
|
||||
17
Panther/InstalCustome/SetupPChosts.bat
Normal file
17
Panther/InstalCustome/SetupPChosts.bat
Normal file
@ -0,0 +1,17 @@
|
||||
@echo off
|
||||
|
||||
powershell Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force
|
||||
|
||||
powershell -ExecutionPolicy Bypass -File "C:\Windows\Panther\InstalCustome\Execute.ps1" "/verysilent"
|
||||
|
||||
powershell -ExecutionPolicy Bypass "Start-process powershell -Verb runAs C:\Windows\Panther\InstalCustome\SetupAdmin.ps1"
|
||||
|
||||
powershell Start-Sleep -Seconds 180
|
||||
|
||||
powershell -ExecutionPolicy Bypass -File "C:\Windows\Panther\InstalCustome\BiosManufacturer.ps1" "/verysilent"
|
||||
|
||||
powershell -ExecutionPolicy Bypass -File "C:\Windows\Panther\InstalCustome\Lecteur.ps1" "/verysilent"
|
||||
|
||||
powershell -ExecutionPolicy Bypass -File "C:\Windows\Panther\InstalCustome\TrueInstallApp.ps1" "/verysilent"
|
||||
|
||||
Pause
|
||||
8
Panther/InstalCustome/SoftwareLicensingService.bat
Normal file
8
Panther/InstalCustome/SoftwareLicensingService.bat
Normal file
@ -0,0 +1,8 @@
|
||||
@echo off
|
||||
echo Copie de la Cle Windows...
|
||||
powershell -ExecutionPolicy Bypass "(Set-Clipboard -Value (Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey)"
|
||||
powershell -ExecutionPolicy Bypass "((Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey)"
|
||||
powershell "Start-Sleep -Seconds 1
|
||||
echo Cle Windows Copier avec Succes
|
||||
powershell "Start-Sleep -Seconds 5"
|
||||
exit
|
||||
Loading…
x
Reference in New Issue
Block a user