I mean file to disk C, create a new folder in the bat, So c:\testFolder,
The system default execution from “C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite”, the result is so :
Personally I favour not assuming static drive letters so would tend to use a dynamic lookup for the drive of system folder
folder create "{name of drive of system folder}\testFolder"
copy __Download\test.bat "c:\testFolder\test.bat"
wait cmd /Q /C "c:\testFolder\test.bat"
Another option is to not download the batch file but create it on the fly, that way a simple change to the fixlet action you can modify the BAT file which makes things easier when those small changes to the BAT file crop up. It would really depend on whichever is best for your requirements, eg
createfile until end_of_file
echo running batch file
REM add whatever other batch command you need
end_of_file
folder create "{name of drive of system folder}\testFolder"
delete "{name of drive of system folder}\testFolder\test.bat"
copy __createfile "{name of drive of system folder}\testFolder\test.bat"
wait cmd /q /c "{name of drive of system folder}\testFolder\test.bat"
You should be using BigFix to copy the installation files and scripts to the client – having it in another folder means you are doing it through group policy or some other fashion and is probably not the best approach.
That being said, as you have noticed the working directory is that …\Actionsite folder. You have an option if you dont want the working directory to be that folder:
call the installer from a batch script and cd to the directory from within the batch script:
delete __createfile
delete run.bat
createfile until _end_
@ECHO OFF
cd "C:\testfolder"
call install.bat
_end_
move __createfile run.bat
override wait
hidden=true
completion=job
wait run.bat
In my opinion, it makes quote handling over the cmd command line easier so that if you have a path with spaces in it and you need to put quotes around the path, cmd won’t break
Thank you, I use your method is successful,
I’m thinking of a different kind of problems at the same time, this kind of situation is only.bat/.cmd format file is
The. exe/.msi if there is a similar situation?
Thank you, I use your method is successful
I’m thinking of a different kind of problems at the same time, this kind of situation is only.bat/.cmd format file is
The. exe/.msi if there is a similar situation?
@dwerdwer, sorry for not having seen your message to say hello.
I appreciate you using English in spite of the fact that this is not your native language.
I will reply to your email as well.