AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Вызов Exec и двойные кавычки
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (Russian)
View previous topic :: View next topic  
Author Message
FeyFre



Joined: 07 Aug 2007
Posts: 2042
Location: Vinnitsa, Ukraine

PostPosted: Tue Aug 16, 2011 8:32 pm    Post subject: Reply with quote

Andrey_A_A
Exec("start /min /wait %ComSpec% /c taskkill /f /im wscript.exe")
по-моему так
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Andrey_A_A



Joined: 03 Jun 2010
Posts: 558
Location: Сочи, Хоста

PostPosted: Tue Aug 16, 2011 8:46 pm    Post subject: Reply with quote

FeyFre, что-то не срабатывает, я уже тоже что только не вставлял, не хочет

добавлено через 5 мин

сработал такой вариант, но всё равно окно мелькает, но побыстрее
Exec("%ComSpec% /c start /min taskkill /f /im wscript.exe")
Back to top
View user's profile Send private message Send e-mail Visit poster's website
KDJ



Joined: 06 Mar 2010
Posts: 1362
Location: Poland

PostPosted: Wed Aug 17, 2011 4:09 pm    Post subject: Reply with quote

Andrey_A_A
You can not hide console window (cmd.exe), the above methods.
One way is to use link file (eg. ...\AkelPad\WscriptKill.lnk):
"Wscript kill" Exec("rundll32.exe shell32, ShellExec_RunDLL %a\WscriptKill.lnk")

Command in the link:
%ComSpec% /c taskkill /f /im Wscript.exe
and run as minimized.

Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1362
Location: Poland

PostPosted: Wed Aug 17, 2011 5:45 pm    Post subject: Reply with quote

Another way is to use software tools to hide the console window or to kill processes.
On this subject, read here:
Russian: http://wiki.oszone.net/index.php/%D0%A1%D0%BA%D1%80%D1%8B%D0%B2%D0%B0%D0%B5%D0%BC_%D0%BA%D0%BE%D0%BD%D1%81%D0%BE%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5_%D0%BE%D0%BA%D0%BD%D0%B0
Polish: http://www.searchengines.pl/Ukrywanie-okien-cmd-pod-pliki-batch-t102791.html

Example of using nircmd.exe ( http://www.nirsoft.net/utils/nircmd.html ):
"Wscript kill" Exec("%a\nircmd.exe killprocess Wscript.exe")
Nircmd.exe file located in AkelPad directory.
Back to top
View user's profile Send private message
Andrey_A_A



Joined: 03 Jun 2010
Posts: 558
Location: Сочи, Хоста

PostPosted: Thu Aug 18, 2011 11:15 am    Post subject: Reply with quote

Спасибо KDJ за подсказку. Получилось!
"Завершить процесс Wscript.exe Ctrl+Shift+Alt+W" Exec(`"%a\AkelFiles\Tools\NirCmd\NirCmd.exe" execmd taskkill /f /im wscript.exe`) Icon("%a\AkelPadImage.dll",528)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (Russian) All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group