I'm About to Give Up on InnoScript - Part 2

Started by Randem, December 22, 2007, 10:34:58 AM

Previous topic - Next topic

Tom Buggy

No, neither InnoScript (at least the latest versions) or Inno Setup require administrator privileges.
 
I asked the wrong question - I should have asked about the Setup program created by Inno Setup with the script from Inno Script.  Is not one of the InnoScript Parameters: Privileges Required: Admin?
 
BTW: I just finished installing XP Home and I can change/create/delete in those folders as a limited user...
 
Which folders are you referring to?  If they're the Local ones with yourusername that doesn't do me any good.  Again, my situation is a common set of data files used by All Users.
 
I'm going to test things beyond the text file insertion via the Run menu by creating a small app that creates folders and files in various Documents and Settings folders and then modifies the files.

Randem

BTW: I just finished installing XP Home and I can change/create/delete in those folders as a limited user...

Randem

No, neither InnoScript (at least the latest versions) or Inno Setup require administrator privileges. Neither app registers components, writes to restricted areas in the registry on the disk by default. That is basically what makes an app Limited User Compliant.

Tom Buggy

My unfamiliarity with the Security mess is showing.  Conceptually, I see Run AS Administrator different than Run BY Administrator, and I'm thinking in terms of a PROGRAM (app) versus a USER.  (Does not InnoScript and Inno Setup require Run as Administrator?)
 
But, I trust your knowledge and experience, and your conclusion that some entity can preclude Run as Administrator on an app.  
 
With that I'm off to bed.

Randem

Let's say your app got into company hands and they operate on a network. They lock all the users down and they will not be able to run as administrator. You loose that sale. Or a household that shares one computer. Only the person who purchased the computer  will likely have administrator privileges and the rest will be Limited Users. They will not be able to use your software. Possibly another sale lost.
 
If people can't get your software to run, they talk...

Tom Buggy

Yes, I have such a folder.  I CAN'T create the text file there.
 
You say with respect to Run as Administrator: Especially if you want your app to be used widespread.  Why is that?

Randem

Sure but avoid it at most cost!!! Especially if you want your app to be used widespread. Curious, Do your have a folder something like  
 
C:Documents And SettingsyourusernameLocal SettingsApplication Data
 
If so then try the test there. The place where you are attempting is the roaming area of the profile. See if there is a local part.

Tom Buggy

It looks like the Vista Home editions (Basic and Premium) have the same situation as XP Home with respect to folder and file permissions - no built-in capability to change.  Emotionally, how could Microsoft do such a restrictive thing?
 
It may be that the most direct way to overcome the situation is to get the app to Run as Administrator.  Can that be done?

Tom Buggy

Can you run the System Thing Automatically on installation of your software?
 
I don't think so, at least for Method #1 - it includes a couple of GUI screens that require input.  There is a Method #3 in the TweakHound article that might be able to be automated.  I'll look at it further.

Randem

Good you found a solution. I haven't yet finished my installation of XP Home yet. It's still underway in the background... I'll let you know the results.
 
Can you run the System Thing Automatically on installation of your software?

Tom Buggy

Mystery solved - good 'ol Google.  THERE IS NO BUILT-IN WAY TO SET FOLDER AND FILE PERMISSIONS IN XP HOME!  Do a Google search on XP Home Permissions and you'll see a bunch of hits on the subject, including and article from TweakHound and some $10 software.
 
I tried the TweakHound Method #1 (SHRPUBW from Start/Run) on my Virtual XP Home machine and it worked - I was able to create the new text file in  D&CAll UsersApplication DataGHMDATA in the Limited User account.
 
Notes on SHRPUBW:
-- It must be run in the Administrator account (get Access Denied in Limited User).
 
-- The first option on the second screen is different than the article (it says read only versus full control).  Customize has to be used.
 
I suspect that most of my XP users have Home versus Pro.  That means I'm going to have to burden them with a system thing.  Also, I'm wondering if the situation exists in some of the Vista versions.  I have the Business Edition which has built-in capability to change permissions.  I'll have to find out about Home Premium and Home Basic.
 
To answer your question, no, I haven't yet taken a thorough look at your project - family visitors.  I'll do so over the weekend after they leave.

Randem

We have XP Pro. I guess I could load up a Home version to see if I get the same results.
 
You will be able to get it to run in Inno. You do know that after you install a program in the ADMINISTRATOR account you should run it once so that any registration that the program needs will be done. However is the program attempts to register things on the fly each time it loads and does other things it should not do it will fail when running in Limited User Mode.
 
Did you look at the project I posted yet?

Tom Buggy

I have a XP Home machine on Virtual PC 2007 (the one I've been using for testing).  The only thing that's been added to the original setup is the Dymo Label program, a screen capture program, and the PDW-created installation of my app -- plus a slew of automatic updates from Microsoft.
 
I get the same results when creating a text file on this machine as I do on my XP Home development machine:
 
-- Same results for BOTH the All Users and Application Data folders
-- Administrator: File created successfully
-- Limited User: Cannot create file - Access Denied
 
I suppose I can create another Virtual XP machine but it's quite a bother given the need to install XP again and I'm not sure it's going to make a difference.  But I'll do it if you think it's worthwhile.
 
By the way, I tried to use the PDW-generated Setup for my app in the Limited Users account.  When I tried to install as the Limited User it failed with Unable to generate installation log file.  When I installed under my account (Administrator) it installed but the program does not appear in the list of program (All Programs) for the Limited User.  However, it does appear in the Limited User's Program FilesAppName folder.  I then installed as Administrator in Program FilesAppName1 (a new subfolder).  That folder appears in the Program Files folder for both accounts.
 
I then tried to run the app from within Program Files in the Limited Users account,  I got an error about a registration error with one of the components (ResizeKit.ocx).
 
Trying to be complete in what is becoming more confusing, I uninstalled everything (no app in either account) and installed as Administrator in the Limited User account.  Again, the program did not appear in All Programs under that account but did appear in the Administrator account and could be run from All Programs.  Also again, the program was in Program Files of the Limited account but could not be run from there because ofthe .ocx registration problem.
 
So, I can neither install nor run from the Limited User account.  It looks like your warnings about PDW are valid.  Then again, I can't get it to run via Inno either.

Randem

I just retried and all worked as was expected... Do you have Virtual PC 2007. If so you could create a new XP machine and try it there for something seems wrong on your machine.

Tom Buggy

Now I am going to bed.  See you tomorrow.