on 03-15-2014 1:07 PM
Hello Experts,
I have the below configuration:
OS - Win 7
PB Version - 7
I have a list box in a window which I am trying to populate using the DirList function.
I have the below code in the open event of the window:
ls_commandline = message.stringparm
this.is_dir = ls_commandline
I have the below code in the postopen() event of the window:
If GetFileOpenName("Select any PBL", is_dir, ls_junk, "PBL", "PBL Files (*.PBL),*.PBL") = 1 then
is_dir = left(is_dir, len(is_dir) - len(ls_junk))
else
close(this)
return
end if
end if
if len(is_dir) > 0 then
if right(is_dir, 1) <> "\" then
is_dir = is_dir + "\"
end if
lb_1.DirList(is_dir + "*.pbl", 0)
end if
So, the user can either select the directory through the File Open Dialog or can pass the same through the command line arguments in which case the is_dir would be already populated when it comes to this event.
Now, when i run the exe by double-clicking, the FileOpen Dialog opens and when i select any directory, the DirLIst populates the List Box with all the pbls in that directory.
But when i run the same through command prompt and pass the directory via command line arguments, DirList function is not working and it returns FALSE. I am calling the exe like this:
call C:\Users\samiagra\Desktop\pbdups.exe s:\buildsource
The same thing is working fine in Windows XP.
I also tried using the combination of FindFirstFileA and FindNextFileA API functions to populate the List Box but that didn't work either form command prompt.
Please let me know if you have face this kind of issue and is there any solution.
Thanks,
Samir
Hi,
this could be similar to the problem discussed here:
Some questions to locate the problem:
1. Are the directories you try to open on a network drive?
2. Does the command prompt run with elevated rights (runas administrator)?
If so, please try to change the situation: Test with a local drive and/or run prompt without admin rights.
This problem can occur when the administrator doesn't share the mappings with the user logged on, for further information and workaround look at this: Some Programs Cannot Access Network Locations When UAC Is Enabled
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
is there anything else "special" about the drive s:\, you mentioned in your post above? Can you access it from the command prompt with admin rights and does a "dir" work?
What happens, when you try the same with a folder on c:\?
What happens, if you run the command prompt not as administrator?
Regards
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.