sully25 Posted November 10, 2011 Posted November 10, 2011 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.
KaFu Posted November 10, 2011 Posted November 10, 2011 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" OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
sully25 Posted November 10, 2011 Author Posted November 10, 2011 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)
Moderators JLogan3o13 Posted November 10, 2011 Moderators Posted November 10, 2011 (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 November 10, 2011 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!
sully25 Posted November 10, 2011 Author Posted November 10, 2011 Thank You, i will try this tomorrow.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now