Hi All,
this one is kind of complicated to me so i'll try to explain it the best i can. i have a text file of all users in my location. i want to use that text file as input to connect to there home directories and add a line to their logon script that will call an application setup when they logon.
i have about 1000 users and do not want to edit them all at one time, becuase i don't want 1000 people to install the app all at once.
what i was thinking about doing was using an input box for the first user to change through the last user i wanted to change. Then when those users had been upgraded go through the next section of users like for instance on day one go through users A - G, on day two go through users H - L, and so on.
here's what i have so far, i just don't know how to integrate the input boxes into what files get changed and which ones don't. any help is appreciated
option explicit
dim ofso, opc, oshell, owmisvc, ouserstart, ouserstop, ouserfile, ouser, ouserbat
opc = "."
set ofso = createobject("scripting.filesystemobject")
set oshell = createobject("wscript.shell")
const forreading = 1
const forappending = 8
set ouserfile = ofspenTextFile("\\server\users\users.txt", forreading)
ouserstart = inputbox("Please enter the username of the first user's logon script to be edited", "Logon Script Change for app install")
ouserstop = inputbox("Please enter the username of the last user's logon script to be edited", "Logon Script Change for app install")
do until ouserfile.atendofstream
ouser = ouserfile.readline
wscript.echo ouser
set ouserbat = ofso.opentextfile("\\server\users\" & ouser & "\scripts\userbatchfile.bat", forappending)
ouserbat.writeline "\\Server\Appshare\app_call.vbs"
loop
ouserfile.close
this one is kind of complicated to me so i'll try to explain it the best i can. i have a text file of all users in my location. i want to use that text file as input to connect to there home directories and add a line to their logon script that will call an application setup when they logon.
i have about 1000 users and do not want to edit them all at one time, becuase i don't want 1000 people to install the app all at once.
what i was thinking about doing was using an input box for the first user to change through the last user i wanted to change. Then when those users had been upgraded go through the next section of users like for instance on day one go through users A - G, on day two go through users H - L, and so on.
here's what i have so far, i just don't know how to integrate the input boxes into what files get changed and which ones don't. any help is appreciated
option explicit
dim ofso, opc, oshell, owmisvc, ouserstart, ouserstop, ouserfile, ouser, ouserbat
opc = "."
set ofso = createobject("scripting.filesystemobject")
set oshell = createobject("wscript.shell")
const forreading = 1
const forappending = 8
set ouserfile = ofspenTextFile("\\server\users\users.txt", forreading)
ouserstart = inputbox("Please enter the username of the first user's logon script to be edited", "Logon Script Change for app install")
ouserstop = inputbox("Please enter the username of the last user's logon script to be edited", "Logon Script Change for app install")
do until ouserfile.atendofstream
ouser = ouserfile.readline
wscript.echo ouser
set ouserbat = ofso.opentextfile("\\server\users\" & ouser & "\scripts\userbatchfile.bat", forappending)
ouserbat.writeline "\\Server\Appshare\app_call.vbs"
loop
ouserfile.close