Solved

click on a file to run a cmd.exe

Posted on 2013-01-14
8
332 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 300 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
"lblTime is not declared" 3 63
Copying from a network share 3 36
Trouble installing msi file with msiexe.exe 2 48
search by any word in column 5 29
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

737 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