Avatar of ceMo89
ceMo89 asked on

vb.net execute CMD command without CMD!!

Hey all,
I've written a script... the script exutes a CMD command (for example auditpol.exe at WIN VISTA) but I don't want that the the CMD will be shown..... the command should be exute the CMD invisible...or something else....
I hope you guys can help me.....

ceMo

Dim myprocess As System.Diagnostics.Process = New System.Diagnostics.Process()
        myprocess.StartInfo.FileName = "auditpol.exe"
        myprocess.StartInfo.RedirectStandardOutput = True
        myprocess.StartInfo.UseShellExecute = False
        myprocess.StartInfo.Arguments = "/get /category:*"
        myprocess.Start()

Open in new window

.NET ProgrammingProgrammingVisual Basic.NET

Avatar of undefined
Last Comment
YoungBonzi

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
YoungBonzi

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
ceMo89

Hey YoungBonzi,
thank for you answear but it doesn't work....the CMD isn't in the background.

ceMo
ASKER
ceMo89

Hey,
i found an solution...

"myprocess.StartInfo.CreateNoWindow = True"

ceMo
YoungBonzi

Ahh, cool. =)
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck