?
Solved

click on a file to run a cmd.exe

Posted on 2013-01-14
8
Medium Priority
?
342 Views
Last Modified: 2013-01-16
want to run this command in cmd.exe by clicking on a file
(ideally without using visual studios or visual basic, want to just use simple windows7)

C:\gyb>gyb --email gmail@gmail.com --backup
note, I need to be in c:\gyb folder

another question is run this file every 30 minutes


I think this information is unrelated to question:
this is to back up gmail to windows os
http://code.google.com/p/got-your-back/wiki/GettingStarted
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 9

Expert Comment

by:the_b1ackfox
ID: 38776797
So turn it into a cmd file:

start->run type in cmd <hit enter>
type in cd\ <hit enter>
then cd\ c:\ (you can add another directory if you would like this elsewhere)
your prompt should look something like this c:\>

Now type in copy con gyb.cmd <hit enter>
cd\ <hit enter>
cd c:\gyb <hit enter>
gyb --email gmail@gmail.com --backup  <hit enter>
exit <hit enter>

now hit control z

you should be back at your command prompt

You should have a file in that directory call gyb.cmd
double clicking on it should run your program (excusing any of my typos)
0
 

Author Comment

by:rgb192
ID: 38776887
when I type
exit <enter>

cmd disappears

and does not return when I type ctrl z
0
 
LVL 9

Accepted Solution

by:
the_b1ackfox earned 1200 total points
ID: 38777100
ok, copy all of this into a text file:

cd\
cd c:\gyb
gyb --email gmail@gmail.com --backup  
exit


save it as gyb.cmd   (make sure it doesn't save as gyb.cmd.txt)

And you should be good
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 8

Expert Comment

by:deepu chandran
ID: 38777687
Hi,

One more option you have is to Create a VBScript (.vbs) file and Schedule the VBS on Windows Task Schdule to run for every 30 Min

Refer below URLs

http://stackoverflow.com/questions/5467818/execute-dos-command-from-vbscript
http://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.85).aspx

-- Deepu
0
 

Author Comment

by:rgb192
ID: 38778583
I dont understand where to write file
0
 
LVL 8

Assisted Solution

by:deepu chandran
deepu chandran earned 800 total points
ID: 38781413
Hi,

Write it on a notepad or wordpad(any Editor is Fine, Sytax highlight is avaialble on Notepad+ and ultaedit). Save the file as .vbs(vb script file) or cmd

--Deepu
0
 

Author Comment

by:rgb192
ID: 38785477
what is the command I should write and save as a .vbs file
0
 

Author Closing Comment

by:rgb192
ID: 38785806
thanks

now I can run the command by clicking on a file
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question