.bat file not executing through Bigfix

Manual .bat and .cmd file work for one application uninstallation but not working through Bigfix,

action uses wow64 redirection {not x64 of operating system}
override wait
completion=job
hidden=true
runas=currentuser
wait "C:\test\netx\Net.bat"
wait “C:\test\netx\Net.cmd”

How were net.bat and net.cmd created? Does the logged-on user have access to those files? Capture output (stdout and stderr) and check for problems via

action uses wow64 redirection {not x64 of operating system}
override wait
completion=job
hidden=true
runas=currentuser
wait CMD.exe /c ""C:\test\netx\Net.bat" > c:\windows\temp\script.out 2>&1"

Yes Logged on user have access this file and have application installed on some machines so created batch/cmd file through WMIC uninstall application and manually its working fine.

I tried through bigfix but no luck

Log output:-1:

Action Exit code is 1

image

Simply run like below with wmic -

waithidden cmd.exe /C wmic product where “name like ‘%Nextiva App%’” call uninstall /nointeractive

Or you can also go with below ps script but it will be very time consuming -

Get-ChildItem -Path “HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”
-Recurse | Where {$.GetValue(“DisplayName”) -like “Nextiva app” }
| ForEach-Object {
$
.GetValue(“DisplayName”); $_.GetValue(“UninstallString”) ;
; Start-Process $uninstall;
}

Or most recommended way -

waithidden msiexec.exe /X { name of keys whose( (exists values “DisplayName” whose(it as string as lowercase starts with “Nextiva App” as lowercase) of it) AND (exists values whose(it as string as lowercase starts with “msiexec”) of it) ) of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of ( x64 registries; x32 registries ) } /qn

I checked all option manually worked but through bigfix action getting completed but application not gone.

wait cmd.exe /C wmic product where “name like ‘%Nextiva App%’” call uninstall /nointeractive

Did you tried above out side of any batch file? What error you are getting?

Do one thing download fixlet debugger on that machine and run these action script from it and see what is happening?

through Bigfix debugger its is working fine, but not through bigfix (exit code 21472)

@jason below is your old post, seems its similar issue can you please check my log output as and advice plz

Good find on that post, between that post and your log output I think we can see the problem. Your command prompt is running with the default folder under __BESData, but the user account cannot read that folder which makes it an invalid working directory.

Following that post, you might create a batch file to run the wmic command, copy the batch file to a different folder (that the user can access), and use wait cmd.exe /c "path\to\batch\batch-file-name.cmd" to run it.

You might also try passing a string of commands to the CMD shell, to move to a directory they can read…

action uses wow64 redirection {not x64 of operating system}
override wait
completion=job
hidden=true
runas=currentuser
wait cmd.exe /c "cd C:\test\netx & C:\test\netx\Net.bat"
4 Likes

Thanks Jason for your help