Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Batch file to unhide folders so programs can be installed

Options
  • 29-05-2009 6:43pm
    #1
    Registered Users Posts: 2,953 ✭✭✭


    Hi,

    Im trying to write a batch file so i can install programs in users/myUsrename/app Data/local

    The program i use cant install in this folder on Vista because its a hidden file, so you need to go to unhide via control panel > folder options > untick view hidden files and folder and then go to the app data folder and right click and untick hidden and then it aplys this changes to all files and folders and then when you install the program it finally see's the path

    The reason is to avoid issues that UAC causes with the program and installing it here seems to bypass all these problems thankfully, however most people installing the program are daunted by changing all these settings to install a program so i want to make it as easy as possible. Is there any resources anyone knows on how to help write something like this or is it even possible?


Comments

  • Registered Users Posts: 5,112 ✭✭✭Blowfish


    You can remove the 'hidden' attribute with ATTRIB -H


  • Registered Users Posts: 2,953 ✭✭✭dvdfan


    Ok great this should help, unfortunately its one of the few folder locations that isnt universal on everyones computers since part of the path location to the app data folder will have the users name as the folder i.e /users/dvdfan/app data/local

    Is there any way around this when writing a script to unhide that folder or is it just not possible?


  • Registered Users Posts: 5,112 ✭✭✭Blowfish


    The userprofile enviornmental variable gives the path to the root of the current users profile, so in your case all you need is:

    ATTRIB -H %userprofile%\app data\local


  • Registered Users Posts: 2,953 ✭✭✭dvdfan


    Ok great thanks again that was perfect however when i use ATTRIB -H "%userprofile%\AppData\local" it unhides that folder but dosent apply the changes to all the files and folders within that folder

    If i do this manually and untick unhide it asks would you like to apply the changes to all files and folders but dosent do this when i use the above option, will i have to do this seperately for each folder within the local folder too?


  • Registered Users Posts: 5,112 ✭✭✭Blowfish


    Oops, forgot that bit, should be:

    ATTRIB -H %userprofile%\app data\local /S /D


  • Advertisement
  • Registered Users Posts: 2,953 ✭✭✭dvdfan


    Hmm, tried that and it just unhid the local file but not the ones underneath

    Heres the exact code i used ATTRIB -H "%userprofile%\AppData\local" /S /D


  • Registered Users Posts: 5,618 ✭✭✭Civilian_Target


    If you type attrib /? you can get help on the attrib command.

    The /D may not be necessary.

    If you're trying to write a program installer, you may find using a system like NSIS2 to be a lot easier!


Advertisement