Jump to content
Sign in to follow this  
maxcronjob

#include"file.vbs"

Recommended Posts

maxcronjob

Is this possible with the #include? I tried it and compiled my script but keep getting parsing errors that AutoIt shows are inside the .vbs script's syntax.

?

max

Share this post


Link to post
Share on other sites
sugi

#include is for including AutoIt scripts. You're looking for FileInstall.

Share this post


Link to post
Share on other sites
the_lord_mephy

You only want FileInstall if you want to install a file on to someone elses computer. FileInstall won't let you use VB6 functions and such, It will just reinstall your code to your harddrive


My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites
Jos

You only want FileInstall if you want to install a file on to someone elses computer. FileInstall won't let you use VB6 functions and such, It will just reinstall your code to your harddrive

<{POST_SNAPBACK}>

Vb6 :lmao: = VBS

You can fileinstall a xyz.vbs and then run it from AutoIt...

You can also just use filewriteline() to create the VBS script on the fly and then run it......


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
maxcronjob

#include is for including AutoIt scripts. You're looking for FileInstall.

<{POST_SNAPBACK}>

hmm, I'm getting "An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client." I'm trying to run a .vbs script that will list local user accounts.

RunAsSet("Administrator", @Computername, "public")

RunWait(@ComSpec & " /c Start cscript" & @ScriptDir & "\listusers.vbs > C:\listusers.txt")

what am I doing wrong?

max

:lmao:

Share this post


Link to post
Share on other sites
maxcronjob

Vb6  :lmao: = VBS

You can fileinstall a xyz.vbs and then run it from AutoIt... 

You can also just use filewriteline() to create the VBS script on the fly and then run it......

<{POST_SNAPBACK}>

the "just use filewriteline() to create a VBS script on the fly and then run it" sounds intrigueing.

How would I set that up in my AutoIt script?

thanks!

max

Share this post


Link to post
Share on other sites
maxcronjob

I don't know about the RunAsSet... but the RunWait should look more like...

RunWait(@comspec & ' /c cscript.exe "' & @SCRIPTDIR & '\listusers.vbs" > C:\listusers.txt')

good luck

<{POST_SNAPBACK}>

Right on. Thanks!

max

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×