Win7 install system directory permissions

This forum has been archived and is no longer active.

The new forum is located at:

https://sourceforge.net/apps/phpbb/installjammer/

You may continue to view and search the topics in this forum, but no new posts can be created.

Win7 install system directory permissions

Postby quang777 » Mon May 16, 2011 6:32 pm

We have an existing installjammer mpi setup that works on XP, however we're getting a lot of requests about problems with Win7 installs. One of the strange differences is the directory permissions. Our program needs to write to c:\windows\temp for some temporary files. As a test, I'm installing this as an administrative user. Installation appears to be successful, however when the program starts up and tries to access/write to this directory, it gets file errors because it's unable to write to it.

However, as soon as I visit the directory via File Explorer, I'm prompted by Windows:
"You don't currently have permission to access this folder. Click Continue to permanently get access to this folder."

Is it possible via IJ, to "preauthorize" this? Unless we tell our users to do this for every install, the software won't work correctly.
Are there other Win7 gotchas (migrating from XP installers?). I'm using Win7 Pro 64-bit.

Thanks,
Q
quang777
 
Posts: 5
Joined: Wed Feb 16, 2011 2:49 pm

Re: Win7 install system directory permissions

Postby quang777 » Wed Jul 20, 2011 6:43 pm

Anyone? Builer??
quang777
 
Posts: 5
Joined: Wed Feb 16, 2011 2:49 pm

Re: Win7 install system directory permissions

Postby hsehdar » Thu Jul 21, 2011 12:40 am

Hi,

Running installer with administrative privileges may help solve most problems. Since this is already attempted another way is to check within the installer on the administrative privileges. Go to General Information > Platform Information and on right pane expand Windows. Make sure the item Require Administrator is set to Yes.

Thank you,
With regards
hsehdar
 
Posts: 134
Joined: Sun Sep 26, 2010 7:16 am

Re: Win7 install system directory permissions

Postby quang777 » Tue Aug 16, 2011 6:44 pm

Thanks for the suggestion.

Our installer config already has that flag set:
Windows,RequireAdministrator
{Yes}

Looks like by default on Win7, the c:\windows\temp is not writable by a "user", whether or not the user is in the administrator group or
not. To get access to it, you have to "visit" (open) the directory once and windows will prompt:
"You don't currently have permission to access this folder."
"Click Continue to permanently get access to this folder".

Looks like you can also use the cacls command to set the appropriate permissions as well:
cacls "C:\windows\temp" /e /r USER revokes permission to resource
cacls "C:\windows\temp" /e /g USER grants permission to resource

However, I think it maybe just easier to use the %TEMP% instead of c:\windows\temp to avoid the permission issue entirely. However, I'd like to know if there's a way to set installjammer to do this. I guess I can make a batch file run the cacls command, but that seems like a hack.

Q
quang777
 
Posts: 5
Joined: Wed Feb 16, 2011 2:49 pm

Re: Win7 install system directory permissions

Postby hsehdar » Wed Aug 24, 2011 7:22 am

Use <%TEMP%> which is built-in IJ.
hsehdar
 
Posts: 134
Joined: Sun Sep 26, 2010 7:16 am


Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest