![]() | Register | FAQ | Members | Social Groups | User Map | Calendar | Search | Today's Posts | Mark Forums Read |
| | | LinkBack | Thread Tools | Search Thread | Language |
| Sponsored Links |
| | #1 |
![]() | For our astrophysics course a teacher has requested the installation of Stellarium [1]. This in itself is not a problem but it appears the software doesn't automatically create its user directory unless the user is an administrator - clearly no good for students. Has anyone had the same problem, and solved it (short of manually creating the user directories for each user)? We're using Windows Server 2003 to store the students' home areas and Windows XP Pro as the client operating system. [1] Stellarium.org Thanks in advance, Jonathan Haddock Network Manager (and Webmaster) Barton Court Grammar School |
| |
| | #2 |
![]() Join Date: Dec 2005 Location: Norfolk
Posts: 4,274
Thanks: 30
Thanked 102 Times in 101 Posts
Rep Power: 33 | Just run a login script: if not exist h:\stellararium mkdir h:\stellararium Or something? Ben |
| |
| | #3 | |
![]() | Hi Plexer, Thanks for your response - I hadn't considered a logon script (which is unusual for me) and that is indeed the solution I'm going with. On my network at least, although I think it's the general ruling, you cannot give a .bat or .cmd as a logon script - it has to be something that uses the WSHost (VB Script for example) so I've found a script that does the same here [2]. I've pasted my code below, slightly modified over the original link. Hope this is useful to someone else! Code: Public objFSO
Sub Main()
Set objFSO = CreateObject("Scripting.FileSystemObject")
Call
GeneratePath("H:\StellariumUserData")
End Sub
' ---------------------------------------------------------------------
'* @info Generate a folder tree from the path
'*
'* @param (String) Path
'* @return (Boolean) Folder Exists: Recursion continues (Y/N)
' ---------------------------------------------------------------------
Function GeneratePath(pFolderPath)
GeneratePath = False
If Not objFSO.FolderExists(pFolderPath) Then
If GeneratePath(objFSO.GetParentFolderName(pFolderPath)) Then
GeneratePath = True
Call objFSO.CreateFolder(pFolderPath)
End If
Else
GeneratePath = True
End If
End Function
Call Main
Quote:
[2]Stellarium User Guide | |
| |
| | #4 |
![]() Join Date: Apr 2008 Location: glasgow
Posts: 921
Thanks: 91
Thanked 37 Times in 27 Posts
Rep Power: 13 | |
| |






