• We've upgraded our forums. Please post any issues/requests in this thread.

Simple for you. Hard for me. Help if you can.

1Strive

New Member
Joined
Dec 17, 2005
Messages
682 (0.16/day)
Likes
30
Location
Texas
System Name Back in Black
Processor AMD Opteron 180 @ 2.6GHz (Dual Core)
Motherboard Asus A8N-SLI Premium
Cooling All Antec Case Fans (3-speed and Quiet as they come.)
Memory 2GB DDR440MHz (Corsair XMS LED Series) 1GB x2 [Dual-Channel]
Video Card(s) 8800GTS G92 512mb (eVGA-745/1000) 9474 in 3Dmark06 at Defaults.
Storage 2 WD 74GB Raptors in RAID Zero for Vista. WD 250GB for XP and Storage
Display(s) Acer 22' widescreen. 1680x1050 res / 5ms
Case Antec Black Server Chassis / Logitec G7 Wireless-Laser Mouse
Audio Device(s) X-Fi Music w/ 5.1 Surround Sound Headphones
Power Supply Antec 500Watt ATX2.0 Modular
Software Vista Ultimate (64-bit) / Playing: Crysis in DX9 on XP @ 1680x1050 High with 30FPS
Benchmark Scores Over 9k in 3DMark06! That's better than 80% of all systems tested and logged according to 3Dmark's s
#1
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
 

erocker

Senior Moderator
Staff member
Joined
Jul 19, 2006
Messages
42,381 (10.17/day)
Likes
18,023
Processor Intel i7 8700k
Motherboard Gigabyte z370 AORUS Gaming 7
Cooling Water
Memory 16gb G.Skill 4000 MHz DDR4
Video Card(s) Evga GTX 1080
Storage 3 x Samsung Evo 850 500GB, 1 x 250GB, 2 x 2TB HDD
Display(s) Nixeus EDG27
Case Thermaltake X5
Power Supply Corsair HX1000i
Mouse Zowie EC1-B
Software Windows 10
#2
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
Honestly as an ameteur programmer at best, I would have to do each one individually.:ohwell:
 

1Strive

New Member
Joined
Dec 17, 2005
Messages
682 (0.16/day)
Likes
30
Location
Texas
System Name Back in Black
Processor AMD Opteron 180 @ 2.6GHz (Dual Core)
Motherboard Asus A8N-SLI Premium
Cooling All Antec Case Fans (3-speed and Quiet as they come.)
Memory 2GB DDR440MHz (Corsair XMS LED Series) 1GB x2 [Dual-Channel]
Video Card(s) 8800GTS G92 512mb (eVGA-745/1000) 9474 in 3Dmark06 at Defaults.
Storage 2 WD 74GB Raptors in RAID Zero for Vista. WD 250GB for XP and Storage
Display(s) Acer 22' widescreen. 1680x1050 res / 5ms
Case Antec Black Server Chassis / Logitec G7 Wireless-Laser Mouse
Audio Device(s) X-Fi Music w/ 5.1 Surround Sound Headphones
Power Supply Antec 500Watt ATX2.0 Modular
Software Vista Ultimate (64-bit) / Playing: Crysis in DX9 on XP @ 1680x1050 High with 30FPS
Benchmark Scores Over 9k in 3DMark06! That's better than 80% of all systems tested and logged according to 3Dmark's s
#3
Honestly as an ameteur programmer at best, I would have to do each one individually.:ohwell:
Yeah, me too. But at least we know it can be done.:toast:
 

adrianx

New Member
Joined
Jan 9, 2008
Messages
323 (0.09/day)
Likes
21
Location
Bucharest ROMANIA
System Name Blue Monolith (working on name)
Processor AMD Phenom II 1090T... on H2O
Motherboard Gigabyte GA-890FXA-UD7
Cooling EK-Supreme with 2 radiators for the moment ~ 22 celsius
Memory Kingston HyperX 2x2GB DDR3 1600mhz 8-8-8-24 KHX1600C8D3K2
Video Card(s) hd 6870 Sapphire 1GB
Storage 8x 500GB Seagate Barracuda on LSI controller
Display(s) Samsung 206BW
Case Aplus Black Pearl WCR with water cooling mounts :)
Audio Device(s) Creative X-FI Platinum Fatal1ty Champion
Power Supply Gigabyte ODIN GT-800 (that with software)
Software Windows 7 Ultimate
Benchmark Scores WORKING IN PROGRESS P10464 in VANTAGE(this is the old score)
#4
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
:D

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) :D
 

