FMS Posted August 18, 2016 Posted August 18, 2016 Hello, I've some troubles whit the run command. Below u see 2 command's , 1 is working and the other not. (the first isn't working) I think the problem is in te space between program and files.Also I've treid every thing i could think of or the helpfiles handed to me. (or maybe I din't find the correct answer:)) I tried so mush that i don't know anymore if it's the space between program files or not. Could somebody point me in the right direction? Not working: Run(@ComSpec & " /c psexec -i \\127.0.0.1 -u username -p pass -h -d /accepteula C:\Program Files\some_prog\Shell.exe" ,"C:\tools", @SW_HIDE) Working : Run(@ComSpec & " /c psexec -i \\127.0.0.1 -u username -p pass /accepteula cmd" , "C:\tools" , @SW_HIDE) as finishing touch god created the dutch
l3ill Posted August 18, 2016 Posted August 18, 2016 (edited) Might be the missing " before the C:/ and/or a comma as well (you'llhave to test) never mind its a parameter separator... Edited August 18, 2016 by l3ill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Moderators JLogan3o13 Posted August 18, 2016 Moderators Posted August 18, 2016 Instead of "C:\Program Files..." have you tried the @ProgramFilesDir macro to see if that gives you any different behavior? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
FMS Posted August 18, 2016 Author Posted August 18, 2016 I've tried this indeed, but unfortanaly this gives me back : "C:\Program Files(x86)" instead of the "C:\Program Files" i need. as finishing touch god created the dutch
Mobius Posted August 18, 2016 Posted August 18, 2016 Run('psexec -i \\127.0.0.1 -u username -p pass -h -d /accepteula "C:\Program Files\some_prog\Shell.exe"' ,"C:\tools", @SW_HIDE) How about when using correct command line quotation above for space tolerance?
FMS Posted August 18, 2016 Author Posted August 18, 2016 This totaly did the trick @Mobius . I was to focused on the quotation of the program files. Now everything is working just fine..... many thanks and thumbs up. as finishing touch god created the dutch
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now