jonathanhaddock Posted October 15, 2008 Posted October 15, 2008 Hi everyone, 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
plexer Posted October 15, 2008 Posted October 15, 2008 Just run a login script: if not exist h:\stellararium mkdir h:\stellararium Or something? Ben
jonathanhaddock Posted October 27, 2008 Author Posted October 27, 2008 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! 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 You also need to ensure you adjust the parameters passed to Stellarium via its shortcut to include the user directory, see the Stellarium User Manual[2]. Example below: "C:\Program Files\Stellarium\stellarium.exe" -u "%HOMESHARE%\StellariumUserData" [1]Create folder in vbscript [2]Stellarium User Guide
RabbieBurns Posted October 27, 2008 Posted October 27, 2008 uling, you cannot give a .bat or .cmd as a logon script - it has to be something that uses the WSHost (VB Script for example) all our login scripts are .bat files
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now