Search the Community
Showing results for tags 'EnvSet'.
-
After months and months of work I hit the brain dead space. I think I lost 99.83 percent of my brain power. And then this EnvSet("MYVAR") How do you use it? I need to run a exe in the directory above the current directory. Current @Script dir = C:00new Need To run a file in this C:00new00Au directory. and for 3 days now I for the life of me forgot everything ! C:00new00Au I try $s2filepath = IniRead(@ScriptDir & "\Programsettings.ini", "Filepaths", "SetupDir", "") IniRead(@ScriptDir & "\Programsettings.ini", "Filepaths", "SetupDir", "$s2filepath") FileChangeDir($s2filepath&"\") EnvUpdate Run("\0Rosewd6x32_2.exe") and $s2filepath = IniRead(@ScriptDir & "\Programsettings.ini", "Filepaths", "SetupDir", "") IniRead(@ScriptDir & "\Programsettings.ini", "Filepaths", "SetupDir", "$s2filepath") Run(@comspec & " /c cd_UP_one.bat","",@SW_HIDE) and ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Question ;If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer ;$iMsgBoxAnswer = MsgBox(36,"Add Shortcut?","Add Desktop Shortcut?", @ScriptDir ) ;Select ; Case $iMsgBoxAnswer = 6 ;Yes ;Run(@comspec & " /c cd_UP_one.bat","",@SW_HIDE) ; Case $iMsgBoxAnswer = 7 ;No ;Run("cd_UP_one.bat") And Now we get to the Junk pile.. just stuff tried.. that failed./ And Now we get to the Junk pile.. just stuff tried.. that failed./ Func startnewfile() ;MsgBox($MB_SYSTEMMODAL, "Template10", "tRegister startnewfile. All is going well.") ;Local $s2filepath = IniRead(@ScriptDir & "\Programsettings.ini", "Filepaths", "SetupDir", "") ;IniRead(@ScriptDir & "\Programsettings.ini", "Filepaths", "SetupDir", $s2filepath) ;FileChangeDir($s2filepath) ;EnvUpdate ;Global $s2filepath ;Local $sDir = IniRead(@ScriptDir & "\Programsettings.ini", "Filepaths", "SetupDir", "") ;IniRead(@ScriptDir & "\Programsettings.ini", "Filepaths", "SetupDir", $sDir) ;Run(@comspec & " /c nircmd.exe exec 0Rosewd6x32_2.exe","",@SW_HIDE) ;Run(@comspec & " /c takeit.bat","",@SW_HIDE) ;Run ("takeit.bat") ;OnAutoItExitUnRegister ( "startnewfile" ) ;GUIDelete() ;Exit Just totally lost and confused. I forgot how to run a exe in a directory below where you are at.. How about a pointer please// And whats the deal with EnvSet? if i can't use it like EnvSet($aValue) but EnvSet("MYVAR") does not compute.