View Full Version : Is it possible?
Hi
I have a question:
Is it possible to give an instruction
of ams to c:\windows\system32\cmd.exe?
Intrigued
03-06-2006, 05:50 PM
Here is one way...
You could create a small .bat (Batch file) that will do what you need. Open the .bat with say Notepad to see how to start the program you want started, for example).
The code is in the On Show as far as AMS code goes.
rhosk
03-06-2006, 06:56 PM
Hi
I have a question:
Is it possible to give an instruction
of ams to c:\windows\system32\cmd.exe?
Believe it or not, this works as well -
File.Run("cmd", "", "", SW_SHOWNORMAL, false);
TJ_Tigger
03-06-2006, 08:25 PM
File.Run("cmd", "/k \"ipconfig\"", "", SW_SHOWNORMAL, false);
This works too
Eagle
03-06-2006, 09:01 PM
Down ... to get more of a grasp on some of the cmd.exe directives,
at a command prompt type cmd.exe /?
or cmd.exe /? > %temp%\cmdcomms.txt , one way to dump the directives for later refereal to your Temp Folder
hth a little
Thanks!
And how can I give an instruction when cmd.exe already is open?
Intrigued
03-13-2006, 06:41 PM
Remember folks:
cmd.exe for Windows running NTFS
command.com for Windows running FAT32
:yes
Intrigued
03-13-2006, 07:04 PM
If you are running Windows XP (2k) and have your primary partion set for C:\, then try this code in AMS (On Show of Page1 in a blank project):
File.Run("cmd", "/k ipconfig \&\& \"C:\\WINDOWS\\System32\\calc.exe\" \&\& \"C:\\WINDOWS\\System32\\desk.cpl\"", "", SW_SHOWNORMAL, false);
Notice how the last dialog shows AFTER you close the calc.exe window.
Hmmm...
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.