Advertisement

09.07.2008 at 11:45PM PDT, ID: 23711234
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

Create registry entry

Asked by LrdKanien in Perl Programming Language, Programming Languages

Tags:

I repaired a miva installation that removed about 300 entries in the registry that I need to recreate.  They are in the COMPUTERNAME\HKLM\SOFTWARE\MIVA\miva empresa nt\configuration\1\root\.  

They were originally created with the code I attached.  I have a directory with a dat file and each dat file is named after the username that can be used for the $sNewUserName variable needed in the script below.  

I'd appreciate any help.  Something like this..

1.  Read directory d:\inetpub\userconf\
2.  for each *.dat capture the name and run the script blow passing the name as the $sNewUserName.

otherwise I'm gonna have to fix these by hand ;x  Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
sub create_MIVA_REG($) {
	my ($sNewUserName) = @_;
	
	print "Creating new key...\n";
	my $MivaReg = $Registry->{"//$ENV{COMPUTERNAME}/HKEY_LOCAL_MACHINE/Software/Miva/Miva Empresa NT/Configuration/1/Root"}|| die "Error opening key!";
	$MivaReg->{"$sNewUserName"} = {} || die "Couldn't create new key!";
	
	print "Creating MivaData and Script Directory info... \n";
	$MivaReg->{"$sNewUserName/datadir"} = "".myconstants::homedrv."\\inetpub\\virtual\\$sNewUserName\\MivaData" || die "Error adding data value!";
	$MivaReg->{"$sNewUserName/mivaroot"} = "".myconstants::homedrv."\\inetpub\\virtual\\$sNewUserName\\MivaScript" || die "Error adding script value!";
	
}
[+][-]09.08.2008 at 04:37AM PDT, ID: 22416248

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Perl Programming Language, Programming Languages
Tags: Perl
Sign Up Now!
Solution Provided By: suhasbharadwaj
Participating Experts: 2
Solution Grade: B
 
 
[+][-]09.08.2008 at 09:37AM PDT, ID: 22419093

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628