-
Feb 16th, 2019, 09:38 AM
#1
Thread Starter
Lively Member
Creating Folder (Mkdir)
How create Folder in "Program File" Folder? This destination Denied.
After installation I want to create a folder in program file but there is an error message as below:
and I think this error message is due to the Access permission (as shown below )of the destination folder!
Can you help me and tell me how can I create a folder in this destination folder?
Sincerely
Mahmood Khaleel Pirani
#MKhP7
-
Feb 16th, 2019, 09:42 AM
#2
Re: Creating Folder (Mkdir)
The application needs to be run "As Administrator". Your installation package should be creating any needed folders during installation, not after.
In Windows, there are folders provided to save application settings, user settings, and more. Maybe if you provide more details, we can offer suggestions/solutions.
-
Feb 16th, 2019, 10:12 AM
#3
Thread Starter
Lively Member
Re: Creating Folder (Mkdir)
Originally Posted by LaVolpe
The application needs to be run "As Administrator". Your installation package should be creating any needed folders during installation, not after.
In Windows, there are folders provided to save application settings, user settings, and more. Maybe if you provide more details, we can offer suggestions/solutions.
Ok, I got it But How to create subfolders during packaging of my App? I have problem there. Therefore I decided to create subfolders after Installing the App.
-
Feb 16th, 2019, 10:16 AM
#4
Re: Creating Folder (Mkdir)
Code:
Declare Function IsUserAnAdmin Lib "Shell32" Alias "#680" () As Integer
this will tell u if your program is currently in Admin mode or not.
you can check this thread for more info about how to make your program run as admin.
http://www.vbforums.com/showthread.p...-automatically
-
Feb 16th, 2019, 11:29 AM
#5
Thread Starter
Lively Member
Re: Creating Folder (Mkdir)
Thank you I made changes in (SETUP.LST) file to solve my problem, I will use your API for my next work, However I haven't enough knowlagde on it
-
Feb 17th, 2019, 01:57 PM
#6
Re: Creating Folder (Mkdir)
If we're talking about sub-folders anywhere within C:\Program Files or C:\Program Files (x86), I think it's an absolutely horrible idea for a program to reach back into those folders and do anything at all (after initial installation). That's precisely what things like C:\ProgramData, C:\Users\[WhoEverYouAre]\Documents, or even the registry are for. Or, you could even create your own sub-folder in the C:\Users\[WhoEverYouAre]\YourSubFolder area. Or, if you've got a file-server on your system, use that for your data.
Best Regards,
Elroy
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Feb 18th, 2019, 04:01 PM
#7
Thread Starter
Lively Member
Re: Creating Folder (Mkdir)
Originally Posted by Elroy
If we're talking about sub-folders anywhere within C:\Program Files or C:\Program Files (x86), I think it's an absolutely horrible idea for a program to reach back into those folders and do anything at all (after initial installation). That's precisely what things like C:\ProgramData, C:\Users\[WhoEverYouAre]\Documents, or even the registry are for. Or, you could even create your own sub-folder in the C:\Users\[WhoEverYouAre]\YourSubFolder area. Or, if you've got a file-server on your system, use that for your data.
Best Regards,
Elroy
Many thanks dear Elroy for your comment. I know that it shouldn't be like that, but I have problem to create subfolders for my App. druring Packaging, therefore I tried to create subfolders after installation. For Now I got an idea to make changes in (SETUP.LST) file, and still I have problem I don't know how to create subfolders for my Apps. I want to create subfolders for different file types!!!
If you have an idea I appreciate your help
#MKhP7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|