Sign in to follow this  
Followers 0
sully25

Find File and set the rights on all systems

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



I'm not sure about this one: Systemtype XP english 64 bit --> install path c:ProgramsTestFile

but for the rest you should be fine using the macro @ProgramFilesDir & "TestFile"

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Thank You,

i will try this tomorrow.

Share this post


Link to post
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
Sign in to follow this  
Followers 0