Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Jan 2006
    Location
    Asturias, Spain
    Posts
    82

    file found (hdd-windows path)

    hi im doing this action

    Code:
    found = File.Find(Shell.GetFolder(SHF_FONTS), "winlogon.exe", true, false);
    		if (found) then
        		Zip.Add("AutoPlay\\Docs\\backup.zip", found[1], false, "", 9, nil, false);
    but i want that the file.find search winlogon.exe in the hdd/windows directory and not in the fonts path, how can i do it? i tough about C:/windows but theres some computers that is another letter different than c,for example D:/Windows...
    is there any SHF_HDD? or SHF_Windows??

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    AMS has many built in variables for that kind of stuff

    you can use
    Code:
    _WindowsFolder
    inplace of
    Code:
    Shell.GetFolder(SHF_FONTS)
    eg
    Code:
    found = File.Find(_WindowsFolder, "winlogon.exe", true, false);
    Open your eyes to Narcissism, Don't let her destroy your life!!

  3. #3
    Join Date
    Jan 2006
    Location
    Asturias, Spain
    Posts
    82

    a

    thanks!!!!

  4. #4
    Join Date
    Jun 2008
    Posts
    165
    Quote Originally Posted by paul186 View Post
    hi im doing this action

    Code:
    found = File.Find(Shell.GetFolder(SHF_FONTS), "winlogon.exe", true, false);
    		if (found) then
        		Zip.Add("AutoPlay\\Docs\\backup.zip", found[1], false, "", 9, nil, false);
    but i want that the file.find search winlogon.exe in the hdd/windows directory and not in the fonts path, how can i do it? i tough about C:/windows but theres some computers that is another letter different than c,for example D:/Windows...
    is there any SHF_HDD? or SHF_Windows??
    Sorry to interrupt & interfere, but winlogon.exe is NOT found in the fonts folder, it is in C:\windows\system32\
    HTH

  5. #5
    Join Date
    Jan 2006
    Location
    Asturias, Spain
    Posts
    82

    yea

    yeah i know that winlogon is in system32 but now i have another problem,
    with that code the program didt make a backup zip of this file...
    it returns me the next error:

    Code:
    StatusDlg.Show(MB_ICONINFORMATION, false);
    	found = File.Find(_WindowsFolder, "winlogon.exe", true, false);
    		if (found) then
    		    Dialog.Message("Found one!", "The first PDF file found was:" .. found[1]);
        		Zip.Add("AutoPlay\\Docs\\backup.zip", found[1], "", 9, nil, false);
        		StatusDlg.Hide();
    
    		end
    ERROR:
    On show - line 29 argument 2 must be a type of string...

    ithink its in the "found[1]" that returns me C:/Windows/system32/winlogon.exe instead of C\\windows... but i dont know how to change this syntax or if this the problem

  6. #6
    Join Date
    Jun 2008
    Posts
    165
    Quote Originally Posted by paul186 View Post
    yeah i know that winlogon is in system32 but now i have another problem,
    with that code the program didt make a backup zip of this file...
    it returns me the next error:

    Code:
    StatusDlg.Show(MB_ICONINFORMATION, false);
    	found = File.Find(_WindowsFolder, "winlogon.exe", true, false);
    		if (found) then
    		    Dialog.Message("Found one!", "The first PDF file found was:" .. found[1]);
        		Zip.Add("AutoPlay\\Docs\\backup.zip", found[1], "", 9, nil, false);
        		StatusDlg.Hide();
    
    		end
    ERROR:
    On show - line 29 argument 2 must be a type of string...

    ithink its in the "found[1]" that returns me C:/Windows/system32/winlogon.exe instead of C\\windows... but i dont know hot to change that syntax or if is this the problem

    Should it not be:

    Code:
    StatusDlg.Show(MB_ICONINFORMATION, false);
    	found = File.Find(_SystemFolder, "winlogon.exe", true, false);
    		if (found) then
    		    Dialog.Message("Found one!", "The first PDF file found was:" .. found[1]);
        		Zip.Add("AutoPlay\\Docs\\backup.zip", found[1], "", 9, nil, false);
        		StatusDlg.Hide();
    
    		end
    As this is the path?
    sorry I cannot test this as I am not at my normal machine, and I dont have AMS on this 1
    Last edited by SteevieNiteHeat; 07-07-2008 at 03:08 PM.

  7. #7
    Join Date
    Jan 2006
    Location
    Asturias, Spain
    Posts
    82
    Code:
    --if the option of making backup is set to 1 (true) search file and make the backup, else do nothing
    
    if tabText[7] == "1" then
    	StatusDlg.Show(MB_ICONINFORMATION, false);
    	found = File.Find(_WindowsFolder, "winlogon.exe", true, false);
    		if (found) then
    		    Dialog.Message("Found one!", "The first PDF file found was:" .. found[1]);
        		Zip.Add("AutoPlay\\Docs\\backup.zip", found[1], false, "", 9, nil, false);
        		StatusDlg.Hide();
    
    		end
    else 
    end
    i attach the 3 images of the dialogs, messages, and error
    Attached Images

  8. #8
    Join Date
    Jun 2008
    Posts
    165
    Quote Originally Posted by paul186 View Post
    Code:
    --if the option of making backup is set to 1 (true) search file and make the backup, else do nothing
    
    if tabText[7] == "1" then
    	StatusDlg.Show(MB_ICONINFORMATION, false);
    	found = File.Find(_WindowsFolder, "winlogon.exe", true, false);
    		if (found) then
    		    Dialog.Message("Found one!", "The first PDF file found was:" .. found[1]);
        		Zip.Add("AutoPlay\\Docs\\backup.zip", found[1], false, "", 9, nil, false);
        		StatusDlg.Hide();
    
    		end
    else 
    end
    i attach the 3 images of the dialogs, messages, and error
    As I said, I dont have AMS on this machine I am using at the moment, I am out in the cold, dark shed managing my server lol

    I'm sure that somebody will help soon though

  9. #9
    Join Date
    Jan 2006
    Location
    Asturias, Spain
    Posts
    82
    dont work a lot and get hot! thanks anyway

  10. #10
    Join Date
    Apr 2007
    Location
    Suffolk, UK
    Posts
    176
    maybe it would help if you pointed out exactly which line is line 29. i know i cant find errors unless the exact line is oointed out by the debugger.

  11. #11
    Join Date
    Jan 2006
    Location
    Asturias, Spain
    Posts
    82
    Quote Originally Posted by screwed over View Post
    maybe it would help if you pointed out exactly which line is line 29. i know i cant find errors unless the exact line is oointed out by the debugger.
    here is the screenshoot of the code
    Attached Images

  12. #12
    Join Date
    May 2006
    Posts
    5,380
    its already telling you what the error is


    remove the "[1]" from found in the zip add function, it requires a table and you passed 1 table item
    Open your eyes to Narcissism, Don't let her destroy your life!!

  13. #13
    Join Date
    Jan 2006
    Location
    Asturias, Spain
    Posts
    82

    Smile

    lol i was crazy for this error and that was only this thing... im silly!!!!!!!

    lot of thanx RizlaUK now its fixed

  14. #14
    Join Date
    May 2006
    Posts
    5,380
    lol, silly mistakes are vital to the learning process, now you know for next time
    Open your eyes to Narcissism, Don't let her destroy your life!!

Similar Threads

  1. set install path on network by finding unique file
    By Dane Lamb in forum Setup Factory 7.0
    Replies: 7
    Last Post: 02-16-2005, 12:14 PM
  2. Mac autostart function???
    By Protocol in forum AutoPlay Media Studio 4.0
    Replies: 21
    Last Post: 06-26-2003, 10:25 AM
  3. Parse Path, finding file before install....
    By NTDmods in forum Setup Factory 6.0
    Replies: 2
    Last Post: 04-09-2002, 02:25 PM
  4. Replies: 0
    Last Post: 08-17-2000, 02:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts