I have the following .bat file:
fbwfmgr /enable
.
.
.
fbwfmgr /addexclusion c: "some folder 1"
fbwfmgr /addexclusion c: "some folder 2"
.
.
.
which I'm calling from the [Run]
section in my Inno Setup like this:
Filename: "{tmp}\set_write_protection_rules.bat";
I have also tried this:
Filename: "{cmd}"; Parameters: "/c ""{tmp}\set_write_protection_rules.bat""";
I always get the message
'fbwfmgr' is not recognized as an internal or external command, operable program or batch file.
If I run the .bat file by double clicking on it it works, if I run it from a cmd window myself it works. What am I missing here?
I'm running this on a Windows Embedded Standard x64 system logged in as the administrator.
EDIT:
Adding the full path to the fbwfmgr.exe
does not solve the issue (I have also manually looked that that's the actual location of fbwfmgr.exe
):
%systemroot%\system32\fbwfmgr.exe /enable
I found a similar thread here where the OP is having the same problem while running the .bat file from vbs, no solution seems to have been found there. From a suggestion there to cut the middle man I've tried calling fbwfmgr
directly from Inno Setup with the following line:
Filename: "{cmd}"; Parameters: "c/ ""fbwfmgr /enable""";
but to no use. It just opens an empty console window. When I try to call fbwfmgr
from there, it is not recognized.