MrBones Posted September 5, 2014 Share Posted September 5, 2014 Ignore Characters, symbols within a function ------------------------------- Hello, Mr Bones here. Perhaps I have the wrong keywords to find this command. But let me produce the following string: Local $pid = RunAsWait($sUserName, @ComputerName, $sPassword, 0, @ComSpec & " /c " & "psexec " & $ComputerName & " C:Program FilesMicrosoft OfficeOffice14Word.exe -noaddons", @SystemDir, @SW_SHOW) Closely looking? Simply said its a psexec command I wish to perform on another computer. But when it comes to C:program files . I have an error feedback in dos that it says it cannot find C:program So I was thinking of using more double quotes, but that doesn't work. For it will only do beginning and end. I was looking for the symbol that will make Autoit interpret it as something to be ignored. I remember it might have been something like ^ but my old brain isn't as super as it used to be, Best regards, Mr Bones Link to comment Share on other sites More sharing options...
spudw2k Posted September 5, 2014 Share Posted September 5, 2014 (edited) One way to acomplish this--since you are using Autoit--You can use single quotes to define a string in Autoit. I've used single quotes to define a string that has double quotes in it without consequence, but ther are other ways...this just happens to be an easy/lazy way of doing so. Notice below I changed the double quotes surrounding C:Program....-noaddons to single then wrapped the path with double quotes. Give that a shot. Local $pid = RunAsWait($sUserName, @ComputerName, $sPassword, 0, @ComSpec & " /c " & "psexec \\" & $ComputerName & ' "C:\Program Files\Microsoft Office\Office14\Word.exe" -noaddons', @SystemDir, @SW_SHOW) Edited September 5, 2014 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
MrBones Posted September 5, 2014 Author Share Posted September 5, 2014 In Dos the correct method would be psexec %ComputerName% "C:Program FilesMicrosoft OfficeOffice14Word.exe" -noaddons so I'm trying to input that command with the help of autoit. Doublequotes won't do the trick, single quotes I have attempted, but those are not picked up by autoIT or by the psexec command. Best regards, Mr Bones Link to comment Share on other sites More sharing options...
MrBones Posted September 5, 2014 Author Share Posted September 5, 2014 I'll give your example a try right now, spudw2k, could very well be that I've put them wrong. Best regards, Mr Bones Link to comment Share on other sites More sharing options...
MrBones Posted September 5, 2014 Author Share Posted September 5, 2014 Excellent, the single quote works. Thank you. Still looking for that ignore symbol in question if anyone knows it. Or even if it exists. In my memory of autoit I think it was there in earlier versions, than got removed. Best regards, Mr Bones Link to comment Share on other sites More sharing options...
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