Jump to content

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

  • Developers

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..... :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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..... :)

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

Link to comment
Share on other sites

  • Developers

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...

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

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...