Saved Bookmarks
| 1. |
Solve : start exe by vbs? |
|
Answer» Hi All, Is it posiple to start the.exe file by VBS command? what is the code? and how to disable it? thanksQuote from: tabehsn on October 20, 2009, 07:02:05 AM Hi All, Which .exe file? An .exe file can be a program or a process? You may run .exe file from a batch file when you KNOW the complete path to the .exe file. Or the .exe is INCLUDED in the search path. C:\>path PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Co mmon Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10 .0\DLLShared\;c:\bin C:\>On my XP pro machine there are 2,123 .exe files. C:\>dir /B /S *.exe | wc -l 2123 C:\> C:\WINDOWS\system32>dir /B /P *.exe accwiz.exe actmovie.exe ahui.exe alg.exe append.exe arp.exe asr_fmt.exe asr_ldm.exe asr_pfu.exe at.exe atmadm.exe attrib.exe auditusr.exe autochk.exe autoconv.exe autofmt.exe autolfn.exe blastcln.exe bootcfg.exe bootok.exe bootvrfy.exe cacls.exe calc.exe charmap.exe ChCfg.exe chkdsk.exe chkntfs.exe cidaemon.exe cipher.exe cisvc.exe ckcnv.exe cleanmgr.exe cliconfg.exe clipbrd.exe clipsrv.exe cmd.exe cmdl32.exe cmmon32.exe cmstp.exe comp.exe compact.exe conime.exe control.exe convert.exe Press any key to continue . . . Quote Is it posiple to start the.exe file by VBS command? You can use the Run method of the shell object: Code: [Select]Set WshShell = CreateObject("WScript.Shell") WshShell.Run "c:\windows\system32\programname.exe",,True Note: The True parameter indicates to wait on return. In other words, wait until the program finishes executing before continuing with the NEXT instruction. Quote and how to disable it Not sure you can. It's part of the VBSCRIPT instruction set. Good luck.C:\>type cal.bat @echo off calc.exe REM full path :C:\WINDOWS\system32\calc.exe C:\>cal.bat ______________________ Disable calc.exe by renaming calc.exe or delete calc.exe C:\>ren /? Renames a file or files. RENAME [drive:][path]filename1 filename2. REN [drive:][path]filename1 filename2. Note that you cannot specify a new drive or path for your DESTINATION file. C:\>cd C:\WINDOWS\system32 C:\WINDOWS\system32>ren calc.exe xxcalc.exe Thank you bro billrich and sidewinder |
|