Saved Bookmarks
| 1. |
Solve : 4 Questions (2 Answered) Tough to Solve...?? |
|
Answer» HELLO to all, As I have four questions (2 solved) which are mentioned below: 1.) I'm using a batch file & it is in Startup folder. It runs every time when I log in. I'm using three commands in it. Every time its shows Ok mesage when a command is executed successfully, so I want to disable the "Ok"mesage, I have used "@ECHO OFF" after every command but it doesn't work. Commands are netsh firewall & netsh interface ip so when they are executed, Ok mesage is appeared, I want to disable the mesage or it should not be appeared. And I also want to ask that Can that blank window be minimized automatically and runs in small window above the clock or in any side so that whenever it runs user can not notify that a batch file is running.? Ans) If we do not want to see any messages OR To get rid of the screen output use redirection and redirect the output to NULL use this method: netsh firewall ... ... 1>nul 2>nul for example ... "netsh interface ip set address name= "Local Area Connection" static 10.0.0.1 255.0.0.0 10.0.0.50 0 1>nul" Then the OK mesage will not be appeared. & when we run a batch file, blank window appears, If we want that window to be minimized then instead of running the batch file directly, run it like so: start /min "" cmd.exe /c d:\Tools\test.bat where d is the drive in which batch file exist. 2.) My second question is that, I want to send a mesage at a particular time, for example at 10.00pm or After one hour of login. The syntax of SENDING mesage is Msg * Hello. Ans) We can use SCHEDULED tasks located in Start --> All Programs --> Accessories --> System Tools --> Scheduled Tasks. Add the Batch File and you can set up when you want it to run. 3.) Can we send the mesage in any colorful window, & Can we change the color of the window (in which mesage appears) or can we change the title of the window when it appears. ? 4.) Can we enable or disable lan or any Local area Connection by any command or by batch file? 1. What is are the commands? 2. Scheduled tasks? 3. To change the color of the command prompt window, type color /? and press Enter. To change the title, the command is title TITLE HERE 4. Why?1. Ah sorry, I seem to have missed that. I don't think there is a way to get rid of the OK message. To start a batch file minimized, use start /min file.bat. 2. Scheduled tasks is located in Start --> All Programs --> Accessories --> System Tools --> Scheduled Tasks. Add the Batch File and you can set up when you want it to run. 3. There is no way to change that. 4. Still, why? Sounds devious to me....Hello Dear, My 3rd question, "Changing title and color of mesage box" Dear I'm not sure but I think its possible but I'm unable to use that command, Below I'm POSTING the syntax of it from a website so may be you can help me about it. http://www.pitrinec.com/bar_help/pg_hlp_cmd_msg.htm -------------------------------------------------------------------------------- Shows message window. Command Tree: Message \ Show Message . Syntax: (Xpos, Ypos, "MessageText", "Title", OKButton) Xpos X-coordinate of the message window position. Ypos Y-coordinate of the message window position. MessageText Text you want to display in the message window. Title Title of the message window. OKButton Can be one of these values: 0 - OK button is not shown. The command must be used to close the message window. 1 - OK button is shown in the message window. . . Example: <#> This macro will display message window <#> (100,100,"This is a message to notify user just about anything....","Message",1) -------------------------------------------------------------------------------- I'm posting link of another site, In that it shows that msgbox is the command of batch file but it doesn't run in cmd. http://www.jpsoft.com/help/index.htm?msgbox.htm http://www.jpsoft.com/help/index.htm?window.htm -------------------------------------------------------------------------------- 4th Question, I'm using a computer which is shared, so I want some of the users not to use lan. I will put the batch file on the startup folder so that it will automatically disables the lan. I hope you understand now. Any way dear, Thanks very much for helping me so much. I will be waiting for your reply. Take Care. Have a Nice DAY. |
|