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!

Run Script Based On RegKey Value

Status
Not open for further replies.

vespin

Technical User
Sep 17, 2001
17
US
First of all I would like to say that I found this script on the 'net and tweaked it for my own use so if it seems a little off it probably is.

Here's what I am trying to do...
I'm making a backup of a folder. My problem is that depending on how someone would install the software the drive letter could be different. As opposed to making a script for every drive letter I want the script to read a registry key and based on the value contained in that registry key it will backup files from that drive letter.

The reg key is: HKEY_LOCAL_MACHINE\SOFTWARE\Orrtax\2002\IntelliTax\Installver (the value of that key will be a drive letter such as c:)

Here's the beginning of the code:
'========================================================
BackupPath = "C:\IntelliTaxBackup"

If Wscript.Arguments.Count = 0 Then

Quantity = 2
redim MyData(Quantity)

MyData(1) = "C:\IntelliTax\2002"
MyData(2) = "C:\progra~1\Intellitax\2002\Intellitax.exe"
'=========================================================

I would like to change the drive letters on the files above. If you need more info please let me know. I would very much appreciate any help.
 
Nevermind. I solved it on my own. Thanks!
 
How did you resolve this? I would like to see what you did for future reference. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top