#16
|
||||
|
||||
If you want to pursue the "execute batch script during user logon process" approach, here are a few links:
http://www.winnetmag.com/WindowsScripting/Article/ArticleID/20502/20502.html http://www.computerperformance.co.uk/Logon/logon_scripts.htm http://support.microsoft.com/default...NoWebContent=1 http://www.experts-exchange.com/Operating_Systems/Win2000/Q_20781573.html Hope this helps, Claus |
#17
|
|||
|
|||
Claus,
That command does set the variable, but like you suspected, too late in the load. what if I set up a routine in the corp sd_customize that checked if the SDUSERCUSTOMIZEDIR was set. If yes continue if no set it permanently and restart OSDM or gracefully crash ? I think a 3rd party setenv would set it permanently, or setx in the res kit maybe. This has become a challenge at this point. Still having fun though. Oh yeah Im triing to avoid the login batch approach. |
#18
|
|||
|
|||
Quote:
I'm not sure why you want to change this variable, but you could try to assign a new value to ui::*corp-ui-cust-dir*. This might work, but I can't guarantee this. Cheers, Markus |
#19
|
||||
|
||||
If setting the environment variable in the customize files is too late, you can try to start OSDM with a -bootform script. Add the -bootform option in the command line for OSDM (you will have to modify the shortcut for this) and have it execute the putenv LISP code. The downside of this approach is that you will have to change the shortcuts on all systems where OSDM is installed, and that's probably not an option for you, either.
There doesn't seem to be silver bullet solution for this in your situation, or at least it hasn't occurred to me yet (ideas welcome). Most people trying to centralize their users' profile settings probably simply use roaming profiles which is a general OS mechanism meant to address exactly this problem. However, roaming profiles require a pretty homegenous setup on all systems using them. But then, I never tried to use roaming profiles before, so there might be interesting configuration options for Windows administrators to fine-tune them for your needs. Claus |
#20
|
||||
|
||||
Hello Mike,
You could use a VBScript placed in the users C:\Documents and Settings\username\Start Menu\Programs\Startup folder so that when the user logs in it would run automatically. I wrote one that works great it writes into the system or users environment a SDUSERCUSTOMIZEDIR variable set to C:\username\sd_user folder and I then wrote a user_customize file the just displayed a message box. I will include the VBScript called UserName.txt, just rename it to UserName.vbs and run it. The script has the code for placing the variable in either the system or user environment. I hope this helps. Cheers Thom |
#21
|
||||
|
||||
Forgot to post the file, here it is.
Cheers Thom |
#22
|
||||
|
||||
Quote:
Another option would be to start Modeling with a batch file which sets the variable then calls the standard startup executables. You can then modify the shortcut which starts Modeling to run the batch file. A simple batch file would be something like: Code:
set SDDIR=C:\Program Files\CoCreate\OSD_Modeling_12.0.0.8 set SDUSERCUSTOMIZEDIR=\\servername\common\OSDM\%USERNAME% chdir /d %SDDIR%\binNT "%SDDIR%\SD.exe" "%SDDIR%\binNT\SolidDesigner.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
__________________
John Scheffel |
#23
|
||||
|
||||
you can put a BATCH file into c:\document_and_settings\<user>\startmenu\program\autostart
this batch might contain something linke set SDUSERCUSTOMIZEDIR=somewhere\%USERNAME%\.... hmmm.. will this work? at least this is working for me to do a subst command. . but I fear that this ENV variable is again only valid for this (temporary) dos shell.. Just an idea.. may be the more modern versions of windows have somthing like an 'export' in their dosshell? |
#24
|
|||
|
|||
Wolfgang, John, and Thom,
Thanks for the latest suggestions. I am going to do my best to avoid revisiting (physically or remotely) all of the seats to set this up. I like to exploit my the most convient approach which a little bit of exported/imported registry has allowed me to do w/ the SDCORPCUSTOMIZEDIR. That is all in place and it is great when I can just plug something new in and everyone gets it on the next session. Cant argue w/ that. Sooooo........ Does anyone know the OSDM command that would allow me to kick off a batch file on startup of OSDM. IF var is set, continue else I will use this command to run a bat that will perm set the var Then command (exit) to shutdown and relaunch the OSDM session. I think this is worth a try. So anyone know the command that accesses win2000 commands from within OSDM? THANKS A TON FOR ALL THE INTEREST AND TIME. Mikeb |
#25
|
||||
|
||||
Once again, setting an environment variable from a batch file which you start from OSDM will NOT change OSDM's environment, i.e. your copy of SDUSERCUSTOMIZEDIR will NOT change.
For this reason, I don't think it will help you much to know that the official Integration Kit function to start external commands is (oli:sd-sys-exec "somecmd"). Claus |
#26
|
|||
|
|||
Thanks,
Actually, Thom's vb scipt should work. Thom, do you know of a way to force windows to reread it's env so that the user does not need to logout/in?? I will set the var , if it is not already, and force the session to close. The var will be picked up as soon as the user launches the follow-up session. Worst case the user will need to logout/in in order to pick up the new SDUSERCUSTOMIZEDIR. (if (equal (oli:sd-sys-getenv "SDUSERCUSTOMIZEDIR ") nil) [(display "setting SDUSERCUSTOMIZEDIR, please relaunch session") (oli:sd-sys-exec "Thom's VB") (sleep 5) (exit)] (display "already set")) 2 things about the above: 1. How do you say 'if (not equal ( xxxxx' in LISP or is the 'nil' thing an OK approach for the var not being set. 2. I get errors running mult command in the 'then' statement. suggestions? Thanks everyone . Mike Boswell |
#27
|
||||
|
||||
To force a system-wide update of environment variables, you need to fire the WM_SETTINGCHANGE event (in broadcast mode). See http://msdn.microsoft.com/library/en-us/wceui40/html/cerefWM_SETTINGCHANGE.asp and http://msdn.microsoft.com/library/en-us/dllproc/base/environment_variables.asp for details.
For your LISP questions, check the Common LISP reference manual at http://www.lispworks.com/reference/HyperSpec/ or the LISP introduction at http://psg.com/%7Edlamkins/sl/contents.html. There is also a short introductory text on LISP in the Integration/Developer Kit documentation which is installed along with OSDM. Claus |
#28
|
||||
|
||||
VBScript
Hello Mike,
Glad the VBScript worked. If you have the VBScript set the user environment variable the user will not need to log out and in again to have it set. Normally user variables take as soon as they are set, unlike system variables that require a re-boot. You can also write a checking routine in the VBScript to check to see if the variable is set or not. Also as far as single point customizations and administrations go, you can place the VBScript on a shared access drive and copy a shortcut of it in to the users C:\Documents and Settings\username\Start Menu\Programs\Startup folder. This way if you want to make a global change you can and the shortcut will pick it up as soon as you save the changes. Hope this helps Happy Holidays Thom |
#29
|
|||
|
|||
So here is what Ive got:
In the SDCORPCUSTOMIZE sd_customize: (if (equal (oli:sd-sys-getenv "SDUSERCUSTOMIZEDIR") nil) (oli:sd-sys-background-job "\\\\server\\users\\me_common\\vicor_cust_nt\\corp_cust\\run_user_cust.bat")) (if (equal (oli:sd-sys-getenv "SDUSERCUSTOMIZEDIR") nil) (exit)) In the SDCORPCUSTOMIZE directory: run_user_cust.bat --> bat consists of: \\serveri\users\me_common\vicor_cust_nt\corp_cust\username.vbs \\server\users\me_common\vicor_cust_nt\corp_cust\SD_shutdown.html It works like this: -user kicks off SD session. -SDCORPCUSTOMIZEDIR sd_customize checks if SDUSERCUSTOMIZE var is set. -if set (life goes on) -if not set runs Thom's vb script setting var -exits SD -shows an html message explaining what happened. The user must log off log in to windows to pick up the SDUSERCUSTDIR. Also, any local custs must be copied to the SDUSERCUSTDIR. This will allow users to travel w/ their custs. (ie conference rooms, other PC's) Last edited by MikeBoswell; 12-23-2003 at 09:20 AM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|