I have an action that is running as currentuser and runs a vb script that has a lot going on. The action send the action complete before the processes in the vb script are complete. The action is receiving a “failed” status because it cannot delete the logfolder/logfile. Failed delete "{parameter “logFolder”}/{parameter “logFile”}"
This is then leaving the c:/SWD_Download folder
What can be done to have the action wait for the extended period of the vb script
This initial post is a mistake. Here is the real issue…
I have an installation for Snap!Reporter that if run as CurrentUser and the user has admin privileges everything is happy in 32 or 64 bit. If logged on user does not have admin then it don’t install. This is not the problem. If I run the action as system then the 32 bit install runs fine but the 64 bit fails with a return code of 1619 indicating that the package cannot be opened. It can’t find it. The command is provided below.
Getting the same results. It is getting the same results using psexec which is not a good sign. I am hoping that there is a workaround for this. This is the entire action:
// Download all specified files
begin prefetch block
add prefetch item name=B86F8BC9BFF6D758DA4C3857B5E1742CF6FCF697 sha1=b86f8bc9bff6d758da4c3857b5e1742cf6fcf697 size=12288 url=SWDProtocol://127.0.0.1:52311/Uploads/B86F8BC9BFF6D758DA4C3857B5E1742CF6FCF697/NM.TEM.Utilities_ProcessExec.exe.bfswd sha256=40f643a68bde307ad184ac0051726a40c28450675efc7cb03a2e5d03570fec4d
add prefetch item name=EE47505EBFB2790B9DA8A20ED70E67158E9753D0 sha1=ee47505ebfb2790b9da8a20ed70e67158e9753d0 size=342528 url=SWDProtocol://127.0.0.1:52311/Uploads/EE47505EBFB2790B9DA8A20ED70E67158E9753D0/RunAsCurrentUser-2.0.3.1.exe.bfswd sha256=1a9b518c775e2a85a7c47801e9b8221df338a65ad8df326485e4cd2aea22fe52
add prefetch item name=FF697CCC1D17CFD7E173BE40C0511B1F06DA8A5B sha1=ff697ccc1d17cfd7e173be40c0511b1f06da8a5b size=3343 url=SWDProtocol://127.0.0.1:52311/Uploads/FF697CCC1D17CFD7E173BE40C0511B1F06DA8A5B/EGRCClientUserConfiguration.vbs.bfswd sha256=6ae5effb9688b46629607c1f2eb5a06b1078e998c81a5c6e8c552781c6794c1f
add prefetch item name=DE5EF66303E55D6955097EB2EF78C82A95D47D6A sha1=de5ef66303e55d6955097eb2ef78c82a95d47d6a size=164679128 url=SWDProtocol://127.0.0.1:52311/Uploads/DE5EF66303E55D6955097EB2EF78C82A95D47D6A/compressedPackageData-201509020957.bftemp.bfswd sha256=c193034ac2000fc63c3118ed2cc1f1ebac0c61a05f387d39d2c6367049ecfc57
add prefetch item name=BCA9A8955A4117989FA826D9CBD64B31187809F8 sha1=bca9a8955a4117989fa826d9cbd64b31187809f8 size=6673 url=SWDProtocol://127.0.0.1:52311/Uploads/BCA9A8955A4117989FA826D9CBD64B31187809F8/EGRCClientInstaller.vbs.bfswd sha256=47684eb5fc417c901d8de90b4f0cfebb8d059b73a9cd68dacf54972c78df87b3
end prefetch block
action uses wow64 redirection {not x64 of operating system}
// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter "baseFolder" = "__Download/"
// Move files into subfolders and unescape file names
move "__Download/B86F8BC9BFF6D758DA4C3857B5E1742CF6FCF697" "{parameter "baseFolder"}NM.TEM.Utilities_ProcessExec.exe"
move "__Download/EE47505EBFB2790B9DA8A20ED70E67158E9753D0" "{parameter "baseFolder"}RunAsCurrentUser-2.0.3.1.exe"
move "__Download/FF697CCC1D17CFD7E173BE40C0511B1F06DA8A5B" "{parameter "baseFolder"}EGRCClientUserConfiguration.vbs"
move "__Download/DE5EF66303E55D6955097EB2EF78C82A95D47D6A" "__Download/compressedPackageData-201509020957.bftemp"
move "__Download/BCA9A8955A4117989FA826D9CBD64B31187809F8" "{parameter "baseFolder"}EGRCClientInstaller.vbs"
// extract any compressed files
extract "compressedPackageData-201509020957.bftemp" "{parameter "baseFolder"}"
// Log setup
parameter "mainSWDLogFolder" = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter "mainSWDLogFolder"}"
parameter "logFile" = "SWD_DeploymentResults.log"
//**End Preparation Marker
delete __createfile
parameter "logFolder" = "{parameter "mainSWDLogFolder"}"
// Run setup process
delete run.bat
// Use .bat to set working directory to packages root, for setup command.
action uses wow64 redirection {not x64 of operating system}
createfile until _end_
@ECHO OFF
cd "{parameter "baseFolder"}"
rem // See comments at the beginning of this action for an explanation of the comment markers.
set DATESTAMP=%DATE:~10,4%_%DATE:~4,2%_%DATE:~7,2%
set DATEANDTIME=%DATESTAMP% %time%
echo %DATEANDTIME% >> "{parameter "logFolder"}/{parameter "logFile"}"
echo Action ID: {id of active action} >> "{parameter "logFolder"}/{parameter "logFile"}"
rem //**Begin Command Marker
echo Command: SNAP!_Reporter_Java.exe /s /v"/l*v C:\Install\logs\SnapReporter.log /qn allusers=1" >> "{parameter "logFolder"}/{parameter "logFile"}"
set errorlevel=
SNAP!_Reporter_Java.exe /s /v"/l*v C:\Install\logs\SnapReporter.log /qn allusers=1" >> "{parameter "logFolder"}/{parameter "logFile"}" 2>&1
rem //wscript.exe EGRCClientInstaller.vbs >> "{parameter "logFolder"}/{parameter "logFile"}" 2>&1
set SWDExitCode=%errorlevel%
rem //**End Command Marker
echo Return code: %SWDExitCode% >> "{parameter "logFolder"}/{parameter "logFile"}"
echo. >> "{parameter "logFolder"}/{parameter "logFile"}"
exit %SWDExitCode%
_end_
move __createfile run.bat
// You will not be able to stop or take action on an applicable BigFix Client until your installer completes.
// So ensure no user input is required.
// If your package absolutely must interact with the user, replace 'override wait' with 'override run' and 'wait' with 'run'.
action uses wow64 redirection {not x64 of operating system}
override wait
hidden=true
completion=job
wait run.bat
//**Begin Closing Marker
// Get the return code of the previous action.
parameter "returnCode" = "{exit code of action}"
// Task will now exit.
exit {parameter "returnCode"}
//**End Closing Marker
You need to edit that post, select all of the actionscript, then click the </> button. This will wrap it all in a code block so that the forum doesn’t mess with the text.
Also, it seems like the SNAP!_Reporter_Java.exe is never downloaded. It doesn’t seem like it is actually there to run in the first place.