Page 2 of 2 <12
Topic Options
#172363 - 2007-01-04 10:35 AM Re: MY SCRIPT WONT RUN.........PLEASE HELP [Re: Arend_]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Interesting. How big are these networks? Are all computers on one LAN?
Top
#172364 - 2007-01-04 10:47 AM Re: MY SCRIPT WONT RUN.........PLEASE HELP [Re: Mart]
Phoenix1987 Offline
Fresh Scripter

Registered: 2007-01-02
Posts: 49
Loc: Rotterdam, Netherlands
Originally Posted By: Mart
Not tested but this rewtite of the code might work.
No ugly GoSub's and stuff.

Code:
Break on

$key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"

$ar6 = ReadValue($key + "Adobe Acrobat 6.0","UninstallString")
$ar7 = ReadValue($key + "Adobe Acrobat 7.0","UninstallString")
$ar8 = Exist("C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe")
;
If $ar6 <> ""
	;Acrobat 6 detected, uninstall. Parse string, add '-y' For quiet mode
	$leftpart=Left($uninst,InStr($uninst,"-f")-2)
	$rightpart=Right($uninst,Len($uninst)-InStr($uninst,"-f")+1)
	$uninst=$leftpart+" -y -a -x "+$rightpart
	Shell $uninst
EndIf
If $ar7 <> ""
	; Acrobat 7 detected, uninstall. Parse string, add '-y' for quiet mode
	$leftpart=Left($uninst,InStr($uninst,"-f")-2)
	$rightpart=Right($uninst,Len($uninst)-InStr($uninst,"-f")+1)
	$uninst=$leftpart+" -y -a -x "+$rightpart
	Shell $uninst
EndIf
If $ar8 <> "1"
	MessageBox("Installing Adobe Reader 8.0","ESI International",,2)
	Shell '%systemroot%\system32\msiexec.exe /qb!- /i"\\william\admin\users\adobereader\8\AdobeReader 8.0.msi"'
	WriteValue ("HKLM\SOFTWARE\Adobe\Acrobat Reader\8.0\AdobeViewer\", "EULA", "1", "REG_DWord")
EndIf


Hi

Im looking for some code like above.
For me the code works only for installing 8.0 he doesnt install a version of 7.

does anybody see the problem ?
_________________________
A mistake is Human, But to make it a real mess you need a computer.

Top
#172367 - 2007-01-04 11:12 AM Re: MY SCRIPT WONT RUN.........PLEASE HELP [Re: Phoenix1987]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Well, Mart made it for ya as a re-write of your code with gotos and subs, so it does only checks for version 6 and 7, and then installs 8. I thought that the thing was that you wanted the version 8 to be the only version installed?
So, there is no problem more then you want something else \:\)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#172369 - 2007-01-04 11:18 AM Re: MY SCRIPT WONT RUN.........PLEASE HELP [Re: Björn]
Phoenix1987 Offline
Fresh Scripter

Registered: 2007-01-02
Posts: 49
Loc: Rotterdam, Netherlands
o ok

i thought it supposed to uninstall the other version
_________________________
A mistake is Human, But to make it a real mess you need a computer.

Top
#172372 - 2007-01-04 12:49 PM Re: MY SCRIPT WONT RUN.........PLEASE HELP [Re: Phoenix1987]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
it does.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
Page 2 of 2 <12


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 858 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.053 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org