It is currently Thu Jun 07, 2018 11:34 pm

All times are UTC - 8 hours [ DST ]


Forum rules


Before posting a bug report or a feature request, search the forum for an older post on the same topic.



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue Jul 01, 2014 7:28 pm 
Offline

Joined: Thu May 09, 2013 8:14 am
Posts: 72
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 .. .


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 01, 2014 9:19 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5331
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.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 02, 2014 12:23 am 
Offline

Joined: Thu May 09, 2013 8:14 am
Posts: 72
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"


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 02, 2014 7:39 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5331
Looks like you have an extra quote at the end.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 02, 2014 10:46 am 
Offline

Joined: Thu May 09, 2013 8:14 am
Posts: 72
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"


Last edited by delicacy on Wed Jul 02, 2014 11:34 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 02, 2014 11:13 am 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5341
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"

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and did Classic Shell's testing and usability/UX feedback.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 02, 2014 11:34 am 
Offline

Joined: Thu May 09, 2013 8:14 am
Posts: 72
Thanks, fixed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.