Solved

Environment Variable from Novell

Posted on 2013-02-04
4
903 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Article by: Lee
Windows 7 Ultimate and Enterprise (and 2008 R2) introduced a new feature you may not be aware of - Boot from VHD.   Boot from VHD (or what Microsoft refers to asNative Boot allows you to install Windows to a VHD (Virtual Hard Disk) file that is t…
First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

705 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

20 Experts available now in Live!

Get 1:1 Help Now