Jump to content

Recommended Posts

Posted

Redirecting appdata,

I dont know if redirecting is the right word to use, however a few games and programs stick a folder with a single file into appdata. Which I was wondering can you actually run say WinRar, Lemmings etc and have it redirect what the program is sending to appdata into the current folder?

I know you can use DirMove and DirRemove to copy them back and fourth but would like to know if there is a way to have windows believe the current folder is actually the appdata folder while running the game/program.

Posted (edited)

Try this example:

Local $sMyCurrentFolder = ; Type the folder you want.
Local $sGameFullPath = ; Type the 'full path' of game/program you want

; Redirecting appdata...
EnvSet("APPDATA", $sMyCurrentFolder); Thanks to ProgAndy...
EnvUpdate() ; Refreshes the OS environment.

; load your game/program
RunWait($sGameFullPath)
This solves?

EnvSet("APPDATA", $sMyCurrentFolder); Thanks to ProgAndy...

Edited by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted

Thank you for your help.

Nope it does not work, tried it on a five games and two program and still ends up saving in to the appdata folder.

Posted (edited)

Just try this:

Local $sMyCurrentFolder = "D:\TEMP"; Type the folder you want.
Local $sGameFullPath = "cmd /k echo APPDATA = %APPDATA%"; Type the 'full path' of game/program you want

; Redirecting appdata... only for this script and its child processes
EnvSet("APPDATA", $sMyCurrentFolder)
EnvUpdate() ; Refreshes the OS environment.

; load your game/program as a child
Run($sGameFullPath)
Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

Tried the second one and it still uses the system appdata folder, tried a simple batch with "Set APPDATA = F:\storage" and that also never redirected anything.

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
  • Recently Browsing   0 members

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