![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #21 (permalink) |
| Ubuntu 9.10 64 Bit | Re: Collection of Batch files for everyone to use! To autorun a memory stick you need a file called autorun.inf The contents of this file would be as such [autorun] label=roys experiment shellexecute=test.bat The label will name your memory stick Then the name of the batch file that will run If you set the batch file to run an html file then it would be like this. Main.mht this allows you to design a main page using word that will execute in you web page viewer. In short you have an index page like a web page called main.mht that will autorun from the memory stick. The batch file called test.bat calls the file main.mht. There are alot of things you can do with memory sticks these days. Right now I'm making a batch file with Vista tools, Network tools, and a Information logger. I will also seperate them if only one is needed in the zip. I'll have it posted before tonight for sure. The logger I made works perfect. I also added an option to move all the .txt docs from the desktop into a folder so the user can zip it and upload it, or move the folder where ever for late reference... |
My System Specs![]() |
| | #22 (permalink) |
| Vista home premium 64 bit | Re: Collection of Batch files for everyone to use! You can do it in notepad. Just ensure you have the tools section of windows explorer set to show extensions so you can change the extension as you want. Just an idea, you may want the last option of your bat file to run all test. I have not looked at your zip, I will do it now . |
My System Specs![]() |
| | #23 (permalink) |
| Ubuntu 9.10 64 Bit | Re: Collection of Batch files for everyone to use! Alright, sounds easy enough. So in notepad I would name the file autorun.inf, the contents would be: [autorun] label=x shellexecute=anything.bat? Included in this post are my newest batch files. Please take a look guys ![]() Also let me know if there are any bugs or problems with them, I tested each option, but I'm not sure if it won't error on another machine. Thanks for the assistance everyone |
My System Specs![]() |
| | #24 (permalink) |
| Ubuntu 9.10 64 Bit | Re: Collection of Batch files for everyone to use! In the above file attachment I forgot to sort between new and old batch files. The following attachment will have a 'New' folder with my new creations, and an 'Old' folder with 2 other previous attachments... Sorry for the mistake. |
My System Specs![]() |
| | #25 (permalink) |
| Vista home premium 64 bit | Re: Collection of Batch files for everyone to use! There is a way of getting a batch file to run as administrator when called from a batch file. This may allow you to get everything to run from a menu and not have much needed from the user in way of using the CMD. Runas is the command I have found. I have not written batch files for over 10 years so looking into this is getting the brain cells warming up and at my age this takes a while. ![]() On wireless Utility pack you have no error control. If someone enters a wrong choice, a letter for example then the batch file will go for the first option. After the IF options include a goto statement to go back to the beggining. This will ensure that only the options listed will be used. You can add an extra line after the if statments. echo please only choose and option from the menu 1 - 11 to make it a bit more user friendly. @echo off Title Windows Network Utilities goto menu :menu echo ***Some of the present utilities may require 'Admin' Privileges*** echo ***If so please exit, the right click the file and select: 'Run as Administrator'*** echo ***Thank you ***echo What Would You Like To Do? echo 1 Display DNS echo 2 Flush DNS echo 3 Wireless Signal echo 4 Ping Your Current Connection echo 5 Run the 'Ipconfig' utility echo 6 Show The Driver's of Your Current Connection's Card echo 7 Show Wired (Lan) Settings echo 8 Release IPv4 Address (If You Run This You MUST Run 'Renew IPv4 Address') echo 9 Renew IPv4 Address echo 10 Release / Renew Automated echo 11 Quit :choice set /P C=[1,2,3,4,5,6,7]? if '%C%' == '1' goto disdns if '%C%' == '2' goto clrdns if '%C%' == '3' goto sig if '%C%' == '4' goto ping if '%C%' == '5' goto ip if '%C%' == '6' goto drv if '%C%' == '7' goto lan if '%C%' == '8' goto rel if '%C%' == '9' goto ren if '%C%' == '10' goto aut if '%C%' == '11' goto end echo please only choose and option from the menu goto choice :disdns ipconfig /displaydns goto menu :clrdns ipconfig /cleardns goto menu :sig netsh wlan show interface goto menu ingping localhost goto menu :ip ipconfig /allcompartments /all goto menu :drv netsh wlan show drivers goto menu :lan netsh lan dump goto menu :rel ipconfig /release goto menu :ren ipconfig /renew goto menu :aut ipconfig /release ipconfig /renew goto menu :end exit Ignore the smiley on ping |
My System Specs![]() |
| | #26 (permalink) |
| Ubuntu 9.10 64 Bit | Re: Collection of Batch files for everyone to use! Roy, Should I add that error statement in every batch file? I didn't even think of that... Also, I created the autoruns.inf and added it to a flash drive and it's not autorunning my batch file. The batch file is also on the drive.. |
My System Specs![]() |
| | #27 (permalink) |
| Ubuntu 9.10 64 Bit | Re: Collection of Batch files for everyone to use! I fixed the Wireless utility pack. I seen that I didn't even add the corresponding options with what was listed. eg. I had options 1-11 with only 1-7 choices... Anyways that's fixed and I also added the "Please Choose an Option From The Above Menu Only" so there isn't any confusion. Next I'm going to see if I can successfully make these files run as Admin on different machines. Thanks again for the support. |
My System Specs![]() |
| | #28 (permalink) |
| Windows Vista Enterprise x64 SP2 | Re: Collection of Batch files for everyone to use! Just thought of this. The command "tree" will show us their directory structure, plus could pipe it to tree.txt. An oldie but a goodie. |
My System Specs![]() |
| | #29 (permalink) |
| Ubuntu 9.10 64 Bit | Re: Collection of Batch files for everyone to use! Good thinking ![]() I'm updating a few batch files now. I'm adding in a message that shows only if the user types something other than the supplied options. I can also add in to my logging.bat file the tree option. In fact, I will lol. Updates soon |
My System Specs![]() |
| | #30 (permalink) |
| Windows Vista Enterprise x64 SP2 | Re: Collection of Batch files for everyone to use! If it ever gets too unwieldy, you could always break out submenus. Not now, but always an option. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Sort files collection ? | VB Script | |||
| Help with IF in batch files | General Discussion | |||
| Batch files | Vista file management | |||
| Batch Files | Vista General | |||
| In Vista, can .wps files be converted to .rtf files as a batch i.e.instead of one at a time? | Vista General | |||