Clicky

I have a .bat file that runs each morning on login script. Every now & then a user will hit the X in the upper right corner & close it out before the script runs.....Is there any code I can put in the .bat file to disable the X?

asked 12/15/2011 02:31

wantabe2's gravatar image

wantabe2 ♦♦


6 Answers:
That's pretty hard to do without some extra tools or trickery, but how do you launch the BAT file?  You might try launching it with the START command and then use the minimized option of that command (and WAIT) so that it doesn't show up on the screen.  It will still show in the taskbar, but it's less obvious.

~bp
link

answered

billprew's gravatar image

billprew

I'm starting the .bat file with VBSCRIPT.....Can I disable the X with some type of .vbs code? If not, what is the cmd to make the .bat file run minimized?
link

answered 2011-12-15 at 10:36:12

wantabe2's gravatar image

wantabe2

I can answer the last part:    START /m script   (but don't give me any points pleaes   :)   )
link

answered 2011-12-15 at 10:40:08

pony10us's gravatar image

pony10us

If you are using .Run() in the VBS to launch the BAT file, have you tried using 2 as the second parm (to run the program minimized)?

~bp
link

answered 2011-12-15 at 10:49:38

billprew's gravatar image

billprew

Here is my .vbs code that calls the batch file named addin.bat

Can I add something to this code to make addin.bat run minimized?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
set oShell= Wscript.CreateObject("WScript.Shell") 

oShell.Run "runas /user:mydomainadministrator ""\myserverpathaddin.bat"""
WScript.Sleep 500 

oShell.Popup "Please wait while the installation begins.....",2,"Technology Team",0+64 

oShell.Sendkeys "mypassword"

oShell.Sendkeys "~"

Wscript.Quit
link

answered 2011-12-15 at 10:51:51

wantabe2's gravatar image

wantabe2

1:
oShell.Run "runas /user:mydomainadministrator ""\myserverpathaddin.bat""", 2


~bp
link

answered 2011-12-15 at 10:56:43

billprew's gravatar image

billprew

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×6
×23

Asked: 12/15/2011 02:31

Seen: 245 times

Last updated: 12/15/2011 03:02