nicknuke Posted January 27, 2022 Share Posted January 27, 2022 I am trying to automate email settings for our mailserver for outlook clients.. Since our users use various office versions.. the only way i can get installation path is by reading from this registry : From there i usually just fire up MLCFG32.CPL for adding email accounts.. But somehow the Run / RunWait never bring up the window ( manually run from command prompt window does, of course ). Here is my simple lines : $Officepath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE", "Path") $cpl = 'MLCFG32.exe' MsgBox (0, "OFFICE PATH", '"C:\Windows\System32\control.exe ' & $Officepath & '' & $cpl &'"') Run ('"C:\Windows\System32\control.exe ' & $Officepath & '' & $cpl &'"') The Messagebox correctly showing the complete command to be run... but when i put it in Run() on the next line.. nothing happened. Many thanks for the help.. Link to comment Share on other sites More sharing options...
Nine Posted January 27, 2022 Share Posted January 27, 2022 Could be redirection issue. Search forum for that. Or try running x64. In any case, you should put some error handling to understand why a statement does not work as expected. “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...
Developers Solution Jos Posted January 27, 2022 Developers Solution Share Posted January 27, 2022 There are several issues with the script.... like this one: $cpl = 'MLCFG32.exe' This works for me: $Officepath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE", "Path") $cpl = 'MLCFG32.cpl' Run ('"C:\Windows\System32\control.exe" "' & $Officepath & $cpl & '"') Jos nicknuke 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
nicknuke Posted January 27, 2022 Author Share Posted January 27, 2022 Wow it works ! I kinda knew I messed up the single and double quotes somewhere in there... Thank you so much Sir ... 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