Jump to content

Recommended Posts

Posted

Hello,

First, I'm not using VBS for web development....si I think it's the good forum :)

I'm trying to use a software that gives the MAC adress in VBScript, and to write the result of this command in a file. Here is my line :

set VLOB_WSHSH = WScript.CreateObject("WScript.shell")
retour = VLOB_WSHSH.Run("d:\compname.exe /d ?m 1>>d:\adresse.txt 2>>d:\erreurs.log",1,True)

But the file is never created...it's supposed to contain the MAC adress. I tried lots of things, from

VLOB_WSHSH.Run("d:\compname.exe /d ?m >> d:\adresse.txt")

to lines like the first I show...I can write/read on the drive, I tried to create the file before writing in it but it's useless.

If someone can help me....thanks!


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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...