Check username contents
Hi,
I want to write one vbscript where I can check username contents. If username contains giona-admn then i should be able to trigger installation. I can read username but I am not able to put a code to check it's contents.
please guide.
I want to write one vbscript where I can check username contents. If username contains giona-admn then i should be able to trigger installation. I can read username but I am not able to put a code to check it's contents.
please guide.
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
anonymous_9363
14 years ago
Posted by:
abking99
14 years ago
for example if my username starts with giona-admn then only i want to trigger installation. In below script, every time it aborts, even if my username starts from giona-admn. If I am giving full username hardcoded, like giona-admn-02563, then only it installs, same kind of problem I am facing while wise script as well.
Dim objNetwork
Set objNetwork = CreateObject("WScript.Network")
strUserName = objNetwork.UserName
MsgBox strUserName
If LCase(strUsername) = "giona-admn" Then
'// Do stuff here
msgbox "install"
Else
'// Do something else here
msgbox "abort"
End If
Posted by:
anonymous_9363
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.