Here's a simple README file for random_hostname.bat script:
# Set Hostname Script
This script generates a random hostname in the format `LAPTOP/DESKTOP-XXXXXXX` and sets it as the new hostname for the system.
The hostname is composed of a fixed prefix `LAPTOP/DESKTOP-` followed by seven random characters (uppercase letters and digits).
## Usage
1. Download the `random_hostname.bat` file.
2. Open a PowerShell or Terminal with administrative privileges.
3. Navigate to the directory where `random_hostname.bat` is located.
4. Execute the script by typing:
.\generate_hostname.bat
5. The script will generate a new random hostname and set it for the system. It will also display the new hostname in the command prompt.
## Script Details
The script consists of the following parts:
- Generates a random hostname in the format `LAPTOP/DESKTOP-XXXXXXX`.
- Uses the `wmic` command to set the new hostname.
- The charset used for random generation includes uppercase letters (A-Z) and digits (0-9).
## Note
- The script needs to be run with administrative privileges to change the hostname.
- Ensure to save your work and close all applications before running the script, as changing the hostname might require a restart.
## Example Output
LAPTOP-A1B2C3D
Hostname changed to: LAPTOP-A1B2C3D
## References
- [Microsoft Documentation on Hostnames](https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc749460(v=ws.10))
- [cbp44/random_windows_hostname.md](https://gist.github.com/cbp44/4a3dcea41691c9747e0a6c7e5c1db27c)
---Here's a simple README file for `serial_hostname.bat` script:
# Change Hostname Script
This repository contains a batch script that changes the hostname of your computer to its serial number.
## Requirements
- Windows operating system
- Administrative privileges
## Usage
1. Download the script.
2. Right-click the script and select "Run as administrator."
3. Follow the on-screen prompts to complete the process.
## Script Details
The script performs the following actions:
1. Checks for elevated permissions (administrative privileges).
2. Retrieves the system's serial number using `wmic bios get serialnumber`.
3. Sets the hostname to the retrieved serial number.
4. Asks the user whether they want to restart the computer immediately or later.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.