|
|
|||||||
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! |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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! |