Classic Shell http://www.classicshell.net/forum/ |
|
Running 2 commands for menu items ? http://www.classicshell.net/forum/viewtopic.php?f=13&t=2908 |
Page 1 of 1 |
Author: | delicacy [ Tue Jul 01, 2014 7:28 pm ] |
Post subject: | Running 2 commands for menu items ? |
How can i use 2 commands in the command section while editing a menu item ? "%SystemDrive%\Program Files\Tools\desklock.exe";"%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState " & this "%SystemDrive%\Program Files\Tools\desklock.exe";sleep & this "%SystemDrive%\Program Files\Tools\desklock.exe";"sleep" without success .. . |
Author: | Ivo [ Tue Jul 01, 2014 9:19 pm ] |
Post subject: | Re: Running 2 commands for menu items ? |
The command can only run one thing. If you want to do multiple things you need to create a script of some sort, like .BAT or .VBS. |
Author: | delicacy [ Wed Jul 02, 2014 12:23 am ] |
Post subject: | Re: Running 2 commands for menu items ? |
Ivo, i don't have programming skills, it would be cool if you could fix my vbs, i picked an ex online & it doesn't work: the content of my vbs file: Sub RunApplication(ByVal sFile) Dim WShell : Set WShell = CreateObject("WScript.Shell") WShell.Run Chr(34) & sFile & Chr(34), 8, false End Sub RunApplication "C:\Program Files\Tools\desklock.exe" RunApplication "C:\Program Files\Tools\shutdown.exe" -s suspend -l 0" |
Author: | Ivo [ Wed Jul 02, 2014 7:39 am ] |
Post subject: | Re: Running 2 commands for menu items ? |
Looks like you have an extra quote at the end. |
Author: | delicacy [ Wed Jul 02, 2014 10:46 am ] |
Post subject: | Re: Running 2 commands for menu items ? |
Like i told you i don't have programming skills, i tried this: Sub RunApplication(ByVal sFile) Dim WShell : Set WShell = CreateObject("WScript.Shell") WShell.Run Chr(34) & sFile & Chr(34), 8, false End Sub RunApplication "C:\Program Files\Tools\desklock.exe" RunApplication "C:\Program Files\Tools\shutdown.exe" -s suspend -l 0 Then i tried this, still unsuccessfully.. >> Sub RunApplication(ByVal sFile) Dim WShell : Set WShell = CreateObject("WScript.Shell") WShell.Run Chr(34) & sFile & Chr(34), 8, false End Sub RunApplication "C:\Program Files\Tools\desklock.exe" RunApplication ""C:\Program Files\Tools\shutdown.exe" -s suspend -l 0" |
Author: | Gaurav [ Wed Jul 02, 2014 11:13 am ] |
Post subject: | Re: Running 2 commands for menu items ? |
Try this: Sub RunApplication(ByVal sFile) Dim WShell : Set WShell = CreateObject("WScript.Shell") WShell.Run Chr(34) & sFile & Chr(34), 8, false End Sub RunApplication "C:\Program Files\Tools\desklock.exe" RunApplication "C:\Program Files\Tools\shutdown.exe"" -s suspend -l 0" |
Author: | delicacy [ Wed Jul 02, 2014 11:34 am ] |
Post subject: | Re: Running 2 commands for menu items ? |
Thanks, fixed. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |