Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with windows registry

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi guys,

Im sure my buddy Neversleep has mentionned this before.
I want to modify a value in the registry.
I am able to scan it, read it and print it on screen but not able to change one's value.
If any of you can please help me on this one, I will be eternely grateful!!
 
By the way this is in a perl script!! Knowledge is the first step to Greatness!!!
 
you can pick through this...


##############################

#=======================
sub SettingsSave_Click {
#=======================
$Menu->{SettingsSave}->Checked(!$Menu->{SettingsSave}->Checked());
$PmxSaveSettings = $Menu->{SettingsSave}->Checked();
my $key;
$main::HKEY_LOCAL_MACHINE->Open("SOFTWARE\\dada", $key)
or $main::HKEY_LOCAL_MACHINE->Create("SOFTWARE\\dada", $key);
$key->Close() if $key;
undef $key;
$main::HKEY_LOCAL_MACHINE->Open("SOFTWARE\\dada\\PMX", $key)
or $main::HKEY_LOCAL_MACHINE->Create("SOFTWARE\\dada\\PMX", $key);
if($key) {
$key->SetValueEx("SaveSettings", 0, 1, $PmxSaveSettings);
$key->Close();
}
return 1;
}

#========================
sub SettingsReset_Click {
#========================
my $key;
$main::HKEY_LOCAL_MACHINE->Open("SOFTWARE\\dada", $key)
or $main::HKEY_LOCAL_MACHINE->Create("SOFTWARE\\dada", $key);
$key->Close();
undef $key;
$main::HKEY_LOCAL_MACHINE->Open("SOFTWARE\\dada\\PMX", $key)
or $main::HKEY_LOCAL_MACHINE->Create("SOFTWARE\\dada\\PMX", $key);
if($key) {
undef $PmxWindow_left;
undef $PmxWindow_top;
undef $PmxWindow_width;
undef $PmxWindow_height;
undef $PmxViewExDump;
undef $PmxViewScripts;
WriteConfig($key);
$key->Close();
}
$Window->Move($PmxWindow_left, $PmxWindow_top);
$Window->Resize($PmxWindow_width, $PmxWindow_height);
$Menu->{ViewPL}->Checked($PmxViewScripts);
$Menu->{ViewExtendedDump}->Checked($PmxViewExDump);
}


#===================
sub FileExit_Click {
#===================
Window_Terminate();
}
 
I will try it and let you know!!
Knowledge is the first step to Greatness!!!
 
macwill

It looked good but it doesn't work

syntax error
$PmxSaveSettings = $Menu->{SettingsSave}->Checked();

amoung other things!!!! Knowledge is the first step to Greatness!!!
 
That's strange it works on my machine???
Maybe we need third party help here...
sorry
Mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top