#20434 - 2002-04-23 03:35 PM
Insalling package
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
I have created a package using sms installer that i want to push out to certain machine using kix any pointers much apreciated..
code:
$avginst = KeyExist("HKEY_CLASSES_ROOT\Avg.kernel") If $avginst ? "Avg installed...."
$avg=@SCRIPTDIR+"\avg.exe" shell "$avg.exe /s" ENDIF
[ 23 April 2002, 15:36: Message edited by: Stephen Wintle ]
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
#20436 - 2002-04-23 03:39 PM
Re: Insalling package
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
I want the script to check that the above key is in the reg then run the package... Steve
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
#20438 - 2002-04-23 04:15 PM
Re: Insalling package
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Looks like a syntax problem?
Not sure.. but, should it be:
code:
$avginst = KeyExist("HKEY_CLASSES_ROOT\Avg.kernel") If $avginst ? "Avg installed...." SHELL @SCRIPTDIR + "\avg.exe /s" ENDIF
|
|
Top
|
|
|
|
#20439 - 2002-04-23 04:21 PM
Re: Insalling package
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Actually, after doublechecking that.. if you want to install if the key doesn't exist, it should probably be:
code:
IF KeyExist("HKEY_CLASSES_ROOT\Avg.kernel") ? "Avg installed.... ELSE "SHELL @SCRIPTDIR + "\avg.exe /s" ENDIF
I'm just guessing, but this checks to see if the key is there, and if it's not it runs the avg.exe silently from the kixtart folder.
Brian
|
|
Top
|
|
|
|
#20443 - 2002-04-23 04:46 PM
Re: Insalling package
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
Thanks, and yes this is what im trying to do, for some reasom it seems to bypass this part of my script without attempting to install the software, I know my package works... Thanks for your help so far.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
#20444 - 2002-04-23 04:49 PM
Re: Insalling package
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
Sorry for the confusion posts are so fast I am replying to the wrong post here's the bottom line, I want kix to check for the key specified, if not there then... Run my package. Apologies for any confusion!
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
#20445 - 2002-04-23 04:49 PM
Re: Insalling package
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
#20446 - 2002-04-23 04:56 PM
Re: Insalling package
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Ok.. try the code in my first post... I think it may have a chance in heck of working.. assuming that you are trying to run: "avg.exe /s" from the kixtart folder.
Brian
|
|
Top
|
|
|
|
#20447 - 2002-04-23 05:02 PM
Re: Insalling package
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Now, I finally read your last post.. ok.. the first post of code should work if you are installing if the registry key is there. The second post of code should work if you are installing if the registry key is NOT there...
Brian
|
|
Top
|
|
|
|
#20448 - 2002-04-23 05:15 PM
Re: Insalling package
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
Ok, now this is even more confusing, Brian I used your second post(am logging in with admin rights) on a machine that has the key, it confirms the software is already installed (which it is). However on a machine that dosent have the software it just bypasses the shell command (or seems to) I took the /s switch to make sure I could see an installation. Is the first " in your second post a mistake (I assumed it was?) [ 23 April 2002, 17:16: Message edited by: Stephen Wintle ]
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
#20449 - 2002-04-23 05:17 PM
Re: Insalling package
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
#20452 - 2002-04-23 05:23 PM
Re: Insalling package
|
Stephen Wintle
Seasoned Scripter
Registered: 2001-04-10
Posts: 444
Loc: England
|
Jpols u r right to see no sense I was making no sense confused? you will be, no Brian was right the second time, its because i work in a school, they're drive me mental....
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|