Link to home
Create AccountLog in
Microsoft Server OS

Microsoft Server OS

--

Questions

--

Followers

Top Experts

Avatar of bonbon1
bonbon1🇺🇸

How do I send Batch files via SCCM
I created a package with no source files. Then a program that calls the batch file with the command: cmd /c
The .bat folder is in a folder called Batch for that particular application on the SCCM server (it does call other batch files from other locations which are on network shares but I think that is not an issue). My question is how do I actually call it up, or is this correct and I need to tweak other areas. After I created the Program for two batch files to run which are set up identical I created a task sequence and advertised it.

Included are screen shots in the order I described it. My feeling is there is something about the command line in the first screen shot I may need to change. Help would be greatly appreciated!       User generated image User generated image User generated image

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of merowingermerowinger🇩🇪

do not configure a package path in the program command line.
Just configure the following as command line:
cmd /c FS_8_2_Removal.bat
the "Start in" option is not needed.
As you already configured the path in the package the batch file will be found.

Avatar of bonbon1bonbon1🇺🇸

ASKER

New Development: the task sequence actually worked when I ran it manually from Add\Remove programs on one of the target machines since I made the latest changes, so that part is a success. However there are two batch files, one to remove the old version of FileSite and one to install the new version, the latter installed but the former did not remove. When I run the removal batch file manually it prompts me "do I really want to remove this application?" and I have to click yes. So my guess is that it requires user interaction and I want it to just run silently... do I just an a /q to the command line?  Here is a screen shot of the behavior, meanwhile I will try that to see if it works. Suggestions or alternate ways of achieving the same thing would also be appreciated! User generated image

Avatar of bonbon1bonbon1🇺🇸

ASKER

Thank you for your comment above, I guess it works either way as my results explained above, but that saves me the steps and the confusion of whether that step was necessary or not!  Do you have any suggestion for my remaining issue?

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of merowingermerowinger🇩🇪

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of bonbon1bonbon1🇺🇸

ASKER

for some reason this is not working.. it worked better without this addition but there had to be user involvement.. perhaps just /q

I will try this next

Avatar of bonbon1bonbon1🇺🇸

ASKER

where would I put this option exactly, haven't been able to make it work, using:

cmd /c FS_8_2_Removal.bat

as you suggested, but haven't been able to place the /qb-! effectively


Avatar of merowingermerowinger🇩🇪

the /qb-! flag can only be configure when executing a msi package.
The batch command line should work as i suggested.
Could you please explain once more what now is the problem and make some screenshots how you configured it and post the content of the batch file please

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of bonbon1bonbon1🇺🇸

ASKER

The first screen shot of the Program above still applies to the format, I didn't change that because it worked for all intense purposes.

The task sequence is the same except I added a restart in between the removal program and the new installation program as well as at the end of the sequence to clear folders and registry.

Both independend batch files (the removal and the installation respectively), work when I run them independently, but the former (the removal) as mentioned above still prompts me when I run it manually "Am I sure I really want to remove this product?" and I have to click yes to continue. *I believe as before this is what is holding up the install. Before I made the removal a mandatory predecessor to the upgrade installation, the removal would time out and the upgrade would run resulting in two versions of the product installed. I fixed that but now it doesn't run at all because it is still stuck on the removal process. Here are some of the combinations I have tried in the removal batch.. and if it doesn't like the script I get a pop up for command options, if it does like the script I still get the pop up 'am I sure I want to remove this product?' : <script inside removal .bat>

MsiExec /x "H:\WorkSiteInstallFiles\FileSite 8.2 Installation Batch\Full_Installer/Interwoven FileSite 8.2 SP1.msi"

I have tried to place your suggestions after the /x

MsiExec /x /qb-! "H:\WorkSiteInstallFiles\FileSite 8.2 Installation Batch\Full_Installer/Interwoven FileSite 8.2 SP1.msi"

MsiExec /x /q "H:\WorkSiteInstallFiles\FileSite 8.2 Installation Batch\Full_Installer/Interwoven FileSite 8.2 SP1.msi"

MsiExec /x /qb "H:\WorkSiteInstallFiles\FileSite 8.2 Installation Batch\Full_Installer/Interwoven FileSite 8.2 SP1.msi"

I have tried these and many combinations but it for sure does not like the "-!" and I have tried to remove the dash, replace with a +, create a separate switch for the ! but I cannot get the prompt to go away. I even played with /qn and /q /n

Any suggestions would be greatly appreciated.


Avatar of bonbon1bonbon1🇺🇸

ASKER

msiexec.exe /x "H:\WorkSiteInstallFiles\FileSite 8.2 Installation Batch\Full_Installer/Interwoven FileSite 8.2 SP1.msi" /norestart /qn

I figured it out - this was the line that worked. You were probably right about the qb-! but I wasn't placing it after the .msi file directly as above. There are alternatives to that suggestion, but since I am new to scripting I didn't realize I needed to place it after the file path.

Thanks for your help. I got a tip off from another application script I was working on, but your input was very valuable.

Avatar of bonbon1bonbon1🇺🇸

ASKER

Solution was complete if I knew the protocol but since I didn't I had to do a lot of extra work to find the right placement - an example in a faux script line would have been very helpful, or could have used my own example and placed the /qb-! where it would be effective (after the .msi file).

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

Microsoft Server OS

Microsoft Server OS

--

Questions

--

Followers

Top Experts

The Microsoft Server topic includes all of the legacy versions of the operating system, including the Windows NT 3.1, NT 3.5, NT 4.0 and Windows 2000 and Windows Home Server versions.