kman Posted January 16, 2007 Posted January 16, 2007 Hello everyone. Of course a newbie here but having fun. I am trying to write a script that will just search for a particular file or will look in either the C:\WINNT or C:\WINDOWS folder depending on the OS it is running on. The idea is to see if a particular .ini file exists and if it doesnt then run an install of the designated program. Any help would be appreciated. Thank you!!
MHz Posted January 16, 2007 Posted January 16, 2007 Welcome kman, Just use FileExists for the known file. If FileExists(@WindowsDir & '\Filename.ini') Then Run('setup.exe') EndIf No matter what the window folder is called, @Windowdir will hold the value of the path.
Paulie Posted January 16, 2007 Posted January 16, 2007 Hello everyone. Of course a newbie here but having fun. I am trying to write a script that will just search for a particular file or will look in either the C:\WINNT or C:\WINDOWS folder depending on the OS it is running on. The idea is to see if a particular .ini file exists and if it doesnt then run an install of the designated program. Any help would be appreciated. Thank you!!Well,You could just substitute the directory with the @WindowsDir macro MsgBox(0,"Windows Diectory", @WindowsDir)oÝ÷ Øêò¢ç(ºWn±ëayú'¶+©MjºèÂÊZËr
kman Posted January 16, 2007 Author Posted January 16, 2007 Thank you so much for the replies!! I had been messing around with the FileExist before but was trying to use it for both directories. It was the @windowsDir that helped me!! Thanks again for everyones time!!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now