I have a script that uses a file of "eudora.ini" I use this file to make a backup copy then get info out of to use for the rest of the script, most of the users have it in a defult location but some do not.
I have this script below that will find the location of the file from the registry then echo it out for now.
Const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv"
)
strKeyPath = "software\Qualcomm\Eudora\
CommandLin
e"
strValueName = "Current"
objRegistry.GetStringValue
HKEY_CURRENT_USER,strKeyPa
th,strValu
eName,dwVa
lue
If IsNull(dwValue) Then
Wscript.Echo "cound not find the file path"
Wscript.Quit
Else
Wscript.Echo dwValue
End If
Currently this will echo out this string it finds.
C:\PROGRA~1\Qualcomm\Eudor
a\Eudora.e
xe D:\DOCUME~1\Mail D:\DOCUME~1\Mail\Eudora.in
i
What I want it to do is get the path from this line which is D:\DOCUME~1\Mail D:\DOCUME~1\Mail\Eudora.in
i then put it into a varible so I can use the varible to tell my script the path to their eudora.ini file
So I need to create a varible from this line:
C:\PROGRA~1\Qualcomm\Eudor
a\Eudora.e
xe D:\DOCUME~1\Mail D:\DOCUME~1\Mail\Eudora.in
i
To pull the part I need from it and have a varible something like this:
Dem stringpath
stringpath = "D:\DOCUME~1\Mail\Eudora.i
ni" --- also I need to have the varible include the double quotes around it
"D:\DOCUME~1\Mail\Eudora.i
ni"
So what I want to do from this code, Is not echo it out but set it to a varible using the path at the end and keep it in double quots
stringpath = "D:\DOCUME~1\Mail\Eudora.i
ni"
Start Free Trial