1> Save the OSMODE system variable to a file. (could be used for other system variables):
^C^C^P(progn(setq OSFILENAME (open "u:/acad2000/SavedOSnap.txt" "w"))(write-line (itoa (getvar "osmode")) OSFILENAME)(close OSFILENAME)
2> Extract the OSMODE system variable from a saved file.
^C^C^P(progn(setq reados (open "u:/acad2000/SavedOSnap.txt" "r"))(setvar "osmode" (atoi (read-line reados)))(close reados))
^C^C^P(setq currentlayer(getvar "clayer"));LAYISO;\;-LAYER;C;\;^CRS;(setvar "clayer" currentlayer)
^C^C^P(command "menuunload" "Menu Group Name" "_.menuload" "Menu File Name.mnu")