Jump to content

Recommended Posts

Posted

I would like to put some information in the active desktop HTML page for pupils and staff I've got the usual shortcuts on it for helpdeskm room and resource booking but I'd like to display the username and computername as well does anyone know how this is done? I used to have some code somewhere but I can't find it now and it's been so long I can't remember what I did lol I know for a fact I couldn't get rid of the activex control ok cancel dialogs that came up does anyone else know how?

 

Thanks

 

Wes

Posted

You could use BGInfo.

 

I use it for this exact purpose and it is really easy to setup.

 

First create a shared folder which the students have read and execute permissions on and put the BGInfo executable into it.

 

Next and the following to the logon script you have for the students:

 

[script]

net use y: \\SERVER\BGInfo

 

y:\bginfo.exe \\DOMAIN\SYSVOL\DOMAIN\scripts\students.bgi /timer:0

 

net use y: /del

[/script]

 

What this will do is is map a drive at logon execute BGInfo.exe and then remove the mapped drive.

 

All you need to do then is configure the desktop to display what you want, I have named mine students.bgi and place it in the path above.

 

NOTE: you need to replace SERVER and DOMAIN with your own

 

See attached screen cap of our desktop

 

BGInfo can be found here http://www.sysinternals.com/Utilities/BgInfo.html

Posted

I do like that! I'll have a play around and see what I can do. I think the only downside is the fact I can't have HTML shortcuts on the page.

 

Thanks

 

Wes

Posted

When you say HTML shortcuts you mean standard web based html links if this is the case then you can as the page itself renders as a html page.

 

Have a play with the BGInfo GUI there are a lot of settings you can use, the actual desktop background is pushed out via bginfo as well.

Posted
Thanks for pointing this out ICTNUT I think I will be using this very soon, it looks very good. Would it be possible to show temp of the processor etc with this?
Posted
Would i just run that on top of my own HTML background then?

 

Wes

 

Tried that, doesn't seem to work?

 

Great app btw! :D

Posted

2 sites I would recomend are :

 

http://www.codeproject.com/vbscript/userinfo.asp?df=100&forumid=2686&exp=0&select=515867

 

Obviously you would replace the msgbox with document write as per this article on w3schools :

 

http://www.w3schools.com/vbscript/vbscript_howto.asp

 

so it would be something like the following ( obviously with all of your other a href links or shortcuts ( or whatever you want to call them )

 




<br />
document.write("Hello from VBScript!")<br />
<br />
Dim objNet<br />
On Error Resume Next <br />
<br />
'In case we fail to create object then display our custom error<br />
<br />
Set objNet = CreateObject("WScript.NetWork") <br />
If  Err.Number <> 0 Then                'If error occured then display notice<br />
	MsgBox "Don't be Shy." & vbCRLF &_<br />
               "Do not press ""No"" If your browser warns you."<br />
	Document.Location = "UserInfo.html"	  <br />
                                        'Place the Name of the document. <br />
	                                'It will display again<br />
End if<br />
	<br />
Dim strInfo<br />
strInfo = "User Name is     " & objNet.UserName & vbCRLF & _<br />
          "Computer Name is " & objNet.ComputerName & vbCRLF & _<br />
          "Domain Name is   " & objNet.UserDomain<br />
Document.Write(strInfo)<br />
	<br />
Set objNet = Nothing                    'Destroy the Object to free the Memory<br />
<br />


let me know how that goes

Posted

That does work extremely well although it does ask to allow and activex control to run and I don't think there is any way round this :(

But it is a nice piece of code I may have to look at another way round it though.

 

 

Wes

Posted

Okay found this over at: http://www.osnn.net/articles.php?action=show&showarticle=47#programlaunch

 

 

------------------------------------------------------------------------------------------

Please note that if you are running any antivirus program, such as Norton AntiVirus ("NAV"), you may encounter a "Malicious script detected" alert. The reason you will see this warning is because antivirus software, such as NAV, flags such files as a possible virus. You will receive this warning for each and every shortcut you setup. If you are running NAV, you can simply select "Authorize this script" from the drop down box and select "OK" and you will not be flagged again for this link.

 

This next tweak is a big one. You may notice an ActiveX warning. Well, let's get rid of that annoying warning. First we need to add the "My Computer" security zone to your Internet Options: Security tab.

- Run regedit

- Navigate to: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0

- Set "FLAGS" dword value to 47

- Close regedit

- Launch Internet Explorer

- Select the "Tools" menu

- Select "Internet Options"

- Select the "Security" tab

 

You will notice that you have a "My Computer" security zone (if not, reboot and try relaunching Internet Explorer). Now configure your "My Computer" security zone.

- Highlight the "My Computer" zone icon

- Click "Custom Level"

- Under "ActiveX controls and plug-ins", change "Download signed ActiveX controls" to "Enable"

- Change "Download unsigned ActiveX controls" to "Enable"

- Change "Initialize and script ActiveX controls not marked as safe" to "Enable"

- Change "Run ActiveX controls and plug-ins" to "Enable"

- Chnage "Script ActiveX controls marked safe for scripting" to "Enable"

- Click "OK"

- Click "Apply"

- Click "OK"

 

After doing so, you will not receive any ActiveX control warnings for local files. Please note that making the above changes will not affect files located on the web (such as files on the OSNN.net website). All websites on the Internet use the "Internet Security Zone", not the "My Computer Security Zone".

 

------------------------------------------------------------------------------------------

 

 

Wes

Posted

There is this way as well :

 

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _

& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colComputer = objWMIService.ExecQuery _

("Select * from Win32_ComputerSystem")

For Each objComputer in colComputer

x = split(objComputer.UserName,"\")

Wscript.Echo x(1)

Wscript.Echo objComputer.Name

Next

 

Which uses WMI as apposed to wsh. The other way I can think of would be to read the registry and get the values from the registry, obviously you would need to find out where the relevant registry keys are.

Posted

I've found another nice way of implementing it too without the registry edits

If you use GPO you can add and item to the desktop if you create a page on your local intranet page displaying all the info you want it will work quite well just need to work out a few things such as how to get it across the entire screen but there are quite a few ways round this thankfully!

 

Thanks Everyone!!!!

 

Wes

  • 2 weeks later...
Posted

Sorry to bring this post back to life but having redirected my Application Data I get a 429 error when running gecko's script bnut not when redirection is off!

 

Any ideas?

 

Wes

Posted

Hi guys,

 

Sorry have not checked here for a while as it has been a bit busy towards the end of term, anyhow in reply to:

 

 

Buzzard: Would like to know more about the "check my Quota"

 

 

and

 

 

Mark: What's that 'check my quota' shortcut Ozan?

 

 

I do not use MS in built quota stuff as I feel it is not flexible enough so I bought a bit of software called SpaceGuard available at http://www.tools4ever.com/products/spaceguard/ and I believe I got it for £360

 

It is a really nice bit of kit as you simply create your quota profile i.e. 20mb hard drive space, pop up at 50%, email at 80%, revoke access at 100%, and then apply it to your folders.

 

Now if you cahnge your quota it updates realtime to all flder that have the quota applied to it but the really neat thing is controlling what users can store by simply specifyinh the banned file extensions and hey presto no more MP3's ;-)

 

It comes with a free client tool, deployed via hidden network share, which allows users to check thier quota, after 4 months of putting it in no more storage nightmares.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...