ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¿ï¨úÀÉ®×,¦ý¤£­n¶}±Ò

[µo°Ý] ¿ï¨úÀÉ®×,¦ý¤£­n¶}±Ò

¦pªG§Ú­n¿ï¨úc:\1.bat(¸ÓÀɮפw¦s©óC),¦ý¤£­n¶}±Ò,½Ð°Ý¦U¦ì°ª¤â,¥Hexcel vba­n¦p¦ó¼¶¼g,¦hÁÂ
Lin

¦^´_ 1# lin
¿ï¨úc:\1.bat(¸ÓÀɮפw¦s©óC),¦ý¤£­n¶}±Ò,¬O¦ó·N«ä!
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 1# lin

fs = Application.GetOpenFilename("Windows§å¦¸ÀÉ (*.bat), *.bat")
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¤U¦C¥¨¶°«Y°õ¦æ©ówindows 7«á¡A²£¥Í°ÝÃD¤Î«ä¦Ò¸Ñ¨M¤èªk¦p¤U¡G

Sub ±½´y©Ò¦³«OÅ@ªº¨t²ÎÀÉ®×¥H¤Î¥H¥¿½TªºMicrosoftª©¥»´À´«¤£¥¿½Tªºª©¥»()
   o# = FreeFile: Open "C:\1.bat" For Output As o
Print #o, "@echo off"
Print #o, "sfc /scannow"
Print #o, "echo"
Close o#: Shell "C:\1.bat", 2
On Error Resume Next
End Sub

²£¥Í°ÝÃD»¡©ú¡G
°õ¦æ¥»¥¨¶°¥D­n¦³¨â­Óµ{§Ç¡G
1.«Ø¥ß1.bat
2.°õ¦æ1.bat
°õ¦æ¥¨¶°³£·|§i¶D§Ú­n¥HºÞ²zªÌ¨­¥÷°õ¦æ¡A­Y§Ú±N¤w«Ø¥ß©óC¼Ñ¤¤1.bat¥HºÞ²zªÌ¨­¥÷°õ¦æ¡A§Y¥i§¹¾ã°õ¦æ¡A¸g§Ú¼Æ¤é¨Ó¬d¾\¡B´ú¸Õ«ä¦Ò¸Ñ¨M¤èªkµ²ªG¦p¤U¡G
1.¨C¦¸¤â°Ê¥HºÞ²zªÌ¨­¥÷°õ¦æ1.bat---´ú¸Õ¹L¡A·Pı¤W¥ÎVBA¦n¹³¨S¦³¤Ó¤j·N¸q
2.Ãö³¬uac---¨S´ú¸Õ¹L¡A­Y¬O¥i¦æ¡A­n¥ý¼g¥¨¶°Ãö³¬uac¡A¦A°õ¦æ¥»¥¨¶°¡A³Ì«á¦A¼g¥¨¶°¶}±Òuac
3.¶i¤Jcmdµøµ¡«á¥HRunas«ü¥O¤Á´«¨­¤À---´ú¸Õ¹L¡A¦ý«ü¥O»Ý¿é¤J¨Ï¥ÎªÌ¥N¸¹¥B©ó°õ¦æ¤¤¶·¿é¤J±K½X¡A·Pı¤W¥ÎVBA¥¨¶°¦n¹³¨S¦³¤Ó¤j·N¸q
4.¿ï¨ú¤w«Ø¥ßªº1.bat¡A§Q¥Îsendkeys¥s¥X·Æ¹«¥kÁä¡A¥Hsendkeys¿ïºÞ²zªÌ¨­¥÷°õ¦æ---¥ÎVBA¿ï¨ú¤w«Ø¥ßªº1.bat¡A²£¥Í§xÃø¡A¥Ø«e©|µLªk¸Ñ¨M
5.«Ø¥ß1.bat¥HºÞ²zªÌ¨­¥÷°õ¦æªº±¶®|---¤£ª¾«Ø¥ß±¶®|¤Ä¿ï¶i¶¥¤¤ºÞ²zªÌ¨­¥÷°Ñ¼Æ¡AµLªk§¹¦¨
Lin

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD