Guest Ran Posted January 9, 2004 Posted January 9, 2004 Hi All, In DOS batch file, I used this command , rem Win2K/XP if %SystemDrive%==C: goto C_Drive if %SystemDrive%==D: goto D_Drive rem Win9x if %windir% == C:\WINDOWS if %windir% == D:\WINDOWS How to do this in Autoit? Thanks Ran
GrahamS Posted January 9, 2004 Posted January 9, 2004 (edited) $systemdir = EnvGet("SystemDrive") select case $systemdir == "C:" MsgBox(0,"", "System Dir is C:") case $systemdir == "D:" MsgBox(0,"", "System Dir is D:") case else MsgBox(0,"", "Unknown - " & $systemdir) EndSelect If you're needs are simple then you could just use if $systemdir == "C:" then ... endif instead of the select statement EDIT: The above is valid AutoIt 3 code - worth upgrading? Edited January 9, 2004 by GrahamS GrahamS
Guest Ran Posted January 11, 2004 Posted January 11, 2004 Hi everyone, Thanks for the help. I manage to get it work. Ran
Recommended Posts