Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using system variables in AutoIt

Featured Replies

Is using system variables like %systemdrive% in AutoIt possible?

I tried something like this but it didn't work.

Run("%systemdrive%\ABC\abc.exe")


You have to put AutoItSetOption("ExpandEnvStrings",1) in your script

it defaults to 0.

Or you can

Run(EnvGet('systemdrive') & '\ABC\abc.exe')

Use the following...

@WindowsDir...C:\Windows

@SystemDir...C:\Windows\System32

*EDIT* Corrected. Thanks for input. Yes - see help files as many more exist.

Actually :(

C:\ = @HomeDrive

C:\Windows = @WindowsDir

C:\Windows\System or C:\Windows\System32 = @SystemDir

There is a huge list of them in the help file...look under "Macro Reference"

Any ways your sample code would look like so:

Run( @HomeDrive & "\ABC\abc.exe" )

this isn't a help for the autoit script but to left it clear just open your command prompt (cmd.exe from run dialog for example) and then type "SET" without quotes to see the variables available.

note: some of them like %APPDATA% won't be available until windows is fully installed so don't use them on cmdlines.

you can use standard autoit variables when windows has already set up...

however, during windows installation, you cannot use autoit built-in variables (like @HOMEDRIVE, etc...), but you're only restricted to declare variables.. like:

$sysdrive=EnvGet("SystemDrive")
..
...
....
RegWrite($Key&"\001", "", "REG_SZ","Preparing Installation...")
RegWrite($Key&"\001", "1", "REG_SZ",$sysdrive&"\Others\prepare.exe")

hmmm couldn't one also do it like so-

RunWait(@ComSpec & " /c start %systemdrive%\ABC\abc.exe", "", @SW_HIDE)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.