gatt

Change registry and add random number

9 posts in this topic

#1 ·  Posted

Hello guys, could someone help me do a script to EDIT a regedit key and add a RANDOM value to it?

-EXAMPLE of a random key with random value-

HKEY_CURRENT_USER\Console   String name: colortable00                type: REG_SZ             value: 233        <- I want change that 233 example value to a random generated number like 983, 237 etc any number

Share this post


Link to post
Share on other sites



#2 ·  Posted

RegWrite("HKCU\Console", "colortable00", "REG_SZ", Random(100, 999, 1))

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

Thankyou bro, ill test it right now, and to add random to just a part of word example the value is: Intel i7700HQ i want random just those numbers "7700"

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

 

RegWrite("HKCU\Console", "colortable00", "REG_SZ", "Intel i" & Random(1000, 9999, 1) & "HQ")

 

Edited by Subz
Changed it from 100-999 to 1000-9999

Share this post


Link to post
Share on other sites

#5 ·  Posted

Could i private you?

Share this post


Link to post
Share on other sites

#6 ·  Posted

Sure

Share this post


Link to post
Share on other sites

#7 ·  Posted

How can i add random just to exaclty numbers like random (6000,7000,8000,9000) not 6000 to 9000 but just those numbers

Share this post


Link to post
Share on other sites

#8 ·  Posted

15 hours ago, gatt said:

How can i add random just to exaclty numbers like random (6000,7000,8000,9000) not 6000 to 9000 but just those numbers

How about this?

Local $randIndex = Random(0,3,1)
Local $numArr[4] = [6000,7000,8000,9000]
RegWrite("HKCU\Console", "colortable00", "REG_SZ", "Intel i" & numArr[randIndex] & "HQ")

 


UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=

Share this post


Link to post
Share on other sites

#9 ·  Posted

15 hours ago, gatt said:

How can i add random just to exaclty numbers like random (6000,7000,8000,9000) not 6000 to 9000 but just those numbers

RegWrite("HKCU\Console", "colortable00", "REG_SZ", "Intel i" & Random(6, 9, 1) & "000HQ")

P.S. Can you explain why you need to do this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now