Jump to content

Find File and set the rights on all systems


sully25
 Share

Recommended Posts

Hello everybody.

I am having a problem regarding a file . A program installs automaticaly and because of the system type or language i can´t find this file in the program path to set the rights.

Example:

Program name "Test" file name "File"

Systemtype XP german 32 bit --> install path c:\Programme\Test\File

Systemtype XP english 32 bit --> install path c:\Programs\Test\File

Systemtype XP english 64 bit --> install path c:\Programs\Test\File

Systemtype win7 english 64 bit --> install path c:\Program Files (X86)\Test\File

Systemtype win7 english 64 bit --> install path c:\Programme(X86)\Test\File

I only whant to set the rights to file fith cacls.exe /T /E /G user:F

That´s all

I think that the best way to solve this is to surch for this File end the to set the rights.

Can You please help me??

Thank You verry much.

Link to comment
Share on other sites

Link to comment
Share on other sites

Thank You but i allready tryed this.

The problem ist that the macro @ProgramFilesDir goes to c: program files. Auto it doesn´t know if this Program is installed under c:program files or under c:program files (x86).

Second Problem is when the system is having a multi language pack then the install path is c:Programme (x86)

Link to comment
Share on other sites

  • Moderators

If you look in the Help file, you'll find the @OSLang macro that will do what you want. You could do something simple like:

$lang = @OSLang
      If $lang = "0407" Then
           Call("German")
      Else
           Call("English")
      EndIf

Then, inside each of the Functions, you could account for Win 7 or Win XP with the @OSver and @CPUArch macros.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...