adrianx

New Member
Joined
Jan 9, 2008
Messages
323 (0.09/day)
Likes
21
Location
Bucharest ROMANIA
System Name Blue Monolith (working on name)
Processor AMD Phenom II 1090T... on H2O
Motherboard Gigabyte GA-890FXA-UD7
Cooling EK-Supreme with 2 radiators for the moment ~ 22 celsius
Memory Kingston HyperX 2x2GB DDR3 1600mhz 8-8-8-24 KHX1600C8D3K2
Video Card(s) hd 6870 Sapphire 1GB
Storage 8x 500GB Seagate Barracuda on LSI controller
Display(s) Samsung 206BW
Case Aplus Black Pearl WCR with water cooling mounts :)
Audio Device(s) Creative X-FI Platinum Fatal1ty Champion
Power Supply Gigabyte ODIN GT-800 (that with software)
Software Windows 7 Ultimate
Benchmark Scores WORKING IN PROGRESS P10464 in VANTAGE(this is the old score)
#5
and a simple ideea

think twice and afther that start working :)
 

mrtn400

New Member
Joined
Jan 17, 2008
Messages
3 (0.00/day)
Likes
0
System Name Cataclysm
Processor Q6600 G0 @ 3204Mhz (356x9) 30°C/54°C
Motherboard Abit IP35 Pro
Cooling Tuniq Tower 120
Memory 2x Crucial Ballistix 1GB PC6400
Video Card(s) BFG 7950GT 512MB @ 565Mhz/715Mhz 46°C/75°C
Storage 2x WD Caviar SE 160GB SATA II
Display(s) Acer X191W 19" Widescreen @ 1400x900 32-Bit Colors
Case Antec 900
Audio Device(s) 7.1 Onboard
Power Supply Antec True Power Trio 650W
Software Windows XP Pro SP2
#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:

adrianx

New Member
Joined
Jan 9, 2008
Messages
323 (0.09/day)
Likes
21
Location
Bucharest ROMANIA
System Name Blue Monolith (working on name)
Processor AMD Phenom II 1090T... on H2O
Motherboard Gigabyte GA-890FXA-UD7
Cooling EK-Supreme with 2 radiators for the moment ~ 22 celsius
Memory Kingston HyperX 2x2GB DDR3 1600mhz 8-8-8-24 KHX1600C8D3K2
Video Card(s) hd 6870 Sapphire 1GB
Storage 8x 500GB Seagate Barracuda on LSI controller
Display(s) Samsung 206BW
Case Aplus Black Pearl WCR with water cooling mounts :)
Audio Device(s) Creative X-FI Platinum Fatal1ty Champion
Power Supply Gigabyte ODIN GT-800 (that with software)
Software Windows 7 Ultimate
Benchmark Scores WORKING IN PROGRESS P10464 in VANTAGE(this is the old score)
#8
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 :)
 

mrtn400

New Member
Joined
Jan 17, 2008
Messages
3 (0.00/day)
Likes
0
System Name Cataclysm
Processor Q6600 G0 @ 3204Mhz (356x9) 30°C/54°C
Motherboard Abit IP35 Pro
Cooling Tuniq Tower 120
Memory 2x Crucial Ballistix 1GB PC6400
Video Card(s) BFG 7950GT 512MB @ 565Mhz/715Mhz 46°C/75°C
Storage 2x WD Caviar SE 160GB SATA II
Display(s) Acer X191W 19" Widescreen @ 1400x900 32-Bit Colors
Case Antec 900
Audio Device(s) 7.1 Onboard
Power Supply Antec True Power Trio 650W
Software Windows XP Pro SP2
#9
Ah, ok. Didn't really understand it's purpose.