Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 05-24-2007, 01:04 AM   #11
Daemon Poster
 
Captain Pooka's Avatar
 
Join Date: Oct 2006
Posts: 1,108
Default Re: Cmd

:P It wont go on anyways unless I close the first program when it starts.... Make the paint thing work with using the CALL command.. and tell me how you did it
__________________

Captain Pooka is offline   Reply With Quote
Old 05-24-2007, 03:08 AM   #12
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,003
Default Re: Cmd

sorry... made a mistake with that call command, that's pretty much just the same as writting the program name...


you should use that start command


@ECHO OFF
:RAZOR
ECHO PRESS ANY KEY TO START RAZOR.
ECHO Name: blah blah
ECHO PASS: blah blah
PAUSE
start "G:\Program Files\Razor\Razor.exe"

ECHO PRESS ANY KEY TO START EASY UO.
PAUSE
start "G:\euox0098\euox.exe"
Pause
Exit


I imagine that the problem with putting the Razor file in the sys32 folder was more to do with it's associated files that it want's to be local
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 05-24-2007, 03:03 PM   #13
Daemon Poster
 
Captain Pooka's Avatar
 
Join Date: Oct 2006
Posts: 1,108
Default Re: Cmd

alright you guys arn't getting my problem.

Copy all that and make a bat file but instead of razor and easy uo put in two different programs that yall have.

It's not that they wont start, it's that when razor opens it wont go on to the next part. I tried it with pain too and the same problem occurrs there also.
Captain Pooka is offline   Reply With Quote
Old 05-24-2007, 06:19 PM   #14
Baseband Member
 
Join Date: May 2007
Posts: 42
Send a message via AIM to yohed55
Default Re: Cmd

It works just fine for me, which version of windows are you using?

-sam
yohed55 is offline   Reply With Quote
Old 05-24-2007, 06:33 PM   #15
Baseband Member
 
Join Date: May 2007
Posts: 42
Send a message via AIM to yohed55
Default Re: Cmd

Here's a VBS file that does the equivalent:

Code:
Option Explicit
Dim objShell
Set objShell = CreateObject("WScript.Shell")
WScript.Echo "Foo"
objShell.Run "C:\windows\system32\notepad.exe"
WScript.Echo "Bar"
objShell.Run "C:\windows\system32\mspaint.exe"

WScript.Quit
Save that as a vbs file and see how you like it.


-sam
yohed55 is offline   Reply With Quote
Old 05-24-2007, 11:21 PM   #16
Daemon Poster
 
Captain Pooka's Avatar
 
Join Date: Oct 2006
Posts: 1,108
Default Re: Cmd

Couple of questions

Does VBscript stand for visual basic script?

And It cones up with Foo, the press ok and it says

Script: (path to where I saved it)
Line: 5
Char: 1
Error: The system cannot find the file specified.
Code: 80070002
Source: (null)
Captain Pooka is offline   Reply With Quote
Old 05-25-2007, 12:14 AM   #17
Baseband Member
 
Join Date: May 2007
Posts: 42
Send a message via AIM to yohed55
Default Re: Cmd

Yeah your files must be in a different directory sorry about that.

Try this on for size.

Code:
Option Explicit
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run("notepad")
WScript.Sleep 500

objShell.SendKeys "USERNAME"
objShell.SendKeys "{enter}"
objShell.SendKeys "PASSWORD"
WScript.Sleep 500

WScript.Echo "Press Any key to start Razor"
objShell.Run("G:\Program Files\Razor\Razor.exe")

WScript.Echo "Press any key to start Easy UO"
objShell.Run("G:\euox0098\euox.exe")

WScript.Quit
save that as a vbs again.

If you want to make it exit notepad automatically or print the username and password out in DOS, Let me know and I will fix it up.

-sam
yohed55 is offline   Reply With Quote
Old 05-25-2007, 12:19 AM   #18
Daemon Poster
 
Captain Pooka's Avatar
 
Join Date: Oct 2006
Posts: 1,108
Default Re: Cmd

Comes up with the same error when I press ok to start razor.

Script: F:\Documents and Settings\Quincy\My Documents\fsdgs.vbs
Line: 5
Char: 1
Error: The system cannot find the file specified.
Code: 80070002
Source: (null)
Captain Pooka is offline   Reply With Quote
Old 05-25-2007, 09:07 AM   #19
Golden Master
 
joxley1990's Avatar
 
Join Date: Oct 2005
Posts: 7,846
Send a message via AIM to joxley1990 Send a message via MSN to joxley1990
Default Re: Cmd

Code:
Option Explicit
Dim objShell
Set objShell = CreateObject("WScript.Shell")
WScript.Echo "Get off CF and get some work done :)"
objShell.Run "http://computerforums.org"
WScript.Quit
Lol sorry, made that a while ago.. sometimes works for me.. I put alot of messages before I open links when im trying to do work!

Put that in notepad and save as a .vbs file, and use that as a desktop shortcut


Is there a way to have a batch file open and have a list of programs to open? Then like, press 1 for paint, 2 for notepad etc?
joxley1990 is offline   Reply With Quote
Old 05-25-2007, 11:18 AM   #20
Daemon Poster
 
Captain Pooka's Avatar
 
Join Date: Oct 2006
Posts: 1,108
Default Re: Cmd

Well yes there is for batch files, it is the choice command.
My computer doesn't have the CHOICE command and i'm to lazy to find it and download it.. although I figure it could fix all my problems feel free to post a link if you find it! That and TASKKILL

Code:
REM choice gives you 2 options in this case - either y or n 

CHOICE/C:yn Are you sure you want to delete %1 
IF ERRORLEVEL 2 GOTO :no 
IF ERRORLEVEL 1 GOTO :yes 

:yes 
DEL %a 
GOTO :end 

:no
echo file %1 not deleted 
GOTO :end 
:end
And for multiple you would just slap one of these in there

CHOICE/C:abcd choose a letter
IF ERRORLEVEL 4 GOTO choice_d
IF ERRORLEVEL 3 GOTO choice_c
IF ERRORLEVEL 2 GOTO choice_b
IF ERRORLEVEL 1 GOTO choice_a

and of couse you would give it a name like deletechoice.bat or whatever you want to do with it...


But I say again, you can post a link if you find a place to download the CHOICE command

-Q

And with your VBS script, I get the same error as before. I've tried opening it from different locations (documents, desktop, mycomp...) and I still get the same error.. I think if I do get the CHOICE command I can do it in a batch file

thanks!
-Q
__________________

Captain Pooka is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 02:30 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0