Getting non-standard system variables into a script

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
D_S
Junior Coder
Posts: 32
Joined: Sun Apr 24, 2005 6:43 pm

Getting non-standard system variables into a script

Post by D_S » Thu Aug 25, 2005 2:44 am

Thanks to all that post here. I've been searching through these posts for a way to pull non-standard system variables (novell variables established during login) into a script and wasn't having much luck until I came across a post about writing to an ini file. This is what I came up with using the readinifile command. Thanks !!!

****delete the previous user.ini file at each start
DeleteFile>c:\user.ini

WriteLn>c:\user.ini,result,[settings]%CR%%LF%

let>RP_WINDOWMODE=0
let>RP_WAIT=1
Run Program>command.com /c SET >> c:\user.ini

ReadIniFile>c:\user.ini,settings,username,x

Let>msg=The Username is

Message>%msg% %x%

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Aug 25, 2005 5:53 am

Did you try:

Code: Select all

GetEnvVar>username,myUserName
MessageModal>%myUserName%
If this doesn't work because they are Novell variables vs. system variables, then this can be done if you modify the login script to make normal system variables equal to the Novell variables.

Just add a line to use DOS SET systemvar==Novellvar for each variable you want to use. I don't recall syntax right now, but I have done that in the past. Been a while since I did scripts in Novell.

Much easier to do this once in the login script then can use Macro Scheduler and any other tools that can work with system variables.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts