Jump to content
Sign in to follow this  
trashy

batch to au3 and Environment Variables

Recommended Posts

trashy

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

Share this post


Link to post
Share on other sites
Palestinian

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.

Share this post


Link to post
Share on other sites
trashy

Thanks I knew it would be something simple I was missing.

Share this post


Link to post
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
Sign in to follow this  

×