I know its possible to run bat/cmd files hidden but is there a way to display the window but remove the close button?
I know its possible to run bat/cmd files hidden but is there a way to display the window but remove the close button?
Here is a KB article about it.
http://support.microsoft.com/default.aspx/kb/818361
You'll need to put that code in a VBS script then have your login scripts call it to disable their close buttons.
Will this work as a script? as its intended for vb or vb .net.
You'll have to convert it.
How would i go about converting VB to VBS? Dont even know how to declare an external procedure so i wouldnt even get past line 1.
What does your BAT/CMD script do? It might be easier to convert it to a VB script, these run silently.
I agree with djm968, beat me to itOriginally Posted by djm968
If you can tell us what the bat files do then we can try and help you convert it, unless you can convert it yourself
@djm968 & gecko : Note OP wants the CMD window to appear (I assume for diagnostic purposes or to freak out the lusers) but with the close button removed so that users can't terminate login scripts.
The problem you'll have converting KB818361 code above is calls made to user32.dll unless you can get COM wrappers for them.
Best thing would probably be to use Sharp Develop IDE or the command line compilerfor vb.net if your target machines all have .net runtime installed.
Alternatively you could install the AutoIT ActiveX doodah and call that from VBS to control the console window.

Put everything in a GUI AutoIt script and you could even make the log window lime green-on-black![]()
Yup i want the window to appear for the reasons NetworkGeezer stated and i can recode the bat/cmd files as vbscripts, which i may just do. I may just vbscript it and create my own dialog boxes if all else fails.
@NetworkGeezer: Thanks for the info, ill look into it.
You will find it easier to code the dialogs in AutoIt than VB. With VB you will either need to use custom components (which will have to be deployed), or script Internet Explorer. Scripting IE certainly won't speed up your logon process!!
If you do go down the custom component route, you could try looking at JsWare. The web site is a bit confusing but there is some good stuff.
There are currently 1 users browsing this thread. (0 members and 1 guests)