Re: Basic question

From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 09/29/04


Date: Wed, 29 Sep 2004 17:40:59 -0600


"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:OOffktlpEHA.3524@TK2MSFTNGP15.phx.gbl...
> GC wrote:
>
> > Hi,
> > I want to be able to create a text file with called <username>.txt with
some
> > info I have gathered from a script. In this VB script, how do I set the
> > file name to <username>.txt? I have it working fine with a static
entry.
> > Also, how would I do the same thing for a computer name? Thanks!
> >
> >
> Hi
>
> Set objWshNet = CreateObject("WScript.Network")
>
> WScript.Echo "User name: " & objWshNet.UserName
> WScript.Echo "Computer name: " & objWshNet.ComputerName

Not clear from the original question, but if the username is BILLY and you
want to create a file whose name is "<BILLY>.txt", then I would suggest you
find another set of characters to include in the name, as "<" and ">" are
syntactical landmines.

/Al



Relevant Pages

  • Re: [Full-disclosure] SSH brute force blocking tool
    ... And just what on God's earth does "SOMEONE LOGGING IN WITH USERNAME SET ... TO A VALID PASSWORD ENTRY" have to do with this script. ... the classic attack is the symlink attack. ...
    (Full-Disclosure)
  • Re: WORD doc info into FMP?
    ... it appears that each line of the entry follows the format ... number of any given type of field (Location, script, sets etc.) you might ... into a separate record in a database, and a separate related "database 2" ... Ten Nights in a Barroom (New York State Archives) ...
    (comp.databases.filemaker)
  • RE: Need some MySQL query help...
    ... attempting to run the script: ... passed to the database. ... passwd entry to the current database entry. ...
    (perl.dbi.users)
  • Re: How to make Apache (2.2.4) less greedy, or Sendmail less polite? [semi-solved]
    ... Then I make an entry in my /etc/hosts.allow file that denies access to all in my hosts.deny file. ... Firstly, I took some measures to figure out where the issues came from, and using Apache's "server-status" handler, I noticed the script that caused Apache to choke up, was a PHP script that shows entries of photographic events that I organise from time to time. ... I then wondered why, as this script never caused trouble before, and while checking the server status I did already notice that the "store comments" script was called very often. ... the machines that were used for this, and I will report them to the proper anti spam authorities, such that they will be blacklisted Internet wide. ...
    (freebsd-questions)
  • Re: Windows Explorer size reverting to 800x600
    ... I've pre-empted your reply and looking at your script I realise that the ... A similar entry exists in ... All of the folders are on a local drive. ... Const conBagMRUSize = _ ...
    (microsoft.public.windowsxp.general)