Results 1 to 3 of 3

Thread: Inserting .vbs file into program?

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 1999
    Location
    Westfield, IN, USA
    Posts
    59

    Inserting .vbs file into program?

    My next program is going to execute a vbs file with some arguments i get through my program.

    I'm trying to decide how to do it. I didn't think echoing the vbs to a file would be viable, because it has so many quotes in it. I didn't want to include the file seperately because i want just 1 file (.exe).

    I was thinking of using a resource file. Can i store .vbs files in the resource file, and execute it from there somehow? I'm not very familiar with the resource file, but from all i've seen is how to load bitmaps or icons.

    Anyone know?

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    You have a few choices.
    1) Drop the script file, you're using VB in your application. Let your app do whatever you want the script to do.
    2) Add the script file to a resource file. Read it in a byte array and then save it and shell the newly created file.
    3) Add the Microsoft Script Control to your project and let the control execute the script commands.

    I would suggest going with suggestion no 1.

    Best regards

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 1999
    Location
    Westfield, IN, USA
    Posts
    59
    well, i'd REALLY love to port this vbs to vb, but i don't know how, i'm still kinda new. I'm honestly just using the mkw3site.vbs that comes with IIS in C:\inetpub\Adminscripts\

    I tried popping the code into vb, and it doesn't see it, so i suppose vbs is different from vb. I'm new to both, so i wouldn't know what to do from here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width