[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 505
  • Last Modified:

Welcome Script

Hi,

I'm super new to VB.

Could you spare me a simply VB script whereby after the user logons into the domain from his pc, he gets the welcome pop windows screen (e.g., welcome to Cafee domain).

I need a basic script that does the job....the simplier the better???

I have a feeling it may not be simply as it sounds from the above?

Appreciate your help.
0
mcse2007
Asked:
mcse2007
  • 8
  • 3
  • 2
  • +2
3 Solutions
 
conagramanCommented:
you can use a javascript alert box
put the javascript tags and function in your head section of your html
then in the body tag call the function in the onload event.


<html>
<head>
<script type="text/javascript">
function show_alert()
{
alert("Welcome to Cafee Domain");
}
</script>
</head>
<body onload="show_alert()">
</body>
</html>
0
 
mcse2007Author Commented:
That looks impressive but not sure how where to put it.

I'm looking for a simply VB script, either create a batch file to call up the VB script so that when the user logon to the domain from his pc,  he gets a small pop windows screen that says "Welcome to Cafee Domain".

I hope I have not guided you to the wrong path?
0
 
Mike KlineCommented:
There is a group policy that you can use for this

Interactive logon: Message text for users attempting to log on

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/578.mspx?mfr=true

You can use that and link the GPO to the computers.

Thanks

Mike
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
conagramanCommented:
here is an example of the code above. let me know if this is/is not what you need.
popup.html
0
 
mcse2007Author Commented:
@ mkline71, yes I thought about this GP but the pop screen should appear right after not before the user logons on.

@ conagraman, thanks for the script. I'm referring to a domain (e.g. active directory). That is, when a user logged into a domain, a particular script that you can link with the NETLOGON from the AD server either with a batch file or VB script. But, I appreciate your demo.
0
 
RobSampsonCommented:
If you want a *really* simple one, just assign a VBS script at Logon with

MsgBox "Welcome to Cafee domain"

Or, if you want something slightly more personal

Set objADSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objADSysInfo.Username)
MsgBox "Hello " & objUser.DisplayName  & vbCrLf & "Welcome to Cafee domain."

Regards,

Rob.
0
 
mcse2007Author Commented:
@ Rob Sampson:

Should I just copy the slightly more personal script into notpad, save it as logon.vbs.

Copy the logn.vbs into \\server\netlogon

From active directory users and computers user's property, include the logon.vbs ?
0
 
mcse2007Author Commented:
@ Rob Sampson: That worked beautifully.

But how can I make it stay for approximately 2 sec before the screen disappear?

At the moment, the welcome screen pops up but it stays open uintil you press the OK button to close it.
0
 
rejoinderCommented:
To make the popup last for a few seconds you can use this.  The number at the end of line 4 sets the seconds to display.
Set objADSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objADSysInfo.Username)
Set WshShell = WScript.CreateObject("WScript.Shell")
result = WshShell.Popup("Hello " & objUser.DisplayName  & vbCrLf & "Welcome to Cafee domain.", 2)

Open in new window

0
 
mcse2007Author Commented:
Excellent, thanks rejoinder

Could you please rewrite the script and make Title Bar up the top where it says Windows Script Host, solid dark blue?

At the moment, when the Windows Script Host screen pops, the entire screen is GREYED out.

I just want to make the screen sort of ACTIVE.....For instance, it should look active when the Windows Script Host screen appears, the colour of the Title Bar up the top should be DARK blue.

Thanks heaps
0
 
rejoinderCommented:
Try changing line 4 to this...

result = WshShell.Popup("Hello " & objUser.DisplayName  & vbCrLf & "Welcome to Cafee domain.", 2, "Welcome", 64)
0
 
mcse2007Author Commented:
It didn't made much difference after alterning line 4 with the amended script. It would have been nice if the Window Script host screen looks ACTIVE instead of has  a GREYED out appearance.

It flashes for a brief moment that it is ACTIVE (ie Solid Blue top bar) then it turns GREY completely before the screen disappears.
0
 
mcse2007Author Commented:
Thank you
0
 
mcse2007Author Commented:
One last thing, at the moment, the Welcome to Cofee domain is LEFT indented.

How can I position the Welcome to Cofee domain in the MIDDLE of the Windows Script Host screen?

0
 
rejoinderCommented:
I'm sorry to say this but there are no formatting options available when using that particular popup box.
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

  • 8
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now