Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ It is notably used on the Microsoft Surface line of products, as well as many ot
Each command does only one thing, and there is no GUI interface. To use:
1. Download and unzip. Does not have an installer
2. Select file
2. Right-click, Select: "Run as Administrator"
3. Enter administrator password if prompted
4. Reboot

:warning: **MUST RUN AS ADMINISTRATOR** :warning:
3. If you're running `get-status.bat` you don't have to run as admin, otherwise:
4. Right-click, Select: "Run as Administrator"
5. Enter administrator password if prompted
6. Reboot

To check the status of DPST:
* `get-status.bat`

:warning: **MUST RUN AS ADMINISTRATOR** :warning:

To disable DPST:
* `disable-dpst.bat`

Expand Down
14 changes: 7 additions & 7 deletions dpst-control.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ If( $Debug ) {
$DebugPreference = "Continue" # Enable debug output
}

# This script must run as admin
If( !(RunningAsAdmin) ) {
Write-Error "Must run as Administrator!"
Exit 255
}

# Search registry for FTC entry
$ftcPath = LocateFTC -regPath ${regBase}
If( $ftcPath -eq $false ) {
Expand Down Expand Up @@ -184,11 +178,17 @@ Else {
Exit 1
}
Else {
Write-Output "DPST is disabled"
Write-Output "DPST is disabled"
Exit 0
}
}

# This script must run as admin if the value is going to be overwritten
If( !(RunningAsAdmin) ) {
Write-Error "Must run as Administrator!"
Exit 255
}


# Write new value to registry and report results
If( $ftcNew ) {
Expand Down