Running a bat file through sccm creating a vb script file to run setup.exe from unc

Hi Experts,

Trying to install a setup exe with parameters below from sccm. I was able to run it using a bat file. However running the bat file works when running normal causing the cmd window to appear. If run it hidden or even minimized, doesn not run at all. Researching online and appears that I have to run the bat file usinga  vb script file or just use a vb script file to install the setup.exe and run that from sccm. Need some assistance with the scripting running a setup.exe from a network location with parameters through sccm. Thanks in advance for you help.


setup.exe /s /v" /qn addlocal=SEDesktop,SEAdmin"

Bat file
@echo off
pushd \\fileserver\software\Eclipse\Eclipse2015
setup.exe /s /v" /qn addlocal=SEDesktop,SEAdmin"
popd
jaya31Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TLeading EngineerCommented:
Hi,

Running from a network is not a good idea and neither is using BAT files. push and pop have no purpose here in particular.

When you deploy an EXE you need to create an application with a custom deployment type.
In that deployment type you can just use the command line

setup.exe /s /v" /qn addlocal=SEDesktop,SEAdmin"

Add a detection method with a rule to test for file/folder/registry to complete it.

Alternatively create a legacy "package" which is much simpler - it's just a folder with a command line.

The key thing is either way, the software will download to the CCM cache on the local machine (%windir%) and run from there within the directory.

e.g.  c:\windows\ccmcache\sitecode00001A\setup.exe

As it runs in system context it will *not* have access to any network share and will fail. I've never tried it but that's what I've read and see no need to test it.

Why did you want to run the install from the network? If you want to secure the software the standard method is fine as standard users do not have rights to poke around the Windows folder.

Mike

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jaya31Author Commented:
Hi Mike,

Thanks for responding, one thing I forgot to mention is that there is a pre-requisite folder that needs to be in the same folder as setup.exe.  That's one of the reason why I was pointing from a network location. Will the  pre-req folder will that be copied to cache without any further commands
Mike TLeading EngineerCommented:
Hi,

Yes. When you create a package, whether an Application or a legacy package everything, files and sub-folders will be copied down to the machine. Office is a great example.

Mike
jaya31Author Commented:
Hi Mike,

Thanks much. It did work. This particular program did not work, researching the error that if gave, setup.exe was not a good wrapper and that causes issues. I have since used the method to push adobe flash and another application. Thanks much
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SCCM

From novice to tech pro — start learning today.