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



## 1Strive (Jan 4, 2008)

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 (Jan 4, 2008)

1Strive said:


> 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.
> ...



Honestly as an ameteur programmer at best, I would have to do each one individually.


----------



## 1Strive (Jan 4, 2008)

erocker said:


> Honestly as an ameteur programmer at best, I would have to do each one individually.



Yeah, me too. But at least we know it can be done.


----------



## adrianx (Jan 16, 2008)

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)


----------



## adrianx (Jan 16, 2008)

and a simple ideea

think twice and afther that start working


----------



## Deleted member 3 (Jan 16, 2008)

Perhaps you could look into KIX, quite a simple script language for logon scripts.


----------



## mrtn400 (Jan 17, 2008)

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".


----------



## adrianx (Jan 17, 2008)

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 (Jan 17, 2008)

Ah, ok. Didn't really understand it's purpose.


----------

