dmcgannon Posted October 22, 2020 Author Share Posted October 22, 2020 Actually changed the %windir% to C:\Windows\notepad.exe... I think that's the right path for the notepad app. Link to comment Share on other sites More sharing options...
Nine Posted October 22, 2020 Share Posted October 22, 2020 nope, check again... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
pseakins Posted October 22, 2020 Share Posted October 22, 2020 2 hours ago, dmcgannon said: Actually changed the %windir% to C:\Windows\notepad.exe... I think that's the right path for the notepad app. 53 minutes ago, Nine said: nope, check again... Perhaps not really relevant to this thread but a Windows Explorer search for "notepad.exe" in my Windows 7 - 64bit system finds no less than SEVEN individual copies of notepad.exe. One of them is in fact in C:\Windows and %windir% = "C:\Windows". Phil Seakins Link to comment Share on other sites More sharing options...
Gianni Posted October 22, 2020 Share Posted October 22, 2020 just a guess: it's worth trying to add these few lines to the beginning of the script and try again one more time. Let us know... #include <WinAPIFiles.au3> ;Turn off redirection for a 32-bit script on 64-bit system. If @OSArch = "X64" And Not @AutoItX64 Then _WinAPI_Wow64EnableWow64FsRedirection(False) Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
dmcgannon Posted October 23, 2020 Author Share Posted October 23, 2020 Still no dice. It always gives me an exit code of 1... whatever that means. And no script appears to compile. Link to comment Share on other sites More sharing options...
dmcgannon Posted October 23, 2020 Author Share Posted October 23, 2020 (edited) #include <WinAPIFiles.au3> ;Turn off redirection for a 32-bit script on 64-bit system. If @OSArch = "X64" And Not @AutoItX64 Then _WinAPI_Wow64EnableWow64FsRedirection(False) RunAsWait("localadmin", @ComputerName, "your admin password here" , 1, "C:\Program Files\HandBrake\HandBrake.exe") I've tried 0 , 1.. not sure what I should be using there honestly. Edited October 23, 2020 by dmcgannon Link to comment Share on other sites More sharing options...
dmcgannon Posted October 26, 2020 Author Share Posted October 26, 2020 Anyone got any other ideas? If it's possible, i would prefer not to set my users as local admins, but it may be unavoidable. Link to comment Share on other sites More sharing options...
dmcgannon Posted October 26, 2020 Author Share Posted October 26, 2020 Okay... I've tried playing with the scripts and here's my latest code, that is an admin user account that has been created specific to this function. Also the correct path for the application.... I've tried my code with notepad and it launched perfectly. When I try this application, a command window pops up, then closes and nothing seems to happen. RunAsWait("SpecoTec","Oburgcounty","Password Here", 0, "C:\Program Files (x86)\Speco Technologies\SpecoTech Multi Client\SpecoMC.exe") Link to comment Share on other sites More sharing options...
Nine Posted October 26, 2020 Share Posted October 26, 2020 Even if you run as an admin, you may need to have #RequireAdmin also. Have you tested it ? Can you see what is showing in the DOS console ? (try make a printscreen) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
dmcgannon Posted October 26, 2020 Author Share Posted October 26, 2020 Okay.. so I don't want the users as admin so where do I put the #requireadmin and how do I run it as a non-admin user then? I used to have a pretty good grasp of AutoIt, but Windows 10 has thrown me off. Link to comment Share on other sites More sharing options...
caramen Posted October 27, 2020 Share Posted October 27, 2020 (edited) Bro help us to help you. Answer on the correct way : Post always the code you are using.... (Always) In this kind of tag Thanks :) From what I understand there is misunderstanding of what you want to do and what you are using. Try that and replace with "C:\Program Files (x86)\Speco Technologies\SpecoTech Multi Client\SpecoMC.exe": Local $sFile = "C:\Windows\notepad.exe" Local $iPID = ShellExecute($sFile) These lines : Local $sFile = "C:\Program Files (x86)\Speco Technologies\SpecoTech Multi Client\SpecoMC.exe" Local $iPID = ShellExecute($sFile) -You determine your app first. -You lunch the app. And then in this case if you need admin right in the computer that run the script. To Execute the application under the admin account. Then : #RequireAdmin Local $sFile = "C:\Program Files (x86)\Speco Technologies\SpecoTech Multi Client\SpecoMC.exe" Local $iPID = ShellExecute($sFile) Edited October 27, 2020 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
TheXman Posted October 27, 2020 Share Posted October 27, 2020 @dmcgannon Have you figured out why you are getting the @error = 1? If not, I'm sure I can help you get past it so you can continue to make progress. CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
dmcgannon Posted October 27, 2020 Author Share Posted October 27, 2020 Never could isolate my error. I finally gave up and went about what I needed a different way. thanks to all for the help though. Link to comment Share on other sites More sharing options...
caramen Posted October 27, 2020 Share Posted October 27, 2020 My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki 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