File.DoesExist ?????

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • octane6228
    Forum Member
    • Feb 2004
    • 47

    File.DoesExist ?????

    Hi ...I'm trying to search for a file (divx.dll)in "C:\Windows\system32\" but can't seem to get it to work....I can get it to find a file (divx.dll) if the file resides in the windows directory only......as the code below shows....
    ----------------------------------------------------------------------------


    -- Checks to see if a particular file exists.
    Answer = File.DoesExist (_WindowsFolder.."\\dixv.dll");

    -- If the file does not exist, display a message notifying the user.
    if Answer == false then
    result = Dialog.Message("Notice", "The specified file does not exist.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

    else
    result = Dialog.Message("Notice", "The specified file EXISTS.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end

    ----------------------------------------------------------------------------

    I've tried changing the "_WindowsFolder" to a full path (eg. C:\windows\system32) but it doesn't return the correct answer, just says "The specified file does not exist."

    How do I get it to search the C:\windows\system32 directory for the divx.dll file ? My non-working code for this is below.....

    ----------------------------------------------------------------------------


    -- Checks to see if a particular file exists.
    Answer = File.DoesExist (C:\WINDOWS\system32 ,"\\dixv.dll");

    -- If the file does not exist, display a message notifying the user.
    if Answer == false then
    result = Dialog.Message("Notice", "The specified file does not exist.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

    else
    result = Dialog.Message("Notice", "The specified file EXISTS.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end

    ----------------------------------------------------------------------------

    Thanks for your help.
  • Ted Sullivan
    Indigo Rose Staff Member
    • Oct 2003
    • 963

    #2
    Try using the global variable "_SystemFolder" rather than "_WindowsFolder"

    From the Command Reference: Variables/Global Variables


    _SystemFolder
    The path to the user’s Windows System folder (e.g. "C:\Windows\System").
    New Release: Setup Factory 9.6 adds Windows 11 compatibility and support for hardware token OV/EV Code Signing certificates.

    Comment

    Working...
    X