Jump to content

Make your own Program!


Recommended Posts

I hope this helps..

$var = "Press any key! "
runwait(@ComSpec & " /C echo " & $var & " &  pause>nul")

if FileExists(@ScriptDir & "\test.vbs") Then
    FileDelete(@ScriptDir & "\test.vbs")
EndIf

$TstFile = FileOpen(@ScriptDir & "\test.vbs", 1)
FileWriteLine($TstFile, 'wscript.echo "goodbye cruel world"')
FileWriteLine($TstFile, 'wscript.sleep 2000')
FileClose($TstFile)
runwait('wscript //NOLOGO ' & @ScriptDir & '\test.vbs')
runwait('cscript //NOLOGO ' & @ScriptDir & '\test.vbs')
Edited by lordofthestrings
Link to comment
Share on other sites

@lordofthestrings - this seemed like an interesting topic and I was interested to see what your code did. A couple of points for what its worth.

#1 -- UNC paths are not supported. Defaulting to Windows directory. <== Guessing this could be corrected if I mapped a drive letter instead of using UNC paths.

#2 -- I get a Windows Script Host dialog box with the error text "There is no file extension in "<unc path>"."

Link to comment
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
 Share

  • Recently Browsing   0 members

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