Jump to content

batch to au3 and Environment Variables


Go to solution Solved by Palestinian,

Recommended Posts

Seems like I ran into something like this once before when using environment variables.

This is the command line to call device manager.

%WINDIR%system32mmc.exe /b %WINDIR%system32devmgmt.msc

This is what I tried for autoit script.

Run(@SystemDir & "mmc.exe /b" & @SystemDir & "devmgmt.msc")

But it's like it doesn't read beyond the /b switch.

I bet there's an easy solution but I haven't found it.

I know I could just call the batch file, that's not what I want.

Edited by trashy
Link to comment
Share on other sites

  • Solution

Seems like I ran into something like this once before when using environment variables.

This is the command line to call device manager.

%WINDIR%system32mmc.exe /b %WINDIR%system32devmgmt.msc

This is what I tried for autoit script.

Run(@SystemDir & "mmc.exe /b" & @SystemDir & "devmgmt.msc")

But it's like it doesn't read beyond the /b switch.

I bet there's an easy solution but I haven't found it.

I know I could just call the batch file, that's not what I want.

 

It does, but it's not getting the correct command, there should be a space between the /b switch and the %WINDIR%,

#RequireAdmin
Run(@SystemDir & "\mmc.exe /b " & @SystemDir & "\devmgmt.msc")

 

That should work just fine.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...