Verwijderen van alle ports:
devcon.exe remove =ports
Microsoft Support - The DevCon command-line utility functions as an alternative to Device Manager
Microsoft TechNet - Devcon Examples
format.com heeft naast de gebruikelijke schakelopties ook nog een verborgen optie /y.
Dit is vooral handig als je een schijf wil formatteren vanuit een script:
format.com d: /fs:ntfs /q /y
C:\>inuse /?
INUSE replacement destination [/Y]
Description:
This tool replaces a file which is in use by the operating system
upon reboot.
Parameter List:
replacement Specifies the new file (including fully qualified path).
destination Specifies the file to be replaced (including fully
qualified path).
/Y Suppresses the confirmation prompt.
/? Displays this help message.
Examples:
INUSE /?
INUSE C:\FOO.DLL C:\WINDOWS\SYSTEM32\FOO.DLL
INUSE C:\ODBCTRAC.DLL C:\WINDOWS\SYSTEM32\ODBCTRAC.DLL /Y
INUSE \\SERVER1\TEMP\CABINET.DLL C:\CABINET.DLL /Y
Bron:Microsoft Support - How to replace currently locked files with Inuse.exe
Een gebruiker toevoegen aan de Administrators groep op de lokale machine:
net localgroup Administrators username /ADD
Een gebruiker verwijderen uit de Administrators groep op de lokale machine:
net localgroup Administrators bon /DELETE
ODBC zaken regelen vanaf de commandline.
Aanmaken system DSN:
"%systemroot%\system32\odbcconf.exe" /a {CONFIGSYSDSN "SQL Native Client" "DSN=prod|Description=prod|SERVER=localhost|Trusted_Connection=no|Database=prod"}
Met het volgende commando kan een cmd.exe gestart worden als SYSTEM:
at 16:30 /interactive cmd.exe
Vergeet niet om daarna de job weer te verwijderen met:
at 1 /delete
Waarbij 1 staat voor het job nummer.
Een andere optie is om een service aan te maken met sc.exe en deze te starten:
sc create testsvc binpath= "cmd /K start" type= own type= interact sc start testsvc
Weer verwijderen kan zo:
sc delete testsvc
Bron:Running CMD.EXE as Local System
Zie ook:The Realm of the Verbal Processor - Running a CMD prompt as System (XP and Vista)
Get a list of all non-inherited NTFS rights on a directory with subdirectories:
icacls C:\Directory /T /C|find /v "(I)(" > Report.txt
| Commando | Resultaat/Applicatie |
|---|---|
| access.cpl | Accessibility Controls |
| hdwwiz.cpl | Add Hardware Wizard |
| appwiz.cpl | Add/Remove Programs |
| control admintools | Administrative Tools |
| wuaucpl.cpl | Automatic Updates |
| fsquirt | Bluetooth Transfer Wizard |
| calc | Calculator |
| certmgr.msc | Certificate Manager |
| charmap | Character Map |
| chkdsk | Check Disk Utility |
| clipbrd | Clipboard Viewer |
| cmd | Command Prompt |
| dcomcnfg | Component Services |
| compmgmt.msc | Computer Management |
| timedate.cpl | Date and Time Properties |
| ddeshare | DDE Shares |
| devmgmt.msc | Device Manager |
| directx.cpl | Direct X Control Panel (If Installed) |
| dxdiag | Direct X Troubleshooter |
| cleanmgr | Disk Cleanup Utility |
| dfrg.msc | Disk Defragment |
| diskmgmt.msc | Disk Management |
| diskpart | Disk Partition Manager |
| control desktop | Display Properties |
| desk.cpl | Display Properties |
| control color | Display Properties (w/Appearance Tab Preselected) |
| drwtsn32 | Dr. Watson System Troubleshooting Utility |
| verifier | Driver Verifier Utility |
| eventvwr.msc | Event Viewer |
| sigverif | File Signature Verification Tool |
| findfast.cpl | Findfast |
| control folders | Folders Properties |
| control fonts | Fonts |
| fonts | Fonts Folder |
| freecell | Free Cell Card Game |
| joy.cpl | Game Controllers |
| gpedit.msc | Group Policy Editor (XP Prof) |
| mshearts | Hearts Card Game |
| iexpress | Iexpress Wizard |
| ciadv.msc | Indexing Service |
| inetcpl.cpl | Internet Properties |
| ipconfig /all | IP Configuration (Display Connection Configuration) |
| ipconfig /displaydns | IP Configuration (Display DNS Cache Contents) |
| ipconfig /flushdns | IP Configuration (Delete DNS Cache Contents) |
| ipconfig /release | IP Configuration (Release All Connections) |
| ipconfig /renew | IP Configuration (Renew All Connections) |
| ipconfig /registerdns | IP Configuration (Refreshes DHCP & Re-Registers DNS) |
| ipconfig /showclassid | IP Configuration (Display DHCP Class ID) |
| ipconfig /setclassid | IP Configuration (Modifies DHCP Class ID) |
| jpicpl32.cpl | Java Control Panel (If Installed) |
| javaws | Java Control Panel (If Installed) |
| control keyboard | Keyboard Properties |
| secpol.msc | Local Security Settings |
| lusrmgr.msc | Local Users and Groups |
| logoff | Logs You Out Of Windows |
| winchat | Microsoft Chat |
| winmine | Minesweeper Game |
| control mouse | Mouse Properties |
| main.cpl | Mouse Properties |
| control netconnections | Network Connections |
| ncpa.cpl | Network Connections |
| netsetup.cpl | Network Setup Wizard |
| notepad | Notepad |
| nvtuicpl.cpl | Nview Desktop Manager (If Installed) |
| packager | Object Packager |
| odbccp32.cpl | ODBC Data Source Administrator |
| osk | On Screen Keyboard |
| ac3filter.cpl | Opens AC3 Filter (If Installed) |
| password.cpl | Password Properties |
| perfmon.msc | Performance Monitor |
| perfmon | Performance Monitor |
| telephon.cpl | Phone and Modem Options |
| powercfg.cpl | Power Configuration |
| control printers | Printers and Faxes |
| printers | Printers Folder |
| eudcedit | Private Character Editor |
| QuickTime.cpl | Quicktime (If Installed) |
| intl.cpl | Regional Settings |
| regedit | Registry Editor |
| regedit32 | Registry Editor |
| mstsc | Remote Desktop |
| ntmsmgr.msc | Removable Storage |
| ntmsoprq.msc | Removable Storage Operator Requests |
| rsop.msc | Resultant Set of Policy (XP Prof) |
| sticpl.cpl | Scanners and Cameras |
| control schedtasks | Scheduled Tasks |
| wscui.cpl | Security Center |
| services.msc | Services |
| fsmgmt.msc | Shared Folders |
| shutdown | Shuts Down Windows |
| mmsys.cpl | Sounds and Audio |
| spider | Spider Solitare Card Game |
| cliconfg | SQL Client Configuration |
| sysedit | System Configuration Editor |
| msconfig | System Configuration Utility |
| sfc /scannow | System File Checker Utility (Scan Immediately) |
| sfc /scanonce | System File Checker Utility (Scan Once At Next Boot) |
| sfc /scanboot | System File Checker Utility (Scan On Every Boot) |
| sfc /revert | System File Checker Utility (Return to Default Setting) |
| sfc /purgecache | System File Checker Utility (Purge File Cache) |
| sfc /cachesize=x | System File Checker Utility (Set Cache Size to size x) |
| sysdm.cpl | System Properties |
| taskmgr | Task Manager |
| telnet | Telnet Client |
| nusrmgr.cpl | User Account Management |
| utilman | Utility Manager |
| firewall.cpl | Windows Firewall |
| magnify | Windows Magnifier |
| wmimgmt.msc | Windows Management Infrastructure |
| syskey | Windows System Security Tool |
| wupdmgr | Windows Update Launches |
| tourstart | Windows XP Tour Wizard |
| write | Wordpad |
Bron: WINDOWS RUN COMMANDS via Altiris Juice: Windows RUN Commands.