X xlongbuilder Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-20 #1 我要在程序中实现<br>cmd.exe <br>参数 attrib path +s<br>其中 path 是变量
F finalrinoa Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-20 #2 winexec('cmd /c attrib'+path+'+s',sw_show);
B beta Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-20 #3 path := 'c:/abc.txt';<br>winexec('cmd.exe /c attrib ' + path + ' +s');<br>
T thx1180 Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-20 #4 看看这里关于ShellExecute函数的说明:<br>http://www.delphibbs.com/delphibbs/dispq.asp?lid=1803804
X xlongbuilder Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-21 #6 我是过都不行<br><br>var path : pchar ;<br>begin<br>path := 'c:/a';<br>//winexec('cmd.exe /c attrib ' + path + ' +s');<br>winexec('cmd /c attrib'+path+'+s',sw_show);<br><br>[Error] Unit1.pas(32): Incompatible types: 'String' and 'PChar'
我是过都不行<br><br>var path : pchar ;<br>begin<br>path := 'c:/a';<br>//winexec('cmd.exe /c attrib ' + path + ' +s');<br>winexec('cmd /c attrib'+path+'+s',sw_show);<br><br>[Error] Unit1.pas(32): Incompatible types: 'String' and 'PChar'
W wfzha Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-21 #7 还真是这个意思啊。<br>var path : pchar ;<br>begin<br>path := 'c:/windows/';<br>winexec(pchar(path+'notepad'),sw_show);<br>end;<br>
还真是这个意思啊。<br>var path : pchar ;<br>begin<br>path := 'c:/windows/';<br>winexec(pchar(path+'notepad'),sw_show);<br>end;<br>
X xlongbuilder Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-21 #8 不行<br>Error] Unit1.pas(32): Incompatible types: 'String' and 'PChar'
D delp Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-21 #9 不可能,兄弟我试验都可以,你用的是什么版本的delphi呀?
D dcshi2001 Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-21 #10 var jsj:Stringl;<br> jsj:='Clac.exe';<br>winexec(Pchar(jsj),Sw_Show);
X xlongbuilder Unregistered / Unconfirmed GUEST, unregistred user! 2003-07-21 #12 问题解决<br>d :='c:/4';<br>path:='/c attrib "'+d+'" +s';<br>ShellExecute(handle, 'open','cmd.exe', pchar(path),'', SW_SHOW);<br>多谢各位!!
问题解决<br>d :='c:/4';<br>path:='/c attrib "'+d+'" +s';<br>ShellExecute(handle, 'open','cmd.exe', pchar(path),'', SW_SHOW);<br>多谢各位!!