Jump to content
Sign in to follow this  
shortstop

Why doesn't this work?

Recommended Posts

shortstop

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
Valuater

Maybe...

Run("C:\Program Files\VentSrv\ventrilo_srv.exe", @WorkingDir)

Or

Run("C:\Program Files\VentSrv\ventrilo_srv.exe", "C:\Program Files\VentSrv\")

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
shortstop

Maybe...

Run("C:\Program Files\VentSrv\ventrilo_srv.exe", @WorkingDir)

Or

Run("C:\Program Files\VentSrv\ventrilo_srv.exe", "C:\Program Files\VentSrv\")

8)

The bolded worked, @WorkingDir did not. Why?


Share this post


Link to post
Share on other sites
Valuater

The bolded worked, @WorkingDir did not. Why?

Heck, I don't know...

There's Short-Hand, Short-cooks, Short-orders, Short-stops, and ...Hobbyists

Glad we got it working!!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
shortstop

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?


Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
weaponx

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  

×