Sign in to follow this  
Followers 0
hoppy

Regwrite Problem

6 posts in this topic

#1 ·  Posted (edited)

I want to be able to set some options to diffrent pc's in my club.

But the trouble is that some regkey's are in a section that have a windows user id

(example {041CD0D6-AD48-4EB5-9796-4750E56689C1} ) which is different on every pc

any way to work around that or am I missing the obvious?

Thanks for your intrest

Edited by hoppy

Share this post


Link to post
Share on other sites



I want to be able to set some options to diffrent pc's in my club.

But the trouble is that some regkey's are in a section that have a windows user it

(example {041CD0D6-AD48-4EB5-9796-4750E56689C1} ) which is different on every pc

any way to work around that or am I missing the obvious?

Thanks for your intrest

Hi,

there should be no problem. Take the path to the folder of your exapmle. Read the folder with the strange numbers in an array and then search the array for the key to change.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks for your very quick reply, but am sorry to say this is a bit over my head for the moment. Wrote some very simple things till now.

HKEY_USERS\S-1-5-21-57989841-73586283-725345543-1003\Identities\{041CD0D6-AD48-4EB5-9796-4750E56689C1}\Software\Microsoft\Outlook Express\5.0\Mail\Safe Attachments: 0x00000000

Is a key I would like to be able to change (with others which already work) with my little tool.

Any hints on which way to do the stuff you say? to get me started.

I'm realy a newby, sorry.

Edited by hoppy

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

scrap made few days ago NOT tested ... I have more samples in *.vbs

EDIT:

I have NOT this value >> Safe Attachments in my

HKEY_CURRENT_USER\Identities\{GUID}\Software\Microsoft\Outlook Express\5.0\Mail

Version >> Outlook Express 5.5sp2

Attached file is in vbs NOT finished still in work

$var = RegRead("HKEY_CURRENT_USER\Identities\", "Last User ID")
$var0 = "HKEY_CURRENT_USER\Identities\"
$var1 = "Software\Microsoft\Outlook Express\5.0\"

MsgBox(4096, "Last ID", $var0 & $var & $var1)

;$var2 = RegRead( $var0 & $var & $var1", "Store Root")

;MsgBox(4096, "Store root", $var2)

;$var4 = RegRead("$var0 & $var & $var1 &", "Store Root")

$var4 = RegRead("""$var0 & $var & $var1""","Store Root")
MsgBox(4096, "Store root", $var4)

Edit :

added regstudio

$temp1 = @TempDir & "\tmp.tmp"
$file = FileOpen($temp1, 2)
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf
$00="HKEY_CURRENT_USER\Identities\ >>>   Default User ID"
FileWrite($file,$00 &@CRLF)
FileWrite($file,"///////////////////////////////////////////////////"& _ 
"////////////////////////////////////" &@CRLF)

For $i = 1 to 100
;$var = RegEnumVal("HKEY_CURRENT_USER\Control Panel\Desktop", $i)
;$var2 = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop",$var)

$var0 = RegRead("HKEY_CURRENT_USER\Identities\", "Default User ID")
$var = RegEnumVal("HKEY_CURRENT_USER\Identities\"&$var0 &"\Software\Microsoft\Outlook Express\5.0",$i)
$var2 = RegRead("HKEY_CURRENT_USER\Identities\"&$var0&"\Software\Microsoft\Outlook Express\5.0",$Var)


if @error <> 0 Then ExitLoop

FileWrite($file, $Var & "  " & $var2 & @CRLF)

next

FileClose($file)


$var = RegRead("HKEY_CURRENT_USER\Identities\", "Default User ID")
  MsgBox(262144, "", $var)
;RegWrite("HKEY_CURRENT_USER\Identities\" & $var & "\Software\Microsoft\Outlook Express\5.0\mail","Safe Attachments","REG_DWORD", "0")
$var2 =RegRead("HKEY_CURRENT_USER\Identities\" & $var & "\Software\Microsoft\Outlook Express\5.0\Mail\","Font Name")

MsgBox(262144, "", $var2)
$var3 =RegRead("HKEY_CURRENT_USER\Identities\" & $var & "\Software\Microsoft\Outlook Express\5.0\Mail\","Default_CodePage")

MsgBox(262144, "", $var3)
Run(@WindowsDir & "\notepad.exe " & @TempDir & "\tmp.tmp")

OE.zip

Reg_sample.au3

Edited by Lapo

Share this post


Link to post
Share on other sites

Thanks for your help guys,

I think a found an easy way to do this, but it still doesn't work and I don't see why.

$var = RegRead("HKEY_CURRENT_USER\Identities\", "Default User ID")
RegWrite("KEY_CURRENT_USER\Identities\" & $var & "\Software\Microsoft\Outlook Express\5.0\mail","Safe Attachments","REG_DWORD", "0")

any idea what wrong?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Don't bother found it.

There was an H missing in front of the key

how stupid of me.

Thanks for helping me out and showing me the way

Edited by hoppy

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
Sign in to follow this  
Followers 0