nicknuke 0 Posted January 27 Share Posted January 27 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 post Share on other sites
Nine 1,515 Posted January 27 Share Posted January 27 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. Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search content in 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 GIF Animation (cached) Screen Scraping Link to post Share on other sites
Developers Solution Jos 2,649 Posted January 27 Developers Solution Share Posted January 27 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 post Share on other sites
nicknuke 0 Posted January 27 Author Share Posted January 27 Wow it works ! I kinda knew I messed up the single and double quotes somewhere in there... Thank you so much Sir ... Link to post Share on other sites
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