Hidden CMD boxes - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

gsimpson
Posts: 13
Joined: Sat Dec 31, 2011 8:13 pm

Hidden CMD boxes

Hi,

I would like to add a custom action to remove a user. I am using the EXE with Working Directory and path given by a formatted.
The command I am giving is:

net user postgres /delete

When I do this a CMD window comes up for a split second. Is there any way to suppress this? I have tried to script it via

Set WshShell = CreateObject("WScript.Shell"):cmds=WshShell.RUN("net user postgres /delete", 0, True):Set WshShell = Nothing
or
cmd /c start /min /c net user postgres /delete

but it is not really working as intended.
Any advise to stop the CMD window from showing at all?

Thanks,
Greg
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Hidden CMD boxes

Hi Greg,

Here's a post with a couple of linked solutions to hiding the CMD window.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”