tsjippy Posted March 6, 2015 Posted March 6, 2015 Hi there, in my autoit script I run the following command: $result = run('"' & $SystemDrive & 'Windows\System32\netsh.exe" wlan export profile key=clear folder="' & $installationpath & '\InstallationFiles\Network"', $SystemDrive & 'Windows\System32', @SW_HIDE, $stderr_child + $stdout_child) This works great under windows 7 and 8, but on Windows 10 I get this error: The following helper DLL cannot be loaded: WLANCFG.DLL. The following command was not found: wlan export profile key=clear folder=F:WindowsInstallerProInstallationFilesNetwork. However, if I run the command in on the same machine in a command prompt it works fine. Any Ideas? Running with @comspec did not help.
JohnOne Posted March 6, 2015 Posted March 6, 2015 Try... $result = run('"' & @SystemDir & '\netsh.exe" wlan export profile key=clear folder="' & $installationpath & '\InstallationFiles\Network"', $SystemDrive & 'Windows\System32', @SW_HIDE, $stderr_child + $stdout_child) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Solution tsjippy Posted March 6, 2015 Author Solution Posted March 6, 2015 FOund the answer: If @OSArch = "X64" Then DllCall('kernel32.dll', 'int', 'Wow64EnableWow64FsRedirection', 'int', 0) $result = run('"' & $SystemDrive & 'Windows\System32\netsh.exe" wlan export profile key=clear folder="' & $installationpath & '\InstallationFiles\Network"', $SystemDrive & 'Windows\System32', @SW_HIDE, $stderr_child + $stdout_child) ProcessWaitClose($result, 2) If @OSArch = "X64" Then DllCall('kernel32.dll', 'int', 'Wow64EnableWow64FsRedirection', 'int', 1)
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