![]() |
|
|
#1 |
![]() Join Date: Dec 2005
Location: Texas
Posts: 667 (0.25/day)
Thanks: 58
Thanked 30 Times in 14 Posts
|
Simple for you. Hard for me. Help if you can.
Hi everyone,
1STRIVE here. I am not a programmer. I hardly ever have to write my own scripts. Batch files is about the extent of what I do. I am a windows system admin. I have a batch file to add shares to a cluster and I want to get it to use parameters and then pull the answers from a txt or csv file. Or I want input boxes to pop up for the answers. Here is what I have. cluster resource "MGMT1$" /create /group:"Group 00" /Type:"File Share" cluster resource "MGMT1$" /priv Security=Everyone,set,R:security cluster resource "MGMT1$" /priv Security=Administrators,set,F:security cluster resource "MGMT1$" /adddep:"Disk V:" cluster resource "MGMT1$" /priv ShareName=MGMT1$ cluster resource "MGMT1$" /priv Path="V:\MGMT1" cluster resource "MGMT1$" /priv Remark=Fuji cluster resource "MGMT1$" /on This works like a champ, but I need to repeat it 50 times with different "Share Names, Disk, and Path" The next one would look like this. cluster resource "ATHMT1$" /create /group:"Group 00" /Type:"File Share" cluster resource "ATHMT1$" /priv Security=Everyone,set,R:security cluster resource "ATHMT1$" /priv Security=Administrators,set,F:security cluster resource "ATHMT1$" /adddep:"Disk T:" cluster resource "ATHMT1$" /priv ShareName=ATHMT1$ cluster resource "ATHMT1$" /priv Path="T:\ATHMT1" cluster resource "ATHMT1$" /priv Remark=Fuji cluster resource "ATHMT1$" /on So, any help will be appreciated. Thanks, 1STRIVE
__________________
Glory to "Alt 0134". Crysis SP "Lock on with the TAC Gun!" Load a Save. ================= Driver Tweak to not Scale/Streach 4:3 ratio on widescreen displays. http://forums.techpowerup.com/showthread.php?t=34849 How To...Capture, Convert, and Post your PC Game Play Footage. http://forums.techpowerup.com/showthread.php?t=11384† |
|
|
|
|
|
#2 | |
|
Senior Moderator
Join Date: Jul 2006
Location: Milwaukee, WI.
Posts: 31,958 (12.77/day)
Thanks: 2,793
Thanked 12,320 Times in 7,832 Posts
|
Quote:
|
|
|
|
|
|
|
#3 | |
![]() Join Date: Dec 2005
Location: Texas
Posts: 667 (0.25/day)
Thanks: 58
Thanked 30 Times in 14 Posts
|
Quote:
__________________
Glory to "Alt 0134". Crysis SP "Lock on with the TAC Gun!" Load a Save. ================= Driver Tweak to not Scale/Streach 4:3 ratio on widescreen displays. http://forums.techpowerup.com/showthread.php?t=34849 How To...Capture, Convert, and Post your PC Game Play Footage. http://forums.techpowerup.com/showthread.php?t=11384† |
|
|
|
|
|
|
#4 |
![]() Join Date: Jan 2008
Location: Bucharest ROMANIA
Posts: 321 (0.16/day)
Thanks: 2
Thanked 25 Times in 20 Posts
|
you can reduce your "work" if same variable are fixed
![]() a visual basic script will help you... but frist you need all the date... in 1-2 list also you must be sure that the list is 100% corect and the script must write a file ... cluster resource "ATHMT1$" /create /group:"Group 00" /Type:"File Share" cluster resource "ATHMT1$" /priv Security=Everyone,set,R:security cluster resource "ATHMT1$" /priv Security=Administrators,set,F:security cluster resource "ATHMT1$" /adddep:"Disk T:" cluster resource "ATHMT1$" /priv ShareName=ATHMT1$ cluster resource "ATHMT1$" /priv Path="T:\ATHMT1" cluster resource "ATHMT1$" /priv Remark=Fuji cluster resource "ATHMT1$" /on and in this file the script must insert the data from the file also the script must sent to execution that file ... or simple to name the file with an incremented name ... same like ... file1, file 2... etc.. and in the end you will run a script to run all the file you crated ![]() but ... this only helping you if you know ho to write that script.. (it's posible to cost more time that you write manualy all the commands)
|
|
|
|
|
|
#5 |
![]() Join Date: Jan 2008
Location: Bucharest ROMANIA
Posts: 321 (0.16/day)
Thanks: 2
Thanked 25 Times in 20 Posts
|
and a simple ideea
think twice and afther that start working
|
|
|
|
|
|
#6 |
|
Señor Moderator
Join Date: May 2004
Location: Utrecht, Utrecht, The kingdom of the Netherlands
Posts: 8,498 (2.58/day)
Thanks: 41
Thanked 1,453 Times in 1,077 Posts
|
Perhaps you could look into KIX, quite a simple script language for logon scripts.
|
|
|
|
|
|
#7 |
|
I could help you make a small app in C++ that generates the long .bat file. You'd need to download Dev-C++ so you could compile the source.
(Yes, just joined. Been ghosting a while and joined so I could try to help you. Normally on OCN.) Edit: Or I could make you the program 100% if you give me the list of "Share Names", "Disks", and "Paths". Last edited by mrtn400; Jan 17, 2008 at 12:07 AM. |
|
|
|
|
|
|
#8 |
![]() Join Date: Jan 2008
Location: Bucharest ROMANIA
Posts: 321 (0.16/day)
Thanks: 2
Thanked 25 Times in 20 Posts
|
mrtn400
the list must be .. safe becouse is a list of the private network... will be a security issue to give that list to anyone.. ![]() also a good admin must know what software will run in "his" network, for that he must analise the script/source from you
|
|
|
|
|
|
#9 |
|
Ah, ok. Didn't really understand it's purpose.
|
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Build Thread | bruins004 | System Builder's Advice | 159 | Mar 5, 2013 10:53 AM |
| Spire MegaPOD III | Frederik S | Reviews | 2 | Sep 12, 2007 06:51 AM |
| Hitachi Schedules 1TB Hard Drive for Q1 2007 | malware | News | 9 | Jan 5, 2007 07:19 PM |
| Seagate Extends Warranty on Maxtor Internal Hard Drives | malware | News | 1 | Nov 29, 2006 04:42 PM |
| Hitachi to Anchor 2.5-inch Hard Drive Leadership with Quarter-Terabyte Product | D_o_S | News | 0 | Nov 2, 2006 07:22 PM |