Problem in running .vbs as loginscript
There is an executable on my site that will allow you to run Vbscripts WITHOUT invoking it from a batch file. You can find it in the downloads section.
Clarence
Check it out
http://cwashington.netreach.net
Win32 bit scripting. Everything you need to get up and running,
A script repository containing almost 100 sample scripts,
downloads, reference files, and technical support via an
online discussion forum.
(Pursuant to US Code, Title 47, Chapter 5, Subchapter II, 227, any and all
unsolicited commercial E-mail sent to this address is subject to a download
and archival fee in the amount of $1000 US. E-mailing denotes acceptance of
these terms.)
Need help w/ VBscript here are some problem I'm having difficulty with:
a) How do you run a .vbs file as a login script. I installed the wsh on
the NT workstation,
copied the .vbs file in the winnt\system32\repl\import\script of my
BDC, and modify my
user profile to include the .vbs script I created. When I try to
login its not running the .vbs
file.
b) How can I check if a user belongs to a particular group? I tried the
following but I think
I'm missing something:
Dim usrName
Dim objGroup
Dim WshUsrEnv
Set WshUsrEnv = WshShell.Environment("User")
Set usrName = WshUsrEnv("USERNAME")
Set objGroup = GetObject("WinNT://Domain/group")
if objGroup.IsMember("WinNT://Domain/" & usrName) Then
Else ......
end if
c) Last problem I'm having: Is there a way of getting the network subnet
via VBscript?? I found some code in getting the IP address, but how do
you truncate the string? I'm only interested on the subnet (Ex. IP =
192.168.84.92 the number I'm interested in is 84) I want to compare
different subnet, so the script will run just on a particular subnet
Please Help...thanks
joey