Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 723 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I automate the process of customizing the command prompt?

#1
I spend most of my time on command line ( XP / 7 ) and always find myself customizing the command prompt according to my preferences. This applies to both cmd and powershell prompt.

Width: 140
Height: 40
Left: -4
Top: 20
Font: Lucida Console
Font Size: 16
Text Color: RGB(100,150,200)
QuickEdit Mode: Enabled

Whenever I am on a new server, I would need to do this all over again. How can I automate this process by putting these parameters in a batch file or PowerShell script?

Reply

#2
You can use the Registry provider in PowerShell along with the `*-Item` and `*-ItemProperty` cmdlets to modify the registry values under this registry key: `HKEY_CURRENT_USER\Console`.
Reply

#3
You can look into making calls to update the Windows registry.
For example,

REG.EXE add HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f

will set QuickEdit as the default mode for your command prompt.
It's easy to slap this line into a batch file, along with other settings.

- `add Keyname` will chose the Key name where to add the value, here HKEY_CURRENT_USER\Console
- `/v` is followed by the name of the value to add
- `/t` followed by its type
- `/d` is followed by the data with which to set the name of the value
- `/f` to force write in the registry without prompt

Likewise, you can modify `WindowSize` which contains 0xhhhhwwww where the first four bytes is the value of the height in hexa (e.g. 0x003E for a height of 62 pixels) and www is the window's width. For your case:

REG.EXE add HKCU\Console /v WindowSize /t REG_DWORD /d 0x0028008c /f

Type `REG /?` and `REG add /?` for more options.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through