Jump to content

Need To Change Frum Vbs To Autoit


Recommended Posts

  • Moderators

hi all i have thss vbs code what would it convert to in autoit thanks beau

set colVolatileEnvVars = objShell.Environment("Volatile")

colVolatileEnvVars("portabledrive") = strdriveletter

Next time you may want to explain what it does, and also provide all the code not just a section.

Try this:

$oShell = ObjCreate('WScript.Shell')
$aPath = StringSplit(@ScriptDir, "\")
$sStrDriveLetter = $aPath[1]
$oColVolatileEnvVars = $oShell.Environment("Volatile")
$oColVolatileEnvVars("portabledrive") = $sStrDriveLetter
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...