IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA: San Andreas

TOPIC TITLE FORMAT
[SnP] Mission name [v1/2]
REQUESTER FORMATHELPER FORMAT
Missions: mission name(s) here
Link: the URL to your saved game here
Notes: anything you want the helper to be aware of when they do your mission for you
For: name of the person whose mission you've done...this will be explained later
Missions: list of missions you completed
Helper: your name...again this be explained later
Link: the URL to the saved game

Useful Links:

Pages: (9) [1] 2 3 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Easy script switcher [PC]

 Switch scripts or toggle cleo off/on
 
rubregg  
Posted: Thursday, May 11 2006, 15:55
Quote Post


brainslug
Group Icon
Group: Members
Joined: May 3, 2006

mars.gif

Member Award




Easy script switcher for GTA SA
...to swap between v1, v2, Hot Coffee and Spaceeinstein's All In One Mod
...or toggle the CLEO library off/on

Current Version: v0.7 -- released September 25 2008

Latest additions:
Easy disabling and enabling of the CLEO library (if installed).
Start GTASA from within the script switcher: normal or nosplash (if nosplash.exe present).

Supported versions of Spaceeinstein's All In One Mod: v2.6 --> v3.0

Downloads

Related topics
user posted image




Purpose

While helping other players with their missions I often had to switch my v1 scripts to v2 or even the Hot Coffee mod. Since repetitive file copying got sort of tiring for me I made this little batch file to do the job for me. Support for Spaceeinstein's All In One Mod was included by request from v0.3 on and the script is written in a way that should allow more future extensions, if wished for. Drop a line here if you want something else included and I'll see what I can do.

Since CLEO scripts have become an issue in the Chain Game, a routine to easily toggle them off or on has been added.


Systems
  • Written on and only tested on WinXP.
  • grishb reports that it also works on Vista. Judging from what I hear about Vista you'll very likely have to manually change permissions for some folders, see "Basics" below.
  • Due to the registry reading feature it might not run on Win2K. You must have Win2K Support Tools installed, but since there are syntax differences for the command 'reg.exe' in WinXP and Win2K Support Tools it may still not run on 2K.
Instructions

Basics
  • This program needs write access in your GTA SA script folder (e.g. 'C:\Program Files\GTA San Andreas\data\script'). Log in as administrator and grant write access to the user account running GTA SA and the scriptchanger (or ask your system administrator to do this for you). This needs to be done only once - if at all. On a standard Win2K/XP installation you probably *won't* have to do it because all standard user accounts have full admin rights there (incl. write access everywhere). With Vista you most likely *will* have to do it.
  • If you're using the Spaceeinstein Mod, you will also need write access in '..\text'.
  • If you're using CLEO, you will also need write access in your game's main directory.
  • GTA SA v2 has restricted modding abilities and needs to be downgraded before you can switch scripts.
  • You can still use this program no matter whichever version of GTA SA you run, because all this program does is copy script files around. If your game won't run after this it could be due to your script files being incompatible with your game.
  • You don't *have* to use *all* the possible options - just ignore all instructions for folders/files you are not going to use. If you pick an unexisting selection in the menu by mistake, you'll get an error message and your currently installed scripts will remain unaltered.
  • The CLEO toggle is not a clean (un-)install routine; all it does is rename the file cleo.asi to cleo.asi.bup and back. This seems to do the trick for me.
  • The currently installed scripts are determined via file compare with the contents of your '..\data\script\v1', 'v2', etc folders. Be careful to put the right scripts into the right folder, otherwise you'll get inaccurate information.
First Installation
  • Make backup copies of all your different version script files!!!
  • Make backup copies of '..\text\american.gxt' if you're using the spaceeinstein mod)!!!
  • Make a backup copy of '..\cleo.asi' if you're using the CLEO library!!!
  • Make sure you have write access in the folders specified above in the first 3 paragraphs of 'Basics'.
  • Go to your GTA SA script folder (e.g. 'C:\Program Files\GTA San Andreas\data\script').
  • In there create subfolders called 'v1', 'v2', 'hc' & 'sp' (all file & folder names without ' ' of course).
  • Put the script files ('main.scm' and 'script.img') of v1 into the subfolder 'v1', those of v2 into subfolder 'v2' and those of Hot Coffee into subfolder 'hc'.
  • Put all the files of the spaceeinstein mod ('main.scm', 'script.img' and 'american.gxt') into the subfolder 'sp'.
  • Unzip 'sa_scriptchange.bat' to any convenient location.
Updating the Scriptchanger
  • Make sure your scriptchanger is not running and simply overwrite your old 'sa_scriptchange.bat' with the new one.
  • If you're updating from pre v0.6 and using the CLEO library: Make a backup copy of '..\cleo.asi' and make sure you have write access in the game's main folder.
Changing between different *supported* versions of the Spaceeinstein Mod
  • Replace the contents of your '..\data\script\sp' folder.
  • Switch to spaceeinstein.
  • You can leave this version of the scriptchanger running while you do this.
  • You'll be told which version of the Spaceeinstein mod you're running.
Using this program
  • Double-click 'sa_scriptchange.bat', make your choice & press [Enter]. That's basically it.
  • For multiple script swaps you can leave this program running in the background while playing, but always make sure the game itself isn't running when you change the scripts.
Disclaimer

use at own risk ...yaddayadda... comes as is ...bleh... no warranties ...blurp... etc...
...and make those backups first


Changelog

v0.7
• start GTASA from within the script switcher
• new routine to determine the installed scripts
• label file not needed anymore, old one(s) will be deleted

v0.6
• added CLEO toggle (disable/enable if installed)
• enabled changing to a script version the program thinks is already installed

v0.5
• updated Spaceeinstein routine to support multiple versions of the mod
• currently supported versions: v2.6 --> v3.0
• content of label file gives exact installed version
• reversed the formatting of the text output to pre-0.41 (liked it better after all)

v0.41
• updated Spaceeinstein support to v2.8
• very minor change in the formatting of the text output (blank line shoving, basically)

v0.4
• changed the way the game's path will be read from the registry (dropped using the GUID due to rare bug reports and Wolf68k's invaluable input)
• updated support for Spaceeinstein's All In One Mod to the current version v2.6
• overhauled instructions incl. a few comments on updating, Win2K, Vista, write access & modding of SA v2

v0.3
• added Spaceeinstein's All In One Mod (v1.7.1) as a possible selection; existing '..\text\american.gxt' will be backuped to '..\text\american.orig.gxt'
• program will run in a loop until you exit
• complete structural overhaul, hopefully makes future extensions easier to work in
• changed location of the label file (see instructions); changed extension of label file to .ini; old label files will automatically be converted
• label file is no dummy anymore but will be read to find out the currently installed game scripts

v0.2
• paths will be automatically read from the windows registry - no more manual editing of the file
• a few security checks added - e.g. your installation will not be changed if you select Hot Coffee but don't have those script files


Thanks...

• to Wolf68k for priceless help (especially with the registry stuff) and for mirroring the downloads,
• to Plaka for pinning this topic and providing a download mirror,
• to DrSnuggles for webspace,
• to hmvartak for suggesting the 'Start Game' feature
• to OrionSR for coding help and testing
• and to all those testing, using & feedbacking. icon14.gif


As usual: Feel free to comment & improve & expand to cover more mods etc... smile.gif

Enjoy,
rubregg

This post has been edited by lil weasel on Friday, Jun 8 2012, 22:42
PMYahoo
  Top
 

 
quartet1977  
Posted: Thursday, May 11 2006, 16:15
Quote Post


Soldier
Group Icon
Group: Members
Joined: Dec 3, 2005

us.gif

XXXXX



Thanks! It seems to work for me. This will definitely save some time. Nice work!
PM
  Top
 

 
rubregg  
Posted: Thursday, May 11 2006, 17:58
Quote Post


brainslug
Group Icon
Group: Members
Joined: May 3, 2006

mars.gif

Member Award




QUOTE (quartet1977 @ May 11 2006, 18:15)
Thanks! It seems to work for me. This will definitely save some time. Nice work!

glad you like it, thanks for the feedback smile.gif
PMYahoo
  Top
 

 
crazyanurag  
Posted: Thursday, May 11 2006, 18:25
Quote Post


okthxbai
Group Icon
Group: Leone Family Mafia
Joined: Dec 6, 2005

XXXXX



sounds good...i'll try it in sometime...here's what i do to help me with this problem:

1) in the 'data' folder, i've made several script folders: script1 for V1, script2 for V2, scripth for Hot Coffee and so on
2) before i load a game, i go to the folder and just rename the appropriate folder to 'script'...for example, if i have to play on the Chain Game, which is V2, i go to the folder and first rename 'script' to 'script1' (that's assuming i was playing with V1 before that)...then i proceed to renaming 'script2' to 'script', and i can play with V2...

its simple, and works like a charm for me...no file copy/pasting required...your method sounds even quicker, but i'm pretty lazy, so i might just stick with what i'm used to...but here's a cookie.gif for your efforts...in fact, have cookie.gif cookie.gif

icon14.gif

You'll Never Walk Alone
PM
  Top
 

 
CygnusX  
Posted: Thursday, May 11 2006, 18:38
Quote Post


..::Movie Maker::..
Group Icon
Group: Members
Joined: Jul 15, 2005

nl.gif

XXXXX



That'll save some time. Nice!
PMMSN
  Top
 

 
rubregg  
Posted: Thursday, May 11 2006, 18:41
Quote Post


brainslug
Group Icon
Group: Members
Joined: May 3, 2006

mars.gif

Member Award




Thanks for the feedback & cookie.gifs, guys (here, all of you have some back cookie.gif cookie.gif lol.gif )

@crazyanurag
The method you're describing comes close to what I've been doing before, hehehe. I had made my copy/paste experiences easier by using different folders and do a drag&drop. It's just - I got tired of that & so I started tossing about to make it even simpler. ...'cos yes, I'm kind of lazy too, too lazy to look up proper dos-batch syntax for example lol.gif

So - if anyone knows a way to get one keystroke inputs into a batch file (so that we don't have to press return after the input), please let me know.

Cheers,
rubregg
PMYahoo
  Top
 

 
HerrieM  
Posted: Thursday, May 11 2006, 19:02
Quote Post


Don't Panic
Group Icon
Group: Members
Joined: Apr 27, 2006

nl.gif

XXXXX



QUOTE (rubregg @ May 11 2006, 20:41)
I'm kind of lazy too

The greatest ideas are born out of lazyness tounge2.gif

As i said in the PM, great work Rubregg
Users WebsitePMMSN
  Top
 

 
Wolf68k  
Posted: Friday, May 12 2006, 10:54
Quote Post


always howling
Group Icon
Group: Members
Joined: Mar 12, 2003

us.gif

Member Award




@rubregg
Nice but if you can get the batch file to read the registry and read this line;
HKEY_LOCAL_MACHINE\SOFTWARE\Rockstar Games\GTA San Andreas\Installation
ExePath=
Which will list where the gta_sa.exe is, in my case it's; "D:\Rockstar Games\GTA San Andreas\gta_sa.exe"

or have it read...and this is really geeky one
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D417C96A-FCC7-4590-A1BB-FAF73F5BC98E}
InstallLocation=
Which list, well like it says, the installed location. And you can obviously see where that is from the above.


Maybe this can help in that. http://www.robvanderwoude.com/index.html
From what I'm reading here it'll create a REG file for that key's info in it. After that I get lost. But you can always have the batch file delete that reg file when it's done.
If you can get the batch file to do something like....I'm not great at this so give me a break.

IF %SCRIPTPATH% == null
THEN [the reg reading thing]
set SCRIPTPATH=<whatever> + data\script\
ELSE goto set SOURCEPATH=%SCRIPTPATH%\%TAG% and so on.

So the idea being that the first time it's run on the user's system SCRIPTPATH will obviously be null. So it'll do the reg reading thing and get the info needed (example: D:\Rockstar Games\GTA San Andreas\) and add "data\script\" to the end and write this to the batch file itself.
So next time it's ran it'll see that SCRIPTPATH=D:\Rockstar Games\GTA San Andreas\data\script\ (again based on my example).

I hope that makes sense after I explained it about 2 or 3 different ways.


If you means that as soon as they press 1, 2 or H it'll just do it without waiting for the user to get Enter. Personally I'd rather have to hit Enter incase I hit the wrong key.




@crazyanurag
You're started to sound like my system then you made it more complex.
For me it's like this....
In the D:\Rockstar Games\GTA San Andreas\data\script\ I have folders named GTASAv1, GTASAv2, and hotcoffee
When I want to switch I just look an the 3 folders and see which one is missing it's files, and I know which ones are in use. I just move the "in use" files back to it's folder and then move the ones I need to be "in use".

And God I hope that made sense as well.

No need to copy/paste or rename anything. Just move it.
I've been wanting to batch files like what rubregg came up with, but mine would be damn weak in comparison since I suck at command line. I only know what I can read AND understand easily.
So mine would have been more like...
del /q D:\Rockstar Games\GTA San Andreas\data\script\main.scm
del /q D:\Rockstar Games\GTA San Andreas\data\script\script.img
copy D:\Rockstar Games\GTA San Andreas\data\script\GTAsav2\main.scm D:\Rockstar Games\GTA San Andreas\data\script\main.scm
copy D:\Rockstar Games\GTA San Andreas\data\script\GTAsav2\script.img D:\Rockstar Games\GTA San Andreas\data\script\script.img

And I'd have one for v1, v2 and HC and I would just double click on the one I need. Like I said, it's weak and it's from crap I was able to understand.
And incase anyone is wondering the /q means quiet so the del command doesn't ask the Yes or No question to comfirm deleting the file....weak but easy to understand. Which also means wonder why it wasn't used in this, but then I only understand so much of what was written in there.

This post has been edited by wolf68k on Friday, May 12 2006, 10:56
PM
  Top
 

 
rubregg  
Posted: Saturday, May 13 2006, 00:47
Quote Post


brainslug
Group Icon
Group: Members
Joined: May 3, 2006

mars.gif

Member Award




@wolf68k

Thanks *a lot* for the massive feedback!!!
And don't worry, it makes an awful lot of sense, in many ways actually...

You see, when it all started the first idea I had was making three different batch files which would have looked suspiciously identical to what you wrote. Then the once-every-other-year-max programmer in me struck through and I thought let's make just one and share that. Next came mixing up different scripting languages, a lot of googling, finding out about at least two commands that were removed somewhere along the way from DOS to XP (the site you linked was amongst the many) and to be quite honest, the idea of reading the path from the registry, which would be quite more elegant, got buried in all that mess... lol.gif

And here's where your post - together with a good night's sleep - helped. Reading your proposals made me re-think about the problem. And re-browsing through your link actually *did* give me a rough idea of how this issue may be tackled... ---> so Thanks again biggrin.gif

I will get back to this, but for real-life-job reasons it'll be a few days.

About the 'Enter' thing - you explicitely prefer it this way, I really got used to it, no one complained and I didn't find a command to do it otherwise. Looks like four good reasons to leave it the way it is for the time being...

del /q
...when I run my script I'm not asked for confirmation to delete files. What about you other guys who use it?
The help function sounds like /q is only needed if gobal variables are used, but I'm not sure about this at all. Anyone?
PMYahoo
  Top
 

 
balmung03  
Posted: Saturday, May 13 2006, 05:03
Quote Post


bawlz in the baygz
Group Icon
Group: Members
Joined: Jun 25, 2005

us.gif

XXXXX



wow, i am totally lost in all this programmer language (which is bad for me since i'll be starting over this summer at college going for a software engineering major); how do you guys think of these things, and how do you learn to do the stuff you do? all this seems majorly impressive to me. rubregg, wolf, and crazy, you guys deserve lots of applause and something else for the work you've done here. everyone does cookies, so i thought i'd do something slightly different...

user posted image
hope you guys like it. (it's a chicken&shrimp combo)
PMAOL
  Top
 

 
rubregg  
Posted: Monday, May 15 2006, 21:05
Quote Post


brainslug
Group Icon
Group: Members
Joined: May 3, 2006

mars.gif

Member Award




I just updated the scriptchanger - see the edited first posting. --> Enjoy smile.gif
As usual I'm waiting for your comments & suggestions...

Sorry for hosting on rapidshare; I tried on free.hostdepartment.com but they won't let me upload .zip, .rar or .bat files... Any suggestions for a better place to host?

@balmung03
Wow, thanks for the chicken&shrimp roll, yummie. Don't worry, my guess is that once you're on your software engineering course you'll laugh about this. Since you asked, my knowledge comes partly from having worked on DOS before there was Windows and partly from extensive googling.

@wolf68k
I did use the 'geeky' long line with the uninstall path because that gave me the pure path name without 'gta_sa.exe' at the end.... Thanks again for that tip.

This post has been edited by rubregg on Monday, May 15 2006, 21:10
PMYahoo
  Top
 

 
Wolf68k  
Posted: Monday, May 15 2006, 23:43
Quote Post


always howling
Group Icon
Group: Members
Joined: Mar 12, 2003

us.gif

Member Award




FileFront.com would be an ideal place to host it. And it's free. Free sign up (to store files, not to download), umlimited space and bandwidth.

I created a download for it in my FileFront account, here. But I would suggest you do the same and just mine as a mirror.
RapidShare is ok, but you have to wait to download and type in verify code and if no one downloads it for 30days they kill it.
PM
  Top
 

 
Plaka  
Posted: Tuesday, May 16 2006, 09:22
Quote Post


King Of San Andreas
Group Icon
Group: Members
Joined: Feb 22, 2005

gc.gif

Member Award




rubregg

Nice work man wink.gif sure beats clicking and Copy/Paste all the time ...

I'll have a look if this can be extended to incorporate Mods like Spaceinstein's All-In-One ... which also requires the changing of american.gxt in the \text dir.

cool.gif
Users WebsitePM
  Top
 

 
rubregg  
Posted: Tuesday, May 16 2006, 10:35
Quote Post


brainslug
Group Icon
Group: Members
Joined: May 3, 2006

mars.gif

Member Award




As wolf68k suggested the package is now hosted on FileFront.com and the download links in the first posting have been edited accordingly.

Here is the link to my page (recommended), alternatively you can use wolf68k's mirror.
PMYahoo
  Top
 

 
rubregg  
Posted: Tuesday, May 16 2006, 10:42
Quote Post


brainslug
Group Icon
Group: Members
Joined: May 3, 2006

mars.gif

Member Award




QUOTE (Plaka @ May 16 2006, 11:22)
I'll have a look if this can be extended to incorporate Mods like Spaceinstein's All-In-One ... which also requires the changing of american.gxt in the \text dir.

@Plaka
I'm sure if all you have to do is copying files it can easily be extended. If you're not familiar with the batch scripting code send me a pm & tell me exactly what you'll have to do to get your mod working and I may be able to help you.

Glad you like it smile.gif
PMYahoo
  Top
 

 
Wolf68k  
Posted: Tuesday, May 16 2006, 10:44
Quote Post


always howling
Group Icon
Group: Members
Joined: Mar 12, 2003

us.gif

Member Award




I'm sure that can be easily done. Just might have to add the original america.gxt file to v1, v2 and HC folders. Or create a folder in the TEXT folder called original (for example) which would have a copy of the file in there.

Then when Spaceinstein mod is installed it'll delete the one that's there and copy in the modded one from the Spaceinstein folder which would be best in the same place as the other folders used in the script.

When you go back to the the others it'll just delete the modded one and copy in the one from the folder "original".


If it's possible to have the batch file read the CRC or the dates of a file then the switch can be done even easier. The batch can look at the GXT file and if it's CRC matches what an unmodded GXT file does then it'll leave it alone when using 1,2 or H option. Ofcourse if it uses the S (Spaceinstein) mod then it'll change it. If it doesn't match then it'll just make the changes it needs to.


Again I don't understand the need to copy&paste the files. Just move them from folder to folder seems a lot easier to me.



BTW, good to see you're finally back Plaka. I thought you said were going to be back about a week or 2 after you left.



@rubregg
I looked at your FileFront link. You reminded me I should have included a link to this topic in there. But I took it a step further, I made it so it can open in a new window. biggrin.gif The one they create makes it open in the same window.
Try this if you want to to open in a new window...
CODE
see the readme file or <a href="http://www.gtaforums.com/index.php?showtopic=244165" target="_blank">http://www.gtaforums.com/index.php?showtopic=244165</a>

You could also replace the copy of the URL to read as text. EG:
CODE
see the readme file or <a href="http://www.gtaforums.com/index.php?showtopic=244165" target="_blank">visit the topic</a>
To which "visit the topic" would be the clickable text for the URL.

This post has been edited by wolf68k on Tuesday, May 16 2006, 10:59
PM
  Top
 

 
rubregg  
Posted: Tuesday, May 16 2006, 11:07
Quote Post


brainslug
Group Icon
Group: Members
Joined: May 3, 2006

mars.gif

Member Award




QUOTE (wolf68k @ May 16 2006, 12:44)
Again I don't understand the need to copy&paste the files. Just move them from folder to folder seems a lot easier to me.

I guess the only reason why I personally prefer 'copy&paste' is that it seems just slightly safer than 'move' in terms of accidental file loss...

Plaka, since I can't really tell from your posting if you're doing it yourself or if you want me to do it I'll wait for the moment until you got back to me.

My first suggestion is extending the section ':ASK.......for version to install......' to include a fourth option [s] for Spaceinstein. When I know what you'll have to change exactly for this mod, I can surely help out with the rest. As usual, wolf68k had some good ideas there, thanks again for your efforts, mate smile.gif


edit:

@wolf68k
Nice one, I did changed the FileFront link like you said biggrin.gif
...in case you are wondering, the list bubbles are done with <li> (no closing tags)

This post has been edited by rubregg on Tuesday, May 16 2006, 11:30
PMYahoo
  Top
 

 
Plaka  
Posted: Tuesday, May 16 2006, 11:28
Quote Post


King Of San Andreas
Group Icon
Group: Members
Joined: Feb 22, 2005

gc.gif

Member Award




@ rubregg
If you want to do it that would be great will save me adding code/testing/Googling etc. wow.gif

@wolf68k
Yeah that was the plan (1/2 weeks) but it sure would have helped if there was an available phone-line in my area... still I'm now back ... now where in the h*ll is my GamePad confused.gif


Plaka ... working on his k/b skills suicidal.gif
Users WebsitePM
  Top
 

 
Wolf68k  
Posted: Thursday, May 18 2006, 05:34
Quote Post


always howling
Group Icon
Group: Members
Joined: Mar 12, 2003

us.gif

Member Award




Because I run the script from the \My Documents\GTA San Andreas User Files\ folder
I wanted something in there for when I add a save game in there and run the script I can see which one I'm using without having to browse to the \script\ folder and look for the "current-install" text file

So I add a few extra lines to add that file to that folder
Orange=current version of the script
Yellow=the lines I added
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Change Scripts In GTA SA
::
:: ...easy switching between v1 / v2 / hot coffee
::
:: by rubregg -- www.gtaforums.com
:: Version 0.2 -- May 15, 2006
::
:: Thanks to wolf68k and all the testers at www.gtaforums.com
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: put your v1 script files into folder [gtasa-folder]\data\script\v1
:: put your v2 script files into folder [gtasa-folder]\data\script\v2
:: put your Hot Coffee script files into folder [gtasa-folder]\data\script\hc
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
::
::
@echo off
cls
echo.
echo GTA SA Script Changer by rubregg
echo.
::
::
:ASK::......................for version to install................................
::
set /P PRESSEDKEY=Chose between [1] v1, [2] v2 or [h] Hot Coffee:
::
if %PRESSEDKEY%==1 (
set TAG=v1
) else (
if %PRESSEDKEY%==2 (
set TAG=v2
) else (
if %PRESSEDKEY%==h (
set TAG=hc
) else (
goto ASK
)
)
)
::
::
::............................paths...........................................................
::
::
::.......should you copy & paste - this is ONE LONG LINE FROM HERE....................
FOR /F "skip=2 tokens=3*" %%G IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D417C96A-FCC7-4590-A1BB-FAF73F5BC98E} /v InstallLocation') DO set GAMEPATH=%%G %%H
::...........................................................................................TO HERE
::
::
set SCRIPTPATH="%GAMEPATH%\data\script"
set SOURCEPATH="%GAMEPATH%\data\script\%TAG%"

::
::
::............................end if required files don't exist..........................
::
set ERROR=0
if not exist %SOURCEPATH%\main.scm (
echo.
echo Required script file missing: %SOURCEPATH%\main.scm
set ERROR=1
)
if not exist %SOURCEPATH%\script.img (
echo.
echo Required script file missing: %SOURCEPATH%\script.img
set ERROR=1
)
if %ERROR%==1 (
echo.
echo Your script has NOT been changed
goto :END
)
::
::
::............................delete old files..............................................
::
if exist %SCRIPTPATH%\main.scm del %SCRIPTPATH%\main.scm
if exist %SCRIPTPATH%\script.img del %SCRIPTPATH%\script.img
if exist %SCRIPTPATH%\current-install-*.txt del %SCRIPTPATH%\current-install-*.txt

if exist current-install-*.txt del current-install-*.txt
::
::
::............................copy new ones..............................................
::
echo.
copy %SOURCEPATH%\main.scm %SCRIPTPATH% >nul
if ERRORLEVEL 1 (
echo.
echo Couldn't copy %SOURCEPATH%\main.scm
echo Please check your permissions to write into the folder %SCRIPTPATH%
goto :END
)
copy %SOURCEPATH%\script.img %SCRIPTPATH% >nul
if ERRORLEVEL 1 (
echo.
echo Couldn't copy %SOURCEPATH%\script.img
echo Please check your permissions to write into the folder %SCRIPTPATH%
goto :END
)
::
::
::............................create label file...........................................
::
echo %TAG% > %SCRIPTPATH%\current-install-%TAG%.txt

echo %TAG% > current-install-%TAG%.txt
::
::
::............................finished......................................................
::
echo.
if %TAG%==hc set TAG=Hot Coffee
echo Successfully installed %TAG%
::
::...........................that's it.........................................................
::
:END
echo.
echo [press any key to end]
pause >nul
::::::::::::::::::::::::::::: END OF SCRIPT :::::::::::::::::::::::::::::::::::::::::



//edit
Had to make some changes.
I forgot about something very basic.

This post has been edited by wolf68k on Friday, May 19 2006, 00:54
PM
  Top
 

 
rubregg  
Posted: Thursday, May 18 2006, 06:53
Quote Post


brainslug
Group Icon
Group: Members
Joined: May 3, 2006

mars.gif

Member Award




@wolf68k
Your request will possibly be worked into the next version. I have started on it, it will include the Spaceeinstein mod as requested by Plaka and I am giving the whole thing a complete structural overhaul which I hope will make possible future extensions easier to work in.

I might also be renaming the label file from .txt to .ini, because it won't be quite as 'dummy' anymore - it will be evaluated to find out which version is currently installed...

If I can do it, I'd like to put it into the .bat's folder rather than the ..\My Documents\GTA San Andreas User Files folder -- that's because some people (like yours truly) will run the .bat from somewhere else. On my system, for example, I have a folder %homepath%\GTA SA stuff. In there I keep everything that doesn't belong to the original installation and everything I need for gameplay (like maps, mission analyzer, links to 'GTA San Andreas User Files' & '..\data\script', backup files, stored savegames etc....)

@everyone
--> "rubregg's call for patience" -- I won't be able to finish this before next week...
PMYahoo
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (9) [1] 2 3 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG