tsjippy Posted March 6, 2015 Share 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. Link to comment Share on other sites More sharing options...
JohnOne Posted March 6, 2015 Share 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. Link to comment Share on other sites More sharing options...
tsjippy Posted March 6, 2015 Author Share Posted March 6, 2015 Tried, no luck Link to comment Share on other sites More sharing options...
Solution tsjippy Posted March 6, 2015 Author Solution Share 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) 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