• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Windows 10 commands/shortcuts/env. var.

Wrong quote, lol.. this is a batch for One Drive:

@Echo off
cls

set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe"
set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe"

echo Closing OneDrive process.
echo.
taskkill /f /im OneDrive.exe > NUL 2>&1
ping 127.0.0.1 -n 5 > NUL 2>&1

echo Uninstalling OneDrive.
echo.
if exist %x64% (
%x64% /uninstall
) else (
%x86% /uninstall
)
ping 127.0.0.1 -n 5 > NUL 2>&1

echo Removing OneDrive leftovers.
echo.
rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1
rd "C:\OneDriveTemp" /Q /S > NUL 2>&1
rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1
rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1

echo Removing OneDrive from the Explorer Side Panel.
echo.
REG DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
REG DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1

------------------------------------------------------------------------------------------------------------------------------


And to remove Skype entirely, after uninstalling it normally, run Powershell with admin rights and type:

Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage

Then type:

dism /online /Get-ProvisionedAppxPackages

Find and copy the SkypeApp.* from the list, then type:

dism /online /Remove-ProvisionedAppxPackage /PackageName:

Paste copied text right after "PackageName:", no spaces

------------------------------------------------------------------------------------------------------------------------------

Warning: Removing packages (such as Skype) can cause sysprep issues, i'm fine with it but you may not be. In my case, this only affects me in my being unable to do Windows Updates, which i never do anyway; instead, i do a clean install every oh so many months. I must also learn how to post like a normal person, 'cause i've done like 10 edits since i first posted this :)
 
Last edited:
I've uninstalled skype and it's gone completely. It won't appear even when I install a new build

Yeah I removed it too but I have seen the process running in task manager from time to time
 
Now if that'd work for OneDrive... :D
I think they have fixed it. I was able to uninstall OneDrive just by right clicking on it and then uninstall. No PowerShell, no CMD or any other kind of hacking.

Clean W10 install, latest ISO downloaded today, all updates applied.
 
I think they have fixed it. I was able to uninstall OneDrive just by right clicking on it and then uninstall. No PowerShell, no CMD or any other kind of hacking

You can now yes, but the above is faster and leaves no registry traces behind. Uninstalling does and unless you're on a custom mode, no reg cleaner out there will delete miscrosoft entries :)
 
this is a batch for One Drive:

Is all that text meant to be copied and then entered into powershell? For one drive I mean.

I used the Skype one and it seems to have worked thank you for that
 
Is all that text meant to be

My apologies, it's just a batch. Save it with notepad/n++, rename -> change extension from .txt. to .bat and double click :)
 
A couple of key combinations I've never heard of

After minimizing all windows with Win+D you can restore them with Win+D or with Win+Shift+M
Win+Ctrl+F Find Computer
Win+Shift+S lets you select and save a rectangular piece of the screen so you can paste it in any image editor
Win + A - Action Center
Win + B - Set focus in the notification area


Win+Shift+S is really awesome. Goodbye print screen
 
How to fix Windows 10 removing the control panel from your Power Menu. Credit to PC World for the directions.

Bring up the "Run" Prompt: Windows key + R. Enter or paste %LOCALAPPDATA%\Microsoft\Windows\WinX\Group2, and hit Enter.
Move the existing Control Panel icon to a separate folder on your desktop, "just in case".
Download the attached shortcut provided from Deskmodder.de
Extract the Control Panel icon and place it in the Winx folder.
Restart your computer, or right-click and restart the Windows Explorer process in Task Manager. (ctrl-shift-esc, scroll down the processes tab, and right click "Windows Explorer", restart. If you don't see the processes tab, click More Details).

Windows key + X or right click the windows icon for the start menu.
Profit.
 

Attachments

Fix Slow-Loading Windows Icons by Increasing the Icon Cache in Windows 10

winver -> regedit -> enter -> alt+d -> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -> enter

Right-click the Explorer folder and select New > String Value. Name the new value Max Cached Icons.

Double click Max Cached Icons to open the Edit String window. In the “Value data” box, enter a new value for the icon cache size. By default, the icon cache size is 500 KB. 4096 (4 MB) or 8192 (8 MB) is sufficient. Click OK when you're done. Reboot.
 
I hate how wuapp is gone for windows update in 10. That is muscle memory for updating PC's at work. Grrr
 
My apologies, it's just a batch. Save it with notepad/n++, rename -> change extension from .txt. to .bat and double click

thank You, it worked great, thanks for your work.
 
'New' command (added to the OP)

wmic diskdrive get model,status - checks the S.M.A.R.T. status of the drives and shows the model.
It returns Pred Fail if your drive is near death and OK if everything's ok.

v2ZhqIc.png
 
wmic product where "name like '%name of software%'" call uninstall
wmic product where "vendor like '%vendor of software%" call uninstall

usefull if you want to uninstall something fast when in a non-admin user. You can put /nointeractive if you don't want to confirm the uninstallation.
NOTE THAT IF THE PC HAS TOO REBOOT, IT WILL REBOOT WITHOUT ASKING

Example ;
wmic product where "vendor like '%Autodesk%'" call uninstall /nointeractive
1528228164827.png


will bulk uninstall all autodesk software.

You can create it as a script to uninstall things remotely too but the AV often block the script unfortunately.

---------------------------

arp -a
will show you the MAC Address of known devices in the same subnet. If you want to know a MAC fast, change IP to fit the subnet, ping the desired computer and type arp -a
 
Last edited:
Just forgot about this fact:

In Microsoft Windows, you can't create folders that have their name from one of these words:

CON, PRN, AUX, NUL, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9.


If you try you'll get this error

asXDBVj.png
 
shell:startup command will open your startup folder in file explorer
shell:appsfolder will open a folder which shows all your installed apps
 
Thanks for this topic, I just got out of a situation thanks to all of this :)
 
New exclusive to Windows 10 2004 DISM commands:

Windows 10 2004 Adds DISM ReservedStorage Commands

Code:
DISM /Online /Set-ReservedStorageState /State:Enabled
DISM /Online /Set-ReservedStorageState /State:Disabled

Sets the state of reserved storage. This command line option is only supported for online Windows images. If reserved storage is in use, it may not be disabled, and the following error is returned: This operation is not supported when reserved storage is in use. Please wait for any servicing operations to complete and then try again later.

Code:
DISM /Online /Get-ReservedStorageState

Gets the current state of reserved storage
 

@W1zzard This needs updated to the above link I think, not 100% sure on that, but I think so.


Wasn't sure where else to post this, sorry! March 27th update.
 

@W1zzard This needs updated to the above link I think, not 100% sure on that, but I think so.


Wasn't sure where else to post this, sorry! March 27th update.
thanks. my package isn't based on the one from majorgeeks.
i build mine using the original microsoft installers, and include a clear-text batch install script, so you can be 100% sure everything is untouched.
microsoft did release a new version of the 2015-2019 runtimes, our download has been updated accordingly
 
trim.png


How to check if TRIM is enabled:

fsutil behavior query DisableDeleteNotify

If it says NTFS & ReFS DisableDeleteNotify = 0 (Disabled) it means TRIM is enabled
(if = 1 then TRIM is disabled), what a counterintuitive crap, whateeeeeeeeeeeeeeeeeva

How to enable TRIM

fsutil behavior set DisableDeleteNotify 0
 
Back
Top