I ended up using this:
Set FSys = CreateObject("Scripting.FileSystemObject")
if Not FSys.FileExists(FSys.GetSpecialFolder(0) & "\file1.exe") Then
oAppInstalled = "Was Not Found"
Else
oAppInstalled = "Was Found"
End If
I am creating another version of this with this code:
Set FSys =...
Oops! I spoke too soon. The problem I am still having is that I cannot define the variable to the windows system folder (WinXP). I have tried this code:
Set FSys = CreateObject("Scripting.FileSystemObject")
If Not FSys.FileExists("%SYSTEMROOT%\file1.exe") Then
oAppInstalled = "Was Not Found"...
Don't mind my asking, but why wouldn't you create a GPO that sets this as a logon script for each user instead of pointing each users login script path in the user object to a script file? That is the beauty of GPO's in Active Directory.
I need some help with a little project I dreamed up (gotta love those). I want a login script to check each users machine that logs in and see if a particular application exists on the machine, and then emails me the machine name, username and if the application is installed or not. Can anyone...
Okay VBScript gurus, another quandry for you. I have a login script that runs and gives popup confirmation messages on successful drive mappings. What I would like to know is does WSH allow you to block the popup windows at the workstation level? I want the users to get the login script, but...
I spoke too soon. This is EXACTLY what I needed. I did some modifications for my environment, added the username objectys I needed, and VOILA! It works like a charm. You are the man! My eternal gratitude is yours.
I am not sure if this is exactly what I was looking for. Let me clarify what I was hoping to accomplish. I wanted to put a login script for each user that ran and reports their Username, Machine Name and then emails that information to a specified email address. It does not need to report...
VBScript experts, tell me if this can be done. I want to pull the logged on users name and machine name with this code:
'This will print to the screen what the currently logged on users name is'
Set WshNetwork = WScript.CreateObject("WScript.Network")
WScript.Echo "Username: " &...
I'm sorry to bring this post backup to the front after I had got the info I needed, but this last issue is really perplexing me. I am just too new at VBS and WSH to know how to accomplish this. PHV, you seem to be THE expert. Any chance you can throw me a bone on this one. I want to learn...
I have the following code. Could this be incorporated easily?
For Each GroupObj In UserObj.Groups
Select Case GroupObj.Name
'Check for group memberships and take needed action
Case "B"
WSHNetwork.MapNetworkDrive "j:", "\\server\groups\B",True
End Select
I have one more issue I am hoping to get help with. If I want to map the J drive to a folder based on the logged in users groups they belong to. I.E. If the user belongs to group B, map the J drive to \\server\groups\B
Is this something that could be easily accomplished. I would love to...
PHV,
The code below is what I am actually using and it works quite well. The above posted code had some extraneous code that would break it. I assure you this portion works because I have it up and running on WinXP and Server 2003 as we speak. The little tweak I need is to map that P drive...
I made one Faux Pas. The section that says
'TEST SECTION
Dim objNet, strUserName
Set objNet = CreateObject("Wscript.Network")
strUserName =objNet.UserName
is in here incorrectly. I am not using that. I pasted the wrong version.
Can someone look at this for me and tell me how to accomplish the following. I want the script I have pasted in here to map the users P drive to their home folder(I tried using %username% but that of course didn't work), but I have had nothing but errors trying it myself. Anyone feel like...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.