#13615 - 2001-10-26 02:36 PM
KeyExist Help
|
Anonymous
Anonymous
Unregistered
|
7th day and kix scripting and counting I'd like to thank kixtart.org first, they've supplied answers to many of my initial questions..especially the posters on this board (ie "searching").I'd like for it to search for the Adobe reg key, and if not present install Adobe...but it's JUST NOT WORKING...it always runs the .exe no the outcome. Some help would be surely appreciated. ;Look for Adobe, if not installed install it... $AKey = KeyExist ("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe") IF @ERROR = 1 ? "Adobe is present.." GOTO IEINSTALL ELSE ;Adobe is not present, install it.... RUN "\\Elmo\Common\Software\Applications\Acrobat Reader\rs405eng.exe" Sleep ( 20 ) Setfocus ("Acrobat Reader 4.05 Setup") Sendkeys ("{ENTER} {ENTER}") Sleep ( 10 ) Sendkeys ("{ENTER}") :IEINSTALL
|
|
Top
|
|
|
|
#13616 - 2001-10-26 02:58 PM
Re: KeyExist Help
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
Reverend !try out the following : code:
if KeyExist("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe") "Adobe is present.." GOTO IEINSTALL endif; Your Adobe installation here :IEINSTALL
J. [ 26 October 2001: Message edited by: jpols ]
_________________________
|
|
Top
|
|
|
|
#13621 - 2001-10-27 03:05 AM
Re: KeyExist Help
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Yes, comparable is a word and it was used and spelled correctly also.
|
|
Top
|
|
|
|
#13624 - 2001-10-28 06:07 PM
Re: KeyExist Help
|
Anonymous
Anonymous
Unregistered
|
I think you should have a look at www.installshield.com to get knowledge of how to create a silent install with installshield. Which makes it easier and you don't need to use that setfocus thing.Unextract and use setup -r to create an setup.iss file in %WINDIR% folder. Copy that to the extracted folder and next time run setup /s instead of setup. Then it uses the recorded setup.iss file for silent install. Fabian
|
|
Top
|
|
|
|
#13626 - 2001-10-30 02:57 PM
Re: KeyExist Help
|
Anonymous
Anonymous
Unregistered
|
Aaah!I tried some of the ideas, and nothing seems to be working. if KeyExist("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe") "Adobe is present.." GOTO IEINSTALL endif ; Your Adobe installation here :IEINSTALL With this statement courtesy of jpols, even if I change the actual Adobe key in the registry it will always continue with the GOTO IEINSTALL...maybe I'm doing something wrong here. AACK!
|
|
Top
|
|
|
|
#13628 - 2001-10-30 09:51 PM
Re: KeyExist Help
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,Can you run following script and put the result on the board. It is verified for kixtart 2001 RC 3 release. code:
? ? "-KeyExist verify-" ? $ikey="HKEY_CURRENT_USER\Software" ? "(1=exist/0=not exist) "+KeyExist($ikey+"\MCA") IF (AddKey($ikey+"\MCA") <> 0) ? "AddKey @error (@serror)" ELSE ? "AddKey completed." ENDIF ? "(1=exist/0=not exist) "+KeyExist($ikey+"\MCA") IF (DelKey($ikey+"\MCA") <> 0) ? "DelKey @error (@serror)" ELSE ? "DelKey completed." ENDIF ? "(1=exist/0=not exist) "+KeyExist($ikey+"\MCA") ? ? "-ExistKey verify-" ? ? "(0=exist/1=not exist) "+ExistKey($ikey+"\MCA") IF (AddKey($ikey+"\MCA") <> 0) ? "AddKey @error (@serror)" ELSE ? "AddKey completed." ENDIF ? "(0=exist/1=not exist) "+ExistKey($ikey+"\MCA") IF (DelKey($ikey+"\MCA") <> 0) ? "DelKey @error (@serror)" ELSE ? "DelKey completed." ENDIF ? "(0=exist/1=not exist) "+ExistKey($ikey+"\MCA")
The output was:
code:
-KeyExist verify- (1=exist/0=not exist) 0 AddKey completed. (1=exist/0=not exist) 1 DelKey completed. (1=exist/0=not exist) 0 -ExistKey verify- (0=exist/1=not exist) 2 AddKey completed. (0=exist/1=not exist) 0 DelKey completed. (0=exist/1=not exist) 2
greetings. btw: the result of 2 for ExistKey is not conform documentation. be aware of that.
|
|
Top
|
|
|
|
#13630 - 2001-10-31 09:03 AM
Re: KeyExist Help
|
Anonymous
Anonymous
Unregistered
|
I did a Redirectouput and here's exactly what I got. Also did a @kix and I'm running Kix 3.63. I'll give that software kix script a try and see what I get...maybe I can leech some ideas  Reverend "Rollin Hard" Love code:
-KeyExist verify-(1=exist/0=not exist) KeyExistHKEY_CURRENT_USER\Software\MCA AddKey completed. (1=exist/0=not exist) KeyExistHKEY_CURRENT_USER\Software\MCA DelKey completed. (1=exist/0=not exist) KeyExistHKEY_CURRENT_USER\Software\MCA -ExistKey verify- (0=exist/1=not exist) 2 AddKey completed. (0=exist/1=not exist) 0 DelKey completed. (0=exist/1=not exist) 2
|
|
Top
|
|
|
|
#13632 - 2001-11-01 07:50 AM
Re: KeyExist Help
|
Anonymous
Anonymous
Unregistered
|
Thanks! Everyone has been very patient and helpful....good message board  Reverend Love
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|