Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4601526
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:50:18+00:00 2026-05-21T23:50:18+00:00

The script creates a txt file of info from the users PC then saves

  • 0

The script creates a txt file of info from the users PC then saves it to a shared directory folder F:\InstalledSoftware\

If WriteFile(s, sFileName) Then
  'optional prompt for display
  If MsgBox("Finished processing.  Results saved to " & sFileName & _
            vbcrlf & vbcrlf & "Do you want to view the results now?", _
            4 + 32, sTitle) = 6 Then
    WScript.CreateObject("WScript.Shell").Run """" & sFileName & """", 9
  End If
End If

A) sFileName = “F:\InstalledSoftware\”
& sCompName & “_” & GetDTFileName() &
“_Software.txt”

B) sFileName = sCompName & “_” &
GetDTFileName() & “_Software.txt”

both result in a file being created e.g “ JOHNPC_05112011_093842_Software.txt”

but B correctly creates it in the current active directory.

Two problems, As I have as shared drive, if I email the link to the VB script, I have to use exhibit A as exhibit B uses the current active directory.
The second problem is the F: drive is mapped on some machines as a different drive letter J or K or in virtual environments a different drive. But exhibit B will always work as long as I am in the correct folder.

Is there a different way of designating the path. i.e

IP Address or DNS name that does not use a Drive letter?

sFileName =
“????????????????\InstalledSoftware\”
& sCompName & “…………..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:50:19+00:00Added an answer on May 21, 2026 at 11:50 pm

    Simply use the UNC path of the location the drive is mapped to;

    sFileName = "\\server_name_or_ip\optional_path\InstalledSoftware\" & sCompName & ..."

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my python script which creates a test.txt file when executed. when I
echo text >> 'Users/Name/Desktop/TheAccount.txt' How do I make it so it creates the file
I have a perl script creates a text file, writes captured lines from a
I'm trying to create a script that takes a .txt file with multiple lines
The following script creates symlinks as expected, but the original file can never be
I have php script that creates a temporary watermark image for users that are
I have a php page that creates page data from two .txt files (one
Hey guys I've got a text file that a script creates (specifically dmidecode >
I need some help from the shell-script gurus out there. I have a .txt
I have a Python script which processes a .txt file which contains report usage

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.