Thanks Glenn.
I need to see if "$bbhomeext" is part of the string in "$bbexternals" and skip the writevalue section if it does.
Code:
$bbhome=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\16FD58773EE02F44F9082F014DAF6CC9", "6BB86DA5D449506409F1448FC6560289")
If @error <> 0
? "Error Encountered: " + @serror
MessageBox("Can't find Big Brother install path!", $bbhome, 16)
Exit 0
Else
$bbexternals = ReadValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Quest Software\BigBrother\bbnt\Externals","")
If @error = 0
$bbfolder=$bbhome + "ext"
$bbhomeext=";" + $bbfolder + "\" + "compaqhw.exe /INT=300"
$bbhomeext1=$bbfolder + "\" + "compaqhw.exe /INT=300"
If Not Exist($bbfolder)
MD $bbfolder
EndIf
If $bbexternals
$bbexternals=$bbexternals + $bbhomeext
Else
$bbexternals=$bbhomeext1
EndIf
$ = WriteValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Quest Software\BigBrother\bbnt\Externals","",$bbexternals,"REG_SZ")
I know I'm missing "endifs", but this is just a snippet.
_________________________
I could have made a neat retort but didn't, for I was flurried and didn't think of it till I was downstairs.
-Mark Twain