Solved

Environment Variable from Novell

Posted on 2013-02-04
4
916 Views
Last Modified: 2013-02-06
Hi Experts!

I have a tough one I've been pulling my hair out over for the past few days. So a little background, we have some Novell 6.5 servers that we have been slowly migrating away from for the past year. We're nearing the end of the migration and we ran into an odd problem. When we turned off the Novell login script printing from our internal ERP program stopped functioning. This program was built in house, and was originally designed for Novell but over the years has been migrated to a Windows platform. Everything has been moved to Windows and has been functioning fine for weeks until we disabled the script. We played with the script and were able to isolate the problem to a single line that is responsible:
SET OS      = "%OS"
Somehow printing is using this variable to execute the print command. The problem is this program is very old and difficult to troubleshoot and even worse to repair so we've been trying to replicate this command in windows but here is where the question comes in. Novell only seems to set this variable on a per session basis and if you don't use the Novell login script the variable defaults back to the original. (Original in Win7 is Windows_NT, after Novell script is WINNT) It's not changing the OS variable under Environmental variables or in any registry keys I can find so first question is where is this change being made? Second, is there a way to set an environmental variable for just a single session and not machine wide? We've found that if you use the SET command in a command prompt we can get the same result but it's only within that command prompt session, once you close the window and launch a new one the variable is gone. And we've played with SETX but you're only able to set user variables with that commad, not system variables.

Any help or insight you guys can provide would be appreciated!
Here are some extra details to help avoid some of the generic questions:
1) Workstations are Windows 7 Pro with all current updates
2) Novell server are Novell 6.5
3) Windows domain is all server 2003
Thanks!
0
Comment
Question by:Aero_Admin
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
deroode earned 500 total points
ID: 38854060
The Novell login script runs before explorer.exe runs, and the environment variables it sets are not stored. In the same manner I would presume that setting an environment variable in the startup script would be similar, but i currently cannot test.

Furthermore: if %OS% is WINNT for the whole duration of a windows session, what is the disadvantage of setting the OS variable in the registry to WINNT?

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
OS="WINNT"
0
 

Author Comment

by:Aero_Admin
ID: 38855471
Thanks for the reply! That's the direction we've been heading in our testing but my only concern is would changing the machine OS variable via that registry key have any other adverse effects on the machine? Ie...problems with software installs, wrong OS being seen by various programs etc.

We have found in our testing that changing that key does correct the problem but like I said, I'm weary of changing it just due to unforseen consequences. Does anybody know if changing it would cause any problems?
Thanks
0
 
LVL 19

Expert Comment

by:deroode
ID: 38858970
The environment variable OS has been Windows_NT since windows NT; i cannot imagine any program using that variable to determine the os version;
Besides, when you change the environment variable "OS" systemwide from a startup or login script that will basically have the same impact as changing it through the registry.
Could you try to test setting the OS variable through the startup script?
0
 

Author Closing Comment

by:Aero_Admin
ID: 38859889
We went along the same lines as your solution. We found that we could create a user variable for the OS that was being read over the system variable. This way the system variable stays intact and unchanged while the user variable gives us the result we needed. Thanks for your help!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now