[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

356.0. "Change VMS version string - alternative to PATCH" by FALEK::FALEK (ex-TU58 King) Wed Nov 19 1986 21:54

The following program is sometimes useful for temporarily changing
your VMS system's version # so recalcitrant KITINSTAL 
procedures will work on internal versions of VMS.  Or give your system
an 'instant upgrade'!
-----------------------------------------------------------------    
		.TITLE  SET_VERSION

; Writes to G^SYS$GQ_VERSION to change VMS version info for the running
; VMS System to whatever you specify.

; Author:	Lou Falek
; To build:	$ MACRO SET_VERSION
; 		$ LINK SET_VERSION,SYS$SYSTEM:SYS.STB/SEL
;	RUN THIS ONLY ON THE SAME VERSION OF VMS IT WAS LINKED ON !!!

; Requires CMKRNL privilege to run.
		.LIBRARY	\SYS$LIBRARY:LIB.MLB\
                $SSDEF                  	;define system service messages

		.PSECT CODE    PAGE		; better not pagefault!
PROMPT: .ASCID  /New VMS Version (8 chars) ? /	;prompt for new string
PRMPTA: 	.BLKB	8.			; place for user's input
PRMPTA_NAM:     .LONG	8.			; maximum or actual length
		.LONG   PRMPTA			; address of the string

		.ENTRY SET_VERSION , ^M<>	; transfer address
		PUSHAL  PROMPT			; push args and then
		PUSHAL  PRMPTA_NAM
		CALLS   #2,G^LIB$GET_INPUT	;prompt for new version string
		BLBC    R0,ERR

		$CMKRNL_S	routin=CHANGE_IT
		CMPW	#SS$_NORMAL,R0  	;check returned status
		BEQL	NEXT			;normal exit
		BRB     ERR			;error exit
ERR:		PUSHL   R0                	;indicate error
		CALLS   #1,G^LIB$STOP
NEXT:		RET				; normal exit


; this section runs in kernel mode
		.ENTRY CHANGE_IT, ^M<>
		DSBINT
		MOVZWL  PRMPTA,R6	  ; length of new version string
	        MOVC5   R6,PRMPTA,#^X20,#8.,G^SYS$GQ_VERSION ; set in exec.
		ENBINT			  ; Drop our IPL
		MOVL	#SS$_NORMAL,R0	  ; indicate it worked
		RET

		.END   SET_VERSION
    
T.RTitleUserPersonal
Name
DateLines