DOS Command in Bigfix

Need help here, this is a simple dos command but it keeps failing. I am trying to run it in Bigfix, can someone help me? it works just fine from a dos command box, but fails in Bigfix. this is what I’m using, it is indeed 1 single line and not 4 separate lines.

Any help would be appreciated.

Thanks!

dos "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify ^

--installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" ^

--remove Microsoft.VisualStudio.Component.Windows11SDK.26100 ^

--quiet --norestart

More than likely, you are running into the WOW redirection issue. BigFix is a 32 bit application. WOW redirection will get you everytime.

To turn redirection off, put this in the top of your action script.

action uses wow64 redirection false 
1 Like

Thanks, Dean. I tried it and its still not working. here is the action script:

action uses wow64 redirection false
dos "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify ^ --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" ^ --quiet --norestart

you don't need all those ^ symbols, that's an artifact from running in a batch script - trying to 'escape' the end-of-line character so you can have one command split across multiple lines in the batch file.

You probably shouldn't use 'dos' this way either, just because it's an older method than 'waithidden'.

I'm not sure whether the 'dos' command evaluates shell variables (since the shell doesn't exist at that point). It might, I'm just not sure.

Instead this is probably a better template you could use.

action uses wow64 redirection false

waithidden cmd.exe /c  ""%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --norestart > %TEMP%\action_output.log 2>&1 "

This wraps the command in the CMD shell, which allows us to save both stdout and stderr output messages into a log file which may be useful for troubleshooting later.

1 Like

Hi Jason,

I ran it as you suggested and the Bigfix console says it Completed, but with an exit code of 1. the contents of the audit log file that it created reads the following: The system cannot find the path specified.

Below is what I ran,

action uses wow64 redirection false waithidden cmd.exe /c ""%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --norestart > %TEMP%\action_output.log 2>&1"

that command should be two lines, but since you get an output file I'm going to guess you have it correct in the action.

Does the vs_installer.exe actually exist, in that path you're checking?

for sure, it’s definitely 2 lines and vs_installer does exist. I just checked. I’m keeping the faith that I can get this resolved with a push from bigfix as opposed to having to manually visit hundreds of machines. Yikes.

Try adding some more troubleshooting to the output file with

action uses wow64 redirection false
delete __createfile
createfile until EOF_EOF_EOF
echo "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" 

dir "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe

dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"

"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --norestart

EOF_EOF_EOF

delete uninstall.cmd

move __createdfile uninstall.cmd

waithidden cmd.exe /c uninstall.cmd > %TEMP%\action_output.log 2>&1

Perhaps some error on one of those lines may be useful in diagnosing the issue.

Hi Jason, here are the results, looks like it didn’t perform the uninstall and also it failed on the last step.

Completed action uses wow64 redirection false
Completed delete __createfile
Completed createfile until EOF_EOF_EOF
Completed echo "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe"
Completed
Completed dir "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe
Completed
Completed dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
Completed
Completed "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --norestart
Completed
Completed EOF_EOF_EOF
Completed delete uninstall.cmd
Failed move __createdfile uninstall.cmd
waithidden cmd.exe /c uninstall.cmd > %TEMP%\action_output.log 2>&1

Remove the D from Createfile

Everything completed normally, but the uninstall did not run. Also, I searched and searched and the log file was not created, it appears.

Completed action uses wow64 redirection false
Completed delete __createfile
Completed createfile until EOF_EOF_EOF
Completed echo "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe"
Completed
Completed dir "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe
Completed
Completed dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
Completed
Completed "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --norestart
Completed
Completed EOF_EOF_EOF
Completed delete uninstall.cmd
Completed move __createfile uninstall.cmd
Completed waithidden cmd.exe /c uninstall.cmd > %TEMP%\action_output.log 2>&1

Everything completed normally, but the uninstall did not run. Also, I searched and searched and the log file was not created, it appears.

Where did you look for the temp folder?

BigFix runs as the system. It's temp location is usually c:\windows\temp.

That is where you should look for the log.

Hi Dean, you were right, it was in C:\windows\temp, here is what the log generated:

C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\opsite33>echo "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe"
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe"

C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\opsite33>dir "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe
Volume in drive C is OSDisk
Volume Serial Number is 524C-C02C

Directory of C:\Program Files (x86)\Microsoft Visual Studio\Installer

12/23/2025 05:38 PM 116,128 vs_installer.exe
1 File(s) 116,128 bytes
0 Dir(s) 278,483,210,240 bytes free

C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\opsite33>dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
Volume in drive C is OSDisk
Volume Serial Number is 524C-C02C

Directory of C:\Program Files\Microsoft Visual Studio\2022\Enterprise

01/21/2026 11:05 AM .
11/10/2025 12:48 PM ..
01/21/2026 11:05 AM Common7
11/10/2025 12:54 PM dotnet
01/21/2026 11:05 AM Licenses
11/10/2025 12:58 PM MSBuild
11/10/2025 01:00 PM Team Tools
01/21/2026 07:40 AM Xml
0 File(s) 0 bytes
8 Dir(s) 278,483,210,240 bytes free

C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\opsite33>"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --norestart

Ok well it looks like at some point I lost some arguments in copy/paste. You'll at least need to put the --remove parameters back on. I'm typing on my phone now so I won't be able to fix it but I think you should try again, putting your parameter into the batch file.

1 Like

it worked once I added the remove parameter. Thanks Jason and Dean!

2 Likes