mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-29 01:11:30 -06:00
Compare commits
6 Commits
49c2abe9d4
...
bba214c6d2
Author | SHA1 | Date | |
---|---|---|---|
|
bba214c6d2 | ||
|
77cb0a14c4 | ||
|
c254a43f77 | ||
|
640d2ca107 | ||
|
0ac7d475e6 | ||
|
89f0978aa6 |
Binary file not shown.
Before Width: | Height: | Size: 339 KiB After Width: | Height: | Size: 122 KiB |
@ -1,29 +0,0 @@
|
||||
# Create WinUtil Shortcut
|
||||
|
||||
Last Updated: 2024-08-07
|
||||
|
||||
|
||||
!!! info
|
||||
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||
|
||||
|
||||
<!-- BEGIN CUSTOM CONTENT -->
|
||||
|
||||
<!-- END CUSTOM CONTENT -->
|
||||
|
||||
<details>
|
||||
<summary>Preview Code</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"Content": "Create WinUtil Shortcut",
|
||||
"category": "Shortcuts",
|
||||
"panel": "2",
|
||||
"Order": "a082_",
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300",
|
||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Shortcuts/Shortcut"
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
@ -807,41 +807,6 @@ function New-FirstRun {
|
||||
Remove-Item -Path "$env:USERPROFILE\Desktop\*.lnk"
|
||||
Remove-Item -Path "$env:HOMEDRIVE\Users\Default\Desktop\*.lnk"
|
||||
|
||||
# ************************************************
|
||||
# Create WinUtil shortcut on the desktop
|
||||
#
|
||||
$desktopPath = "$($env:USERPROFILE)\Desktop"
|
||||
# Specify the target PowerShell command
|
||||
$command = "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'irm https://christitus.com/win | iex'"
|
||||
# Specify the path for the shortcut
|
||||
$shortcutPath = Join-Path $desktopPath 'winutil.lnk'
|
||||
# Create a shell object
|
||||
$shell = New-Object -ComObject WScript.Shell
|
||||
|
||||
# Create a shortcut object
|
||||
$shortcut = $shell.CreateShortcut($shortcutPath)
|
||||
|
||||
if (Test-Path -Path "$env:HOMEDRIVE\Windows\cttlogo.png") {
|
||||
$shortcut.IconLocation = "$env:HOMEDRIVE\Windows\cttlogo.png"
|
||||
}
|
||||
|
||||
# Set properties of the shortcut
|
||||
$shortcut.TargetPath = "powershell.exe"
|
||||
$shortcut.Arguments = "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
|
||||
# Save the shortcut
|
||||
$shortcut.Save()
|
||||
|
||||
# Make the shortcut have 'Run as administrator' property on
|
||||
$bytes = [System.IO.File]::ReadAllBytes($shortcutPath)
|
||||
# Set byte value at position 0x15 in hex, or 21 in decimal, from the value 0x00 to 0x20 in hex
|
||||
$bytes[0x15] = $bytes[0x15] -bor 0x20
|
||||
[System.IO.File]::WriteAllBytes($shortcutPath, $bytes)
|
||||
|
||||
Write-Host "Shortcut created at: $shortcutPath"
|
||||
#
|
||||
# Done create WinUtil shortcut on the desktop
|
||||
# ************************************************
|
||||
|
||||
try
|
||||
{
|
||||
if ((Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -like "Recall" }).Count -gt 0)
|
||||
|
@ -42,4 +42,24 @@ function Invoke-WPFUpdatesdefault {
|
||||
Write-Host "==================================================="
|
||||
Write-Host "--- Windows Update Settings Reset to Default ---"
|
||||
Write-Host "==================================================="
|
||||
|
||||
Start-Process -FilePath "secedit" -ArgumentList "/configure /cfg $env:windir\inf\defltbase.inf /db defltbase.sdb /verbose" -Wait
|
||||
Start-Process -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicyUsers" -Wait
|
||||
Start-Process -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicy" -Wait
|
||||
Start-Process -FilePath "gpupdate" -ArgumentList "/force" -Wait
|
||||
Remove-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKCU:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKCU:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Host "==================================================="
|
||||
Write-Host "--- Windows Local Policies Reset to Default ---"
|
||||
Write-Host "==================================================="
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
{{ super() }}
|
||||
<div style="color: red; text-align: center; padding: 10px; font-size: 20px;">
|
||||
<strong>Announcement:</strong> We are currently not adding any applications to WinUtil and any apps that will be added through a PR will be declined by the maintainer.
|
||||
<strong>Announcement:</strong> We are currently reworking the docs to use Hugo rather then mkdocs.
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user