tombern Posted February 8, 2005 Posted February 8, 2005 Sorry if this has been asked and solved before, but I couldn't find anything on it. I need to get the client name from of the computer, and make that the mac adress. Any help would be much appreaceated
Domonoky Posted February 8, 2005 Posted February 8, 2005 Hi getting the clientname from a PC is easy.. just have a look in the helpfile.. ..but change the MAC adress to the clientname.. hm.. are you sure you mean the MAC adress ?? its normal a long HEX Code (like: AE:0F:54:BA:32:FE ) not a string.. mfg Domonoky
tombern Posted February 8, 2005 Author Posted February 8, 2005 Higetting the clientname from a PC is easy.. just have a look in the helpfile....but change the MAC adress to the clientname.. hm..are you sure you mean the MAC adress ?? its normal a long HEX Code (like: AE:0F:54:BA:32:FE ) not a string..mfgDomonoky<{POST_SNAPBACK}>Hithanks for the quick reply, the reason I need to do something like that is because of one application. We have a batch file today that uses the following command.set netaddr=%clientname%that's what i'm trying to accomplish.RegardsTom
Blue_Drache Posted February 8, 2005 Posted February 8, 2005 Hithanks for the quick reply, the reason I need to do something like that is because of one application. We have a batch file today that uses the following command.set netaddr=%clientname%that's what i'm trying to accomplish.RegardsTom<{POST_SNAPBACK}>Take a look at the RunWait(@comspec) command. It's in the help file. You'll be able to run dos/cmd commands from your script with that. If the command in the DOS box is "set netaddr=%clientname%" then all this is doing is setting a DOS environment variable and you can read that with EnvGet("NETADDR") after it's been set. Take a look at all your environment variables by opening a Start->Run->CMD->enter and then type "set" and hit enter. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Valik Posted February 8, 2005 Posted February 8, 2005 Take a look at the RunWait(@comspec) command. It's in the help file. You'll be able to run dos/cmd commands from your script with that. If the command in the DOS box is "set netaddr=%clientname%" then all this is doing is setting a DOS environment variable and you can read that with EnvGet("NETADDR") after it's been set. Take a look at all your environment variables by opening a Start->Run->CMD->enter and then type "set" and hit enter.<{POST_SNAPBACK}>IIRC, the spawned process gets a COPY of the environment, but they do not share the environment, so I don't think EnvGet() will read what is set by the spawned process.
tombern Posted February 9, 2005 Author Posted February 9, 2005 Hi First of all let me thank you guys for getting me on the right track. I solved it by using the following command EnvSet("nettadr","%Clientname%"). Now everything works perfectly, and best of all the users will no longer be able to f... with the other settings in the file. cheers Tom
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now