/build/static/layout/Breadcrumb_cap_w.png

Random issue with a pre-logon script to remove Java - Incorrect function

I have a batch script set to run before a user logs in which runs many Java Uninstall MSI commands (forcibly removes all old Java versions). This works very well on most machines but I am getting this odd error on a few of them. This is the scripting log from that job...

Started: 03/19/2013 09:16:01

Finished: 03/19/2013 09:16:01
Elapsed Time: 0 second
Status: 3

Output Log

Running as: SYSTEM
Directory DOES exist: C:\ProgramData\Dell\KACE\\kbots_cache\packages\kbots\46
Error creating process: C:\ProgramData\Dell\KACE\\kbots_cache\packages\kbots\46\run_Java_Uninstall.bat : (1) Incorrect function.
Error Code: 1
Status Code: 183

Activity Log

Checking if directory exists: C:\ProgramData\Dell\KACE\\kbots_cache\packages\kbots\46
Launching program: 'C:\ProgramData\Dell\KACE\\kbots_cache\packages\kbots\46\run_Java_Uninstall.bat' '' wait='false

 

Error creating process:...... .(1) Incorrect function.  

Has anyone seen this before? There does not seem to be a pattern, all the workstations are basically the same Win 7 setup. 

Any ideas are appreciated, thanks,

 

 

 


0 Comments   [ + ] Show comments

Answers (4)

Answer Summary:
Posted by: M P 11 years ago
Purple Belt
1

Your MSIEXEC call for Java(TM) 6 Update 5 at the top of the BAT file uses the /I (uppercase "i").  This should install or configure software, not uninstall it.

Secondly, have you tried modifying the BAT file to run only some of the uninstalls instead of all of them?  You are probably not running all 24 uninstalls at once on a single computer, so I would try to isolate where the issue is.


Comments:
  • agree the /I would cause the incorrect function error you are seeing - SMal.tmcc 11 years ago
  • I agree the /I is typically not the uninstall command but the Kbox itself is telling me the Uninstall command is " MsiExec.exe /I{3248F0A8-6813-11D6-A77B-00B0D0160050} " . Please let me know the correct uninstall command for that version if you know it - thank you, - Kace_jar08 11 years ago
  • On a machine with it still on check

    HKLM > Software > Microsoft > Windows > Current > Uninstall >

    Look for the Java 1.6.0_05 entry, and it should show the command-line.

    MsiExec.exe /X{product id} /qn Reboot=Suppress - SMal.tmcc 11 years ago
  • Java also has a rule create your own.
    if you look at any of the other strings for version 6 you will see all the bits are the same but 2, those are the version number so try
    start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216006F0} /qn - SMal.tmcc 11 years ago
Posted by: SMal.tmcc 11 years ago
Red Belt
1

Almost sounds like a timing problem.  with the "wait='false" it could be the batch is not done being copied down but the task is trying to execute it anyway.

Just in case it is not that could you post your bat file also?

Posted by: Kace_jar08 11 years ago
White Belt
0

Here's the BAT file...

------------------------------

@echo off

 

REM Java(TM) 6 Update 5

start /wait MsiExec.exe /I{3248F0A8-6813-11D6-A77B-00B0D0160050} /qn

 

REM Java(TM) 6 Update 15

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216015F0} /qn

 

REM Java(TM) 6 Update 18

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216018F0} /qn

 

REM Java(TM) 6 Update 23

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216023FF} /qn

 

REM Java(TM) 6 Update 24

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216024FF} /qn

 

REM Java(TM) 6 Update 25

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216025FF} /qn

 

REM Java(TM) 6 Update 26

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216024FF} /qn

 

REM Java(TM) 6 Update 27 (64-bit)

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416027FF} /qn

 

REM Java(TM) 6 Update 27

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216027FF} /qn

 

REM Java(TM) 6 Update 29 (64-bit)

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416029FF} /qn

 

REM Java(TM) 6 Update 31

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216031FF} /qn

 

REM Java(TM) 6 Update 31 (64-bit)

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416031FF} /qn

 

REM Java(TM) 6 Update 34

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216034FF} /qn

 

REM Java(TM) 6 Update 37

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216033FF} /qn

 

REM Java(TM) 6 Update 39

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216039FF} /qn

 

REM Java(TM) 6 Update 39 (64-bit)

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86416039FF} /qn

 

REM Java(TM) 7 Update 3 (64-bit)

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417003FF} /qn

 

REM Java(TM) 7 Update 5

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217005FF} /qn

 

REM Java 7 Update 7

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217007FF} /qn

 

REM Java 7 Update 9

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217009FF} /qn

 

REM Java 7 Update 11

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217011FF} /qn

 

REM Java 7 Update 13

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217013FF} /qn

 

REM Java 7 Update 13 (64-bit)

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86417013FF} /qn

 

REM Java 7 Update 15

start /wait MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217015FF} /qn

 

 

 


Comments:
  • your 6 Update 26 line is for version 24 - SMal.tmcc 11 years ago
  • see http://www.itninja.com/blog/view/how-to-create-your-own-uninstall-strings-for-all-versions-of-java-6-and-7 - SMal.tmcc 11 years ago
  • Thanks, thats a good link and thanks for that fix on Update 26 - however it looks like older versions of 6 end in F0 and not FF. I'll give this a shot. thanks, - Kace_jar08 11 years ago
Posted by: Kace_jar08 11 years ago
White Belt
0

An update... for some reason changing it to run AFTER the user logs in, instead of before, seems to have fixed the error it was throwing.

No idea why, but for now that seems to work. 


Comments:
  • Did you see "M P"'s comment, the /I would cause the incorrect function error you are seeing - SMal.tmcc 11 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