LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 01-26-2004, 02:28 PM   #1
unimaginative
Member
 
Registered: Aug 2003
Location: USA
Distribution: SuSE 8.2 Professional
Posts: 159

Rep: Reputation: 30
question for msdos professionals and experts


i want to execute two commands with the
Code:
cmd.exe /k
command
can someone give me an example with the EXACT syntax of how i would do this? thanks.
 
Old 01-27-2004, 04:44 AM   #2
caged
Member
 
Registered: Jan 2004
Location: new zealand
Distribution: Mandrake,Slackware
Posts: 165

Rep: Reputation: 30
do you mean run two command prompt commands at once or sequentually?
 
Old 01-27-2004, 06:01 PM   #3
Squall
Member
 
Registered: Jan 2004
Location: The land of the free and the home of the brave
Distribution: Slack 10
Posts: 239

Rep: Reputation: 31
(this is unimaginative) Well let me give you the situation. I want to set up a "Scan with Ad-aware" option in my directory context menu. This feature is included in the pay versions, but being the cheap ass that I am I wanted to do it myself. So, I fired up regedit and navigated to the registry key HKEY_CLASSES_ROOT\Directory\shell and added a command. Now in order to fire this up, I need to open a command prompt and execute: "Ad-aware.exe .", which scans my current file. Since MSDOS opens at a set path, I need to open it at the given directory and execute ad-aware.exe in the current directory. So the command would be
Code:
cmd.exe /k (allows execution of an additional command) "cd %L" (which opens up the current directory with dos)
I fooled arround with various syntaxes but I can't get it working.
Now you might be screaming: BATCH FILE BATCH FILE BATCH FILE!!!!, but for some reason, it didn't work. It contained:
Code:
cmd.exe /k "cd %L"
ad-aware.exe .
and put it in my C:\windows\system32 directory and put the registry value in my key but it still didn't work.
If anyone is still reading after all the mumbo jumbo, please help
 
Old 01-27-2004, 06:03 PM   #4
Squall
Member
 
Registered: Jan 2004
Location: The land of the free and the home of the brave
Distribution: Slack 10
Posts: 239

Rep: Reputation: 31
And i apologize for making you use the horizontal scroll bar, and I mean sequentially. Like that huh? 8333423435349 characters to answer a one word question

Last edited by Squall; 01-27-2004 at 06:07 PM.
 
Old 01-27-2004, 06:11 PM   #5
caged
Member
 
Registered: Jan 2004
Location: new zealand
Distribution: Mandrake,Slackware
Posts: 165

Rep: Reputation: 30
how did it not work did it not find the .bat file or did it not run well?
 
Old 01-28-2004, 04:51 AM   #6
Squall
Member
 
Registered: Jan 2004
Location: The land of the free and the home of the brave
Distribution: Slack 10
Posts: 239

Rep: Reputation: 31
it couldn't find it, I put the path in my registry key which was C:\windows\system32\Ad-aware.bat
 
Old 01-28-2004, 08:03 AM   #7
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
http://www.computerhope.com/msdos.htm

DOS command Reference.............
 
Old 01-28-2004, 10:28 AM   #8
Squall
Member
 
Registered: Jan 2004
Location: The land of the free and the home of the brave
Distribution: Slack 10
Posts: 239

Rep: Reputation: 31
yay, good site. thanks
 
Old 01-28-2004, 10:57 AM   #9
Misel
Member
 
Registered: Mar 2003
Location: Berlin
Distribution: Slackware current
Posts: 310

Rep: Reputation: 31
hmm, doesn't adaware just take the file as a parameter so that your command would be `adaware.exe "%1"` in the folder dir in regedit?

And does Adaware work on the command line?

you could also use "start" or just enter the adaware command directly if you know the correct parameters... for ad-aware I mean
 
Old 01-28-2004, 07:04 PM   #10
caged
Member
 
Registered: Jan 2004
Location: new zealand
Distribution: Mandrake,Slackware
Posts: 165

Rep: Reputation: 30
Squall: was your problem solved by the above comments?


not worthy of another thread i thought this sorta related link is interesting enuf to get mentioned http://www.inglorion.net/gnufreedos/

have fun.
Ben.
 
Old 01-28-2004, 10:04 PM   #11
witeshark
Member
 
Registered: Jan 2004
Location: Miami FL
Distribution: Mac OS X 10.4.11 Ubuntu 12.04 LTS
Posts: 429

Rep: Reputation: 30
Hmmm doz dayz... If nothing has worked yet, there's always the doz uninstall - reinstall way no? When I had doz, adaware always worked fine with the original defaults all unchanged.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A Question for the Experts tstrickland Linux - Newbie 3 07-26-2005 10:23 PM
Just a question...maybe for experts, not like me :P frenchi Linux - Networking 7 12-27-2003 08:43 AM
Good Question For Postfix Experts adengua Red Hat 1 10-24-2003 03:40 PM
Good Question for Postfix Experts adengua Linux - Software 4 10-24-2003 08:12 AM
Good Question for Postfix Experts adengua Linux - Networking 0 10-24-2003 04:27 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 07:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration