Jump to content
Sign in to follow this  
shortstop

Why doesn't this work?

Recommended Posts

If ProcessExists("ventrilo_srv.exe") Then
    Run("C:\Program Files\Ventrilo\Ventrilo.exe -m")
Else
    Run("C:\Program Files\VentSrv\ventrilo_srv.exe")
    Sleep(2000)
    Run("C:\Program Files\Ventrilo\Ventrilo.exe -m")
EndIf

It never starts the server, no matter what.

?

edit: Found this in logs.

20071015 19:12:30 Unable to open configuration file 'ventrilo_srv.ini'.

20071015 19:12:30 ERROR: Unable to read configuration data. Exiting.

Edited by shortstop

Share this post


Link to post
Share on other sites

The bolded worked, @WorkingDir did not. Why?

I guess the script isn't located in the ventrilo_srv.exe program directory and that prgram seems to require the workdir to be the program dir..... :)

Share this post


Link to post
Share on other sites

Ah...So, to Run() something, you have to have the .exe in the directory of the program you want to Run?

No, but when your script is located in a different directory and the program you launch needs the workingdir set to the program dir you havbe to specify the second parameter on the Run() or RunWait() statement...

:)

Share this post


Link to post
Share on other sites

Think of it as if you were typing a command at the dos prompt. If you are in the root of c:\ and try to launch photoshop.exe it will return file not found.

If you try to launch explorer.exe or notepad.exe they will come right up because the Windows and Windows\System32 folders are harcoded into the Windows Environment Variable "Path"

In Windows XP:

Right-click My Computer

Click the Advanced tab

Click the Environment Variables button

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  

×
×
  • Create New...