Page 1 of 1 1
Topic Options
#184285 - 2007-12-28 12:21 AM Shell or RUN ... Execute a MSi File
x2k Offline
Lurker

Registered: 2007-12-28
Posts: 2
Hi All,

Im new, so i might want to introduce myself, im a helpdesk/network support engineer analyst, just manage a few servers and use kix32 script, which i find an amazing tool...

I got a simple enquiry, basically, i have the following command as shown below.

IF INGROUP("br_CTN") > 0
? "Running branch variations..."

USE I: "\\Server07159\common"
RUN "\\Server07159\OFCSCAN\AUTOPCC.EXE"
RUN "msiexec /i \\Server07159\common\isdept\jre.msi /quiet /lew+ \\Server07159\common\logs\logi.log"


EndIF

Basically, i have some simple windows file servers out there, which has a shared drive called common, everyone has full permission to it.

Usually in the end of a script, for instance in a Local Brach such as where i am, the scripts works fine when the statement has nothign to do with a group, so pretty much execute everytime someone logs on to this domain.

This script however, doesn't want to work for me, it hates me, I've tried shell but doesn't seem to work as well, is there something within this statement im missing that could be helpful, JRE.msi is a JAva Installation file, i need to send out this update to all computers.

Any help be great !!! thanks in advance!

Top
#184288 - 2007-12-28 12:50 AM Re: Shell or RUN ... Execute a MSi File [Re: x2k]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
If I understand the problem correct it does run if it is not inside a If InGroup(bla) statement.

What happens if you clear the token cache?
This can be done with the /f parameter or by deleting the registry key below.

 Quote:

HKEY_CURRENT_USER\Software\KiXtart\TokenCache
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#184290 - 2007-12-28 01:20 AM Re: Shell or RUN ... Execute a MSi File [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Well, before making any assumptions, let's review the obvious.. you have a program running another program, and something fails. You need to add some diagnostic output to the outer (kix) script to know what it's doing. This way you can tell what part is failing.

You map a drive to I:, but don't use I: in your commands. Instead you use UNC paths to launch the installers. While the installer may launch, it may not be able to find any other installation files it needs via UNC. Always CD into the folder where your installer is so it can find any required files.

After the USE I: command, add something like this:
 Code:
If Not Exist('I:\isdept\jre.msi')
  'ERROR! Cannot find a required file on the I: drive!'
Else
  ; Connect to the mapped drive / CD to the install folder
  Go 'I:'
  CD '\isdept'
  $Cmd = '.\jre.msi /quiet /lew+ I:\logs\logi.log'
  About to run $Cmd
  Shell $Cmd
  ; repeat as needed for additional install commands
EndIf

Also - RUN "\\Server07159\OFCSCAN\AUTOPCC.EXE"
Is "OFCSCAN" a different share, with the AUTOPCC.EXE in the root? Or are you missing the share? ;\)

Again - defining the command in a var, displaying the var before you run it might help make those kind of mistakes more apparent, along with the If Exist() to validate that the file exists before you run it.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#184292 - 2007-12-28 01:59 AM Re: Shell or RUN ... Execute a MSi File [Re: Glenn Barnas]
x2k Offline
Lurker

Registered: 2007-12-28
Posts: 2
 Originally Posted By: Glenn Barnas
Well, before making any assumptions, let's review the obvious.. you have a program running another program, and something fails. You need to add some diagnostic output to the outer (kix) script to know what it's doing. This way you can tell what part is failing.

You map a drive to I:, but don't use I: in your commands. Instead you use UNC paths to launch the installers. While the installer may launch, it may not be able to find any other installation files it needs via UNC. Always CD into the folder where your installer is so it can find any required files.

After the USE I: command, add something like this:
 Code:
If Not Exist('I:\isdept\jre.msi')
  'ERROR! Cannot find a required file on the I: drive!'
Else
  ; Connect to the mapped drive / CD to the install folder
  Go 'I:'
  CD '\isdept'
  $Cmd = '.\jre.msi /quiet /lew+ I:\logs\logi.log'
  About to run $Cmd
  Shell $Cmd
  ; repeat as needed for additional install commands
EndIf

Also - RUN "\\Server07159\OFCSCAN\AUTOPCC.EXE"
Is "OFCSCAN" a different share, with the AUTOPCC.EXE in the root? Or are you missing the share? ;\)

Again - defining the command in a var, displaying the var before you run it might help make those kind of mistakes more apparent, along with the If Exist() to validate that the file exists before you run it.

Glenn


Glenn,

Thank you for the information, i will try this is and get back to you as soon as possible!

Thanks for the great help!

Top
Page 1 of 1 1


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

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 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