Assuming that each line starts with 'set ' then this script should work just fine for you. Just try running this and see what you get (obviously change the file)
Code:
$ = open(1,"c:\blah.txt")
$curLine = substr(readline(1),5)
while @error = 0
$firstEqualPos = instr($curLine, '=')
$varName = substr($curLine,1,$firstEqualPos-1)
$val = '"' + substr($curLine,$firstEqualPos+1) + '"'
$ = execute("$$" + $varName + "=" + $val)
$curLine = substr(readline(1),5)
loop
$ = close(1)
? $AutoDeploy_Process_Type
? $TIMEZONE
? $DAYS_TO_RETAIN_FULL_WORKSTATION_BACKUP
? $DISTRIBUTION_MEDIUM
? $SERIALNUM
? $MACHINETYPE
? $CompPath
my blah.txt file looks like this
Code:
set AutoDeploy_Process_Type=Attended Network-based Migration
SET TIMEZONE=003
SET DAYS_TO_RETAIN_FULL_WORKSTATION_BACKUP=30
Set DISTRIBUTION_MEDIUM=Network
SET SERIALNUM=7GCXZ01
SET MACHINETYPE=COMPUTERS-XP
set CompPath=CN=7GCXZ01,OU=Outlook Mail Client,OU=Employees,OU=CORP,DC=CORP1,DC=CORP,DC=COM
And here's the output i get
Quote:
Attended Network-based Migration
003
30
Network
7GCXZ01
COMPUTERS-XP
CN=7GCXZ01,OU=Outlook Mail Client,OU=Employees,OU=CORP,DC=CORP1,DC=CORP,DC=COM
or howard's should work just fine too