Creating users, and their home directory
Hi All,
I have a list of 90 users that I need to import into AD. I wrote a script
that does this but it doesn't create their home folder automatically. So
for instance, if I set the user's home folder to \\servername\share\folder,
and set it to a Z drive or something, that folder is not created. However,
when I manually create, or copy a user, it does create that folder
automatically (with the appropriate permissions etc.). Is there an easy way
to get it to create that home folder automatically, without having to make
the script do all of that work? Maybe a copy of an existing user? There is
an article on MSDN about copying a user, but only for SELECTED attributes.
I want ALL of the attributes copied (except username of course).
Thanks,
Pair Tag: copy file Tag: 146984
Display Status Window with Wsh Logon Script
I have a simple yet successful logon vbscript for windows 2000.
However, i would like to display the results/progress in a status
window at runtime when a user log's on to his/her pc. I have seen some
scripts using ie documents but most of the script I have found is a
football field long and does not work with my script. Can somebody
post or refer me to simple code that only displays the results and
status of what is happening (i.e. like in batch files)? Nothing fancy,
just straight forward code that works?
Thanks much! Tag: copy file Tag: 146972
Disable Keyboard & mouse
Dear all
i would like to disable the funtion of keyboard & mouse during my script is
running so that the user could not change the focus of the running program.
can anyone tell me how to write it???
i've search the microsoft, msdn & google but nothing can help.
thank you all in advanced.
: ) Tag: copy file Tag: 146969
Possible to search PST files with VBS?
Is it possible to search a series of PST files with VBS for a
perticular string?
will GetObject work on a PST file? Tag: copy file Tag: 146963
InStr - Searching Logs for strings? Any help?
Wondering if someone can show me a working example of the InStr
function.
I'd like to seach a log file on various remote servers for successful
exit codes.
the examples i've tried recently only work if the string is exactly
For example the log file with a line like
11:11:54 11/01/2003 033867563 RADCONCT EXIT STATUS = [857]
I can get InStr to work if I enter all that exactly but not if I'm
only searching for RADCONCT EXIT STATUS = [857]
Thanks Tag: copy file Tag: 146961
authentification
Hello,
we have subscribed to a web site that need a user/password IIS
authentification every time you connect to it.
I'm looking for a script that will make the connexion automatically (by
filling the 'user/password' field)
thanx for any help and idea.
Nova Tag: copy file Tag: 146958
Using VBScript to run Find in Excel
I would like to use VBScript to find a value that is a variable in
Excel. I assign WSval as the variable to hold the data I need to
locate in column 1 of my Excel file. The problem is in my Do Loop
where I say "If val = (WSval) Then". I don't think val is being
compared to the actual data WSval is holding but rather the word
WSval. My code looks like this:
On Error Resume Next
Const ForReading = 1
Const TristateFalse = 0 'Opens the file in ASCII format
Dim wshShell
Set wshShell=CreateObject("Wscript.Shell")
Set oFS = CreateObject("Scripting.FileSystemObject")
oFS.DeleteFile "N:\pardus\pingresults.txt", True
tIP=InputBox("Enter the IP address: xxx.xxx.xxx.xxx")
wshShell.run ("cmd ~")
Wscript.Sleep 500
wshShell.SendKeys "ping -a " & tIP & ">N:\Pardus\ping.txt ~"
Wscript.Sleep 4000
wshShell.SendKeys "Exit ~"
aFile = "N:\Pardus\ping.txt"
Set f = oFS.OpenTextFile(aFile, ForReading, True)
f.SkipLine
f.Skip(10)
WSval = f.Read(4)
'RUN QUERY AND SEARCH FOR MATCHING WS NUMBER
Set xl = CreateObject("Excel.Application")
xFile = "I:\My Documents\databases\queries\Query from Trackit.dqy"
xl.WorkBooks.Open xFile
xl.Visible=True
xl.DisplayAlerts = False 'Prevents prompt about overwriting resume.xlw
WScript.Echo "Read from text file " & WSval
r = 1 'row
c = 1 'column
Set oSheet = xl.ActiveWorkbook.Worksheets(1)
oSheet.Select
Do
val = oSheet.Cells(r,c).Value
WScript.Echo "Read from Excel file " & val
If val = (WSval) Then
WScript.Echo val
xl.Application.Quit
Exit Do
Else
r = r + 1
End If
Loop
Thanks in advanced for any suggestion/help!
Steve Tag: copy file Tag: 146957
users and folders
I need to write/find a script that will bulk import
around 1500 users creating users and home drives on a
windows 2003 server.
Any help would be welcome Tag: copy file Tag: 146956
Timer before continue with script
Hi
Is it possible to have a timer in a "while not rsResults.EOF"
I want to wait 1 second before returning the next record from that statement
above.
What would the code look like in asp?
Thanks Tag: copy file Tag: 146953
An easier way to write this code?
Is there an easier/shorter way to write this code?
Test1 = Request.Form("Test1")
Test2 = Request.Form("Test2")
Test3 = Request.Form("Test3")
Test4 = Request.Form("Test4")
if Test4 = "Yes" and Test3 = "Yes" and Test2 = "Yes" and Test1 = "Yes" then
Result = 5
elseif Test4 = "Yes" and Test3 = "Yes" and Test1 = "Yes" then
Result = 5
elseif Test4 = "Yes" and Test2 = "Yes" and Test1 = "Yes" then
Result = 5
elseif Test4 = "Yes" and Test1 = "Yes" then
Result = 5
elseif Test3 = "Yes" and Test2 = "Yes" and Test1 = "Yes" then
Result = 4
elseif Test3 = "Yes" and Test1 = "Yes" then
Result = 4
elseif Test3 = "Yes" then
Result = 4
elseif Test2 = "Yes" and Test1 = "Yes" then
Result = 3
elseif Test2 = "Yes" and Test1 = "No" then
Result = 1
elseif Test4 = "No" and Test3 = "No" and Test2 = "No" and Test1 = "Yes" then
Result = 2
elseif Test1 = "No" then
Result = 0
end if Tag: copy file Tag: 146941
Best way to enumerate installed applications
Hi there,
How can I list the applications installed on Win98 machines...? The list
displayed by Add/Remove programs would be a good start... anyone know how to
get this? I'd preferably like to know the executable path and name as well
as the application friendly name.
Any other suggestions for auditing PC software...?
Note that this is preliminary work in preperation for implementing SMS
Server 2003 so no point suggesting I use a server based tool like SMS...
Cheers Tag: copy file Tag: 146938
scrolling popups
Hi,
Does anyone know how to set the scroll
attribute on a popup. For instance if I
write this:
set p=window.createpopup
p.document.body.scroll="yes"
p.show 0,0,100,100
I don't see any scroll bars. I know a popup
can have scroll bars because if I write it
this way I not only see scroll bars but a
sunken border as well:
set p=window.createpopup
p.document.write "x"
p.show 0,0,100,100
? Tag: copy file Tag: 146936
vbs send at commands to serial port
I am trying to write a visual basic script that will be
able to send "at-commands" to the serial port.
I found all commands for the gsm-modem to send sms, but I
am still looking for a way to send the commands. I have
tried to use the mscomm32.ocx through an object, but
without success.
Any help? Tag: copy file Tag: 146912
Bulk change of AD Remote Access permission attrib
Hi,
Trying to do a bulk change of the AD attribute for RAS Permission from
"Deny" to "Allow". Have looked up the Technet script centre on this and
have come up with:
Set objUser = Get Object ("LDAP://cn= etc...correct LDAP path)
objUser.Put "msNPAllowDialin", TRUE
objUser.SetInfo
While this changes this particular attribute as seen in ADSI Edit, it does
not change the AD Users and Computers user account "Dial In" tab attributes
at all. I have no need for any of the other attributes mentioned in the
script centre article and do not want them set. Manually changing the
"Dial In" tab to "Allow Access" changes only the "msNPAllowDialin" booleen
to TRUE but changes no other attributes mentioned in the same Technet
article.
Obviously another attribute to set but unknown what. AD is mixed mode.
Thanks in advance for any assistance. Tag: copy file Tag: 146909
Open File dialog
Hi,
Some days ago, I've posted a message to NG, a question about how to call a
windows OpenFile dialog, which McKirahan response it with a code example
(listed below).
Now, these example doesn't work well for me, because I need that valid
selection are only for files and not for folders.
And this example works fine if selected item is a folder, but if the
selected item is a file, the BrowseForFolder method return null.
Any suggestions or workaround???
Option Explicit
On Error Resume Next
Dim strBFF
Dim objSHL
Set objSHL = CreateObject("Shell.Application")
Dim objBFF
Set objBFF = objSHL.BrowseForFolder(&H0,"Open File",&H4031,&H0011)
strBFF = objBFF.ParentFolder.ParseName(objBFF.Title).Parent
WScript.Echo objBFF
Set objBFF = Nothing
Set objSHL = Nothing
WScript.Echo strBFF
Thanks.
M.- Tag: copy file Tag: 146892
VBScript Logon Script Error
When using the VBScript Join function to map users to folders based on
group membership, on some Windows 2000 computers I get a runtime error
on join and others I don't. If I remove the join function, the PC's
that didnt work, now work and the ones that did work with join no
longer work. I am confused. What am I missing?
Set wshNetwork = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
' strGroups = LCase(Join(CurrentUser.MemberOf))
' strGroups = LCase(CurrentUser.MemberOf) Tag: copy file Tag: 146888
WshShell issue with WScript
I'm writing code for a VB Script task in a SQL Server DTS
package. Snagged the following code to run a command line
app and want to use the bit where it uses WScript.Sleep to
wait until the executable has finished.
However, both in the DTS task and if I place the following
code in a VB standard .exe I get a run-time error when I
reference WScript.
What's going on? Note, the command line exe does get
called and does run.
Code:
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("path to .exe")
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status
Set oExec = Nothing
End Sub Tag: copy file Tag: 146882
Need to write script/batch file to delete selected files
I have a server that we use as a file repository for our daily reports.
The reports are *.txt files, all of them. They come from another domain,
and are "canned" reports that I have no control over.
Each day, we have up to 35-40 of these reports, and the naming convention
has been:
98129918.txt
where:
98 = year
12 = month
99 = denotes the Month End file, which I need to save
18 = unit reporting
The daily outputs the exact same naming convention, with the exception of
the third node (the 99 above) corresponding to the day of the month (00 to
31).
There are over 70,000 files in this directory, taking up 12 gigs on a hard
drive, so the function needs to be automated.
I need to write a script or batch file to save all of the xxyy99zz.txt
files, and to delete all of those not matching that filter from a date
beginning say around 1/1/2002. Anything prior to 1/1/2002 would need only
the month-end files (the ones with ____99__.txt naming), and anything after
that would need to exist until such time I modified the script to have
another cut-off date.
Anyone have any ideas as to how to accomplish this? I am not very fluent in
WSH.
You can respond via the newsgroup, but do not reply to the address, as it is
not valid thanks to the pounding of the Swen virus. Email me at
schathamNO@FREAKINGyahooSPAM.com remove NO FREAKING SPAM to respond....
Thanks
S Tag: copy file Tag: 146880
Need Files, HELP....
Question Title: Accessing Win32 API using vbscript
Author: Spidercide
Points: 500
Date: 11/10/2003 08:07AM MST
I am trying to use Win32 API's with vbscript. Specifically I am trying
to use FindWindowLike to see if I already have an instance of Excel
open. In my travels I have learned that you can not access Win32 API's
from vbscript(with good reason).
I know I have to create a secondary .ocx(control) file to enable me to
access the win API functionality.
I was looking around and I found a nice solution at
http://www.ahml.lib.il.us/pfw/VBS.html
He has a sample of how to do it, but it requires two other .ocx files
and these files are not supplied. He suggests buying a book "Windows:
Scripting Secrets" by Tobias Weltner and use the two .ocx files
supplied. Went and picked up the paperback, no CD no text copy of
files inside.
Does anyone know where i can get the two files(clipboard.ocx and
winmanag.ocx) from this book.
Thanks in advance. Tag: copy file Tag: 146866
Do Loop Help...please...
I'm using the Novadigm RADIA solution to deploy software throughout
my enterprise and I'm having a hell of a time with a Mass Deployment
script I wrote.
While deploying software to multiple machines I'd like the script to
recognize if a process is running (because if it is it will hang the
entire deployment) I tried to put another loop statement in my code
but I always get a runtime error requiring another Do. Basically, I'd
like the script to skip the machines on the list with the process
running and move onto the next machine. Right now I have it killing
the process
set objTextStream = objFSO.OpenTextFile("comps.txt", ForReading, true)
Set objFile = objFSO.OpenTextFile("results1.txt", ForAppending, true)
objFile.WriteLine "|SOFTWARE-------( << |+_+| >> )----------SLAM!|"
objFile.WriteLine Now
objFile.WriteLine APP_1
objFile.WriteLine "-----------------------------------------------"
Do While NOT objTextStream.atEndofStream
strTextLine = objTextStream.ReadLine
CompHost = (strTextLine)
Do Until RADPINIT = 0
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & CompHost &
"\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = 'RADPINIT.EXE'")
If colProcesses.Count = 1 Then
RADPINIT = 1
else
RADPINIT = 0
end If
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & CompHost &
"\root\cimv2")
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radexecd'")
For Each objService in colServices
errReturnCode = objService.StopService()
Next
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radsched'")
For Each objService in colServices
errReturnCode = objService.StopService()
Next
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radstgms'")
For Each objService in colServices
errReturnCode = objService.StopService()
Next
objShell.Run "%comspec% /c pskill \\"&CompHost&" radpinit&pskill
\\"&CompHost&" radskman&pskill \\"&CompHost&" radrexxw&pskill
\\"&CompHost&" nvdtray&pskill \\"&CompHost&" nmciutils"
objShell.Run "%comspec% /c pskill \\"&CompHost&" radpnlwr&pskill
\\"&CompHost&" radiamsi&pskill \\"&CompHost&" radconct&pskill
\\"&CompHost&" msiexec"
objShell.Run "%comspec% /c pslist \\"&CompHost
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radexecd'")
For Each objService in colServices
errReturnCode = objService.StartService()
Next
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radsched'")
For Each objService in colServices
errReturnCode = objService.StartService()
Next
Set colServices = objWMIService.ExecQuery _
("SELECT * FROM Win32_Service WHERE Name = 'radstgms'")
For Each objService in colServices
errReturnCode = objService.StartService()
Next
Loop
objFile.WriteLine CompHost&" - Pushing"
objShell.Run "C:\PROGRA~1\NOVADIGM\RADNTFYC " & CompHost & " WAIT
C:\PROGRA~1\NOVADIGM\RADSKMAN
CAT=PROMPT,ULOGON=N,MNAME=RADDBT3,DNAME=SOFTWARE,PORT=3464,UID=$MACHINE,IP=10.16.21.185,IND=N,STARTDIR=SYSTEM,CONTEXT=M,ADD=N,UPD=N,DEL=N,REP=N,VER=N",
1, TRUE
objShell.Run "C:\PROGRA~1\NOVADIGM\RADNTFYC " & CompHost & " WAIT
C:\PROGRA~1\NOVADIGM\RADSKMAN CAT=N,SNAME=" & APP_1 &
",ULOGON=N,MNAME=RADDBT3,DNAME=SOFTWARE,PORT=3464,UID=$MACHINE,IP=10.16.21.185,IND=N,STARTDIR=SYSTEM,CONTEXT=M,ADD=Y,UPD=Y,DEL=Y,REP=Y,VER=Y",0,false
loop Tag: copy file Tag: 146851
Problem with CopyHere and Windows XP
Hello
I have a problem with a simple script that should copy a folder.
The script works with W2K but on Windows XP nothing is copied.
dim wsshell
dim Target
dim Source
set wsshell = CreateObject("Shell.Application")
set Target = wsshell.NameSpace("E:\")
Source = "\\192.168.115.247\Backup\Backup*"
Target.CopyHere Source, FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR
set Source = nothing
set Target = nothing
set wsshell = nothing
'object.CopyFolder' instead works fine but I like to see a progress
dialog while copying.
I found a message <3C0C8F69.AFEF2133@hydro.com> that says Windows XP has
a bug processing wildcards. Can anyone confirm this.
TIA
Knut
--
Sorry, but I'm not very keen on spam
MyName: knut.beese
MyDomain: arcor.de Tag: copy file Tag: 146850
Client side form script
does anyone know a script i can use to send a form to an
email address without using a cgi?
any script or suggestions would be useful
thanks
Dave Tag: copy file Tag: 146846
scripting as a career
hi,
does anyone does scripting (wsh & wmi) as their career?
can share with me what's you job like?
thanks Tag: copy file Tag: 146844
Error 8 when creating process
Hello,
Here is the code:
errReturn = objWMIService.create("c:\RInstall.bat", null, null,
intProcessID)
If errReturn = 0 Then
wscript.Echo " Process started with ID : " & intProcessID
Else
wscript.Echo "errReturn: " & errReturn.
End If
I get errRetuen = 8 on many servers. What does error 8 mean?
Thanks,
Wensi Tag: copy file Tag: 146841
filtering security event log
I am trying to return a list of all security events with a "failure". I have
the following:
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Security)}!\\" & _
strComputer & "\root\cimv2")
Set wbemObjectSet = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent Where" _
& " Logfile = 'Security' and Type = 'audit success'",,48)
For Each wbemObject In wbemObjectSet
wbemObject.Message = Replace(wbemObject.Message,vbcrlf & vbcrlf,vbcrlf)
if (???? = "failure") then
if (x<200) then
Wscript.Echo "RecordNumber: " & wbemObject.RecordNumber
Wscript.Echo "EventCode: " & wbemObject.EventCode
Wscript.Echo "Message: " & wbemObject.Message
x=x+1
else
exit for
end if
end if
Next
The problem is... I can't figure out what to use for the ??? I listed in the
if statement.
Two questions: 1. What can I use for the ??? and 2. Where can I find a
listing of the objects used to access the security event log? I know it's
out there, I just can't find it.
Thanks. Tag: copy file Tag: 146836
ADO to Determine REQUIRED Field
Hi,
I have a need to use ADO to Determine If a Field Is a
REQUIRED Field in an Access Table.
The only example I can find is ISAUTOINCREMENT.
http://support.microsoft.com/default.aspx?scid=kb;en-
us;304100
Please help!
Thank You in advance,
t Tag: copy file Tag: 146832
outlook send mail
The script below sends e-mail messages taken from txt files using outlook com object .
Create your .txt file with
1) first line: destination e-mail address
2) second line: Subject
3) third line to end of file: body of the message.
All the txt files should be in the same directory
of the script.
The program tries to send the message if in the
first line finds a "@" and a dot, which could be
an e-mail address.
I hope comments in the code will help.
Giovanni.
(Aosta, Italy)
'<%
'Outlook SendMail.vbs
'Versione VBS di un programma già in Visual Basic 5, già modificato
'per l'uso con un oggetto COM e ora per appoggiarsi al modello ad oggetti
'di Microsoft Outlook
'Nella cartella corrente ci sono dei files txt contenenti messaggi di
'posta elettronica. Le prime righe di ogni file contengono rispettivamente :
'1) Indirizzo e-mail del destinatario
'2) Oggetto del messaggio.
'Le righe successive contengono il corpo del messaggio.
'Il programma utilizza l'oggetto COM di Outlook (non express)
'Apre ogni file e se è un messaggio (la prima riga contiene una "@"), lo invia.
'[c] Cenati Giovanni 08.06.02 nnever @katamail.com
'Modificato 19.09.03 per outlook
'This script looks for txt files in current (script) directory and
'if they are message files (with a valid e-mail address in the first line)
'sends the message using outlook (not express).
'The txt file must contain:
'In first line a valid e-mail address of the recipient
'In the second line the subject of the message
'From the third line to the end of file, the body of the message.
dim fso 'as filesystemobject
dim objOL 'as Outlook application
dim CartellaPosta
'oggetto directory dove ci sono i messaggi in formato testo
'Directory where to look for the messages.
dim Messaggi
'collezione di files in CartellaPosta. Collection of files in the folder.
dim FileMsg
'oggetto file trovato in CartellaPosta. Single file object in the folder
dim Messaggio
'file aperto in lettura contenente l'E-Mail. File openend to read the message
dim ContaMail
'numero di messaggi e-mail spediti. Number of sent e-Mails
'Crea istanza agli oggetti necessari al programma
'Creates needed objects
set fso = CreateObject("Scripting.FileSystemObject")
Set objOL = CreateObject("Outlook.Application")
'Ottiene la directory dove è situato script
'Retrieves script directory
ScriptFullName =wscript.ScriptFullName
CurrentPath = Left(ScriptFullName, InStrRev(scriptfullname, "\")-1)
'Recupera tutti i files della directory
'Sets folder where to look for messages and reads all files
set CartellaPosta = fso.GetFolder(CurrentPath)
Set Messaggi = CartellaPosta.Files
For Each FileMsg in Messaggi 'Processa ogni file della cartella
if ucase(right(FileMsg,4))=".TXT" then
'se è un txt... If it's a txt...
Set f = fso.GetFile(FileMsg) 'Ne recupera il nome
Set Messaggio = f.OpenAsTextStream 'Apre il file
'Legge le righe del file contenenti le intestazioni del messaggio e-mail
EmailDestinatario = Cstr(Messaggio.readline)
'Prima riga: indirizzo e-mail del destinatario
'First line: destination e-mail address
Oggetto = Cstr(Messaggio.readline)
'Seconda riga: Oggetto del messaggio
'Second line: subject
Body= ""
'Svuota la variabile e legge tutte le righe del corpo del messaggio.
'Empty the variable which will contain the body of the message.
Do While not Messaggio.AtEndOfStream
Body = Body & Messaggio.ReadLine & vbcrlf
Loop
Messaggio.Close 'Chiude il file contenente il messaggio
'Controllo validità dati. Control of e-mail address
'Se l'indirizzo del mittente non è una e-mail passa al prossimo messaggio.
if instr(1,EmailDestinatario, "@")>1 and instr(1,EmailDestinatario,".")>1
then
'Invia il messaggio. Sends the message
Set objMSG = objOL.CreateItem(0) 'Crea nuovo messaggio. Creates
new message.
With objMSG
.Subject = Oggetto
.To = EmailDestinatario
.Body = Body
.Send
End With
ContaMail = ContaMail +1 'Conta messaggi inviati. Counts messages
sent.
end if ' e-mail?
end if ' TXT?
Next 'File
Report = "Files: " & Messaggi.count & chr(13)
report = report & "Messaggi e-mail: " & ContaMail & chr(13)
report = report & "Fine Programma"
msgbox report ,,"Outlook Send Mail by Cenati Giovanni"
--
Giovanni Cenati (Aosta, Italy)
Write to user "nnever" and domain "@katamail.com" Tag: copy file Tag: 146827
Problem with the scriptomatic tool
If I am execute the Scriptomatic tool I will get the Message
Line 143
Error: The procedure could not be continued due to the folgennden error:
80041001
Does someone know where it comes from and what to to to solve it ?
Windows Xp Prof SP1
Axel Tag: copy file Tag: 146812
Remove account from Administrators group via script
First, an apology. This is my first attempt at what I think (hope) may be a
cross-post. (I'm not that familiar with posting to newsgroups so please
don't flame me if I've done it incorrectly. I've tried posting to a single
newsgroup but haven't found the info I'm looking for... hence this first
attempt to post to multiple newsgroups at the same time. I understand this
is the 'proper' way to ask in various newsgroups, all at the same time,
rather than send the same query to individual newsgroups.)
Second - my problem...
Our cloned PC's include a 'Change Clone' script that lets our PC installers
change the IP address, subnet mask, gateway, computername and workgroup via
popup input boxes. So far, so good.
I need to add "remove the 'Windows User' account from the 'Administrators'
group' " to the "Change Clone" script. Up to now I've used AutoIt ('cos I
don't know any other way). It works but I realise it's a kludge.
Can anyone point me in the right direction, via a VBS/WMI (or whatever)
script, how I can remove a 'Windows User' account [Power User] from the
'Administrators' group and leave it as a Power User?
I've trawled the 'Google' group archives but can't find anything relevant
(we use Novell - not MS - so ADSI scripts aren't the answer).
PS - Is there a more appropriate newsgroup for queries about large-scale
setups and deployment than microsoft.public.windowsxp.setup_deployment?
I've seen so may queries re: individual users losing MS Product ID's, etc.
and wondered if there was a 'commercial/industrial/organisational' newsgroup
I would be better off following. I mean no disrespect to individual users
but some problems are different for larger-scale setups and deployment.
Any help would be greatly appreciated.
Rick Tag: copy file Tag: 146811
Modify this script please
I found this nifty dual explorer script:
<--Script Start-->
set shellApp = createobject("shell.application")
set shell = createobject("wscript.shell")
shellApp.MinimizeAll
shell.run "explorer.exe c:/"
shell.run "explorer.exe c:/winnt"
wscript.sleep 3000 '<== adjust as needed
shellApp.TileVertically
<--Script End-->
Author: Michael Harris
What I would like to do is modify it so that when this script
executes, it will check if two explorer's are already open. I will
only be using 2 explorers tiled vertically at any given time.
Basically, here's the rundown on the scripting logic that I would like
but not sure if WSH or VBS can do this (Hope someone can make sense of
it):
function dualexplorer
Minimze All
open two explorer.exe
tile vertically
end function
Set X = explorer.window.count
if X < 2 then
close all explorer.exe windows
call function dualexplorer
end if
if x = 2
minimize all
bring both explorer windows to front
tile vertically (in case is has been moved)
end if
if x > 2
close all explorer.exe windows
call function dualexplorer
end if Tag: copy file Tag: 146809
Html page running processes
From an html page I want make a Menu with 3 options by 3 anchor tags:
open a pdf file, run Notepad.exe or run Setup.exe.
Can I override the warning messagge appearing from the exe files?
Regards
Sandro Tag: copy file Tag: 146807
Using JScript from VBScript (most cruelly)
Just woondering whether anyone has done any significant experimentation with
using very simplistic wrapups of JScript objects to access them almost
directly from VBScript, like in the following WSF example.
If anyone has, are there any intriguing uses people have found for this
(other than making Mr. Hickman laugh, that is <g>)?
===============================================
<?xml version="1.0" encoding="ISO-8859-1" ?>
<job>
<script language="JScript"><![CDATA[
function jsArray(){return(new Array());};
function jsBoolean(){return(new Boolean());};
function jsDate(){return(new Date());};
function jsFunction(){return(new Function());};
function jsGlobal(){return(new Global());};
function jsMath(){return(new Math());};
function jsNumber(){return(new Number());};
function jsObject(){return(new Object());};
function jsRegExp(){return(new RegExp());};
function jsError(){return(new Error());};
function jsString(){return(new String());};
]]></script>
<script language="VBScript"><![CDATA[
Set a = jsArray()
for i = 1 to 10
WScript.Echo a.push(i)
next
do while a.length > 0
wscript.echo a.pop()
loop
]]></script>
</job> Tag: copy file Tag: 146806
Zipping Folders from Script
I'd like to be able zip a folder from script. I found this article:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/scrguide/sas_fil_tbch.asp
This addresses "compressing folders to save disk space." Cool, but
not what I"m looking for. I want to take a folder, and generate a
single file with a "zip" extension.
Since I can right-click on a folder and say "Send to Compressed File,"
I have a feeling it's possible from code. For the record, I
investigated that icon in the SendTo folder, but I couldn't see
anything that would help me.
Deane Tag: copy file Tag: 146805
Access "Date Picture Taken" Property
Is there a way to use VBS to return the property that
appears in the 'My Pictures' folder? The property in
question is listed when you select 'details' and is
denoted in the column headers as "Date Picture Taken".
Thanks in advance,
Abe Tag: copy file Tag: 146795
Listbox asp .net
Hello, I am trying to create a list box in asp into which
I can load the values dynamically(The user will enter a
value and based on that the list box is populated). For
some reason it does not allow me to do this:
Listbox1.items.add
Is there another way to add values dynamically to a list
box using vbscript in asp?
Thanks,
Sean Tag: copy file Tag: 146771