Smartlaunch Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



%SL_USERNAME% NOT BEING READ BY .BAT FILEExpand / Collapse
Author
Message
Posted 08-11-2008 19:11:46
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 28-10-2010 02:33:23
Posts: 6, Visits: 22
Decided to go it alone and do my own bat files for the PUF of most of my games and personal folders

so far its been somewhat working but i cant see why

the bat files omits the SL_username when looking for the users folder

here is the bat script am i doing something wrong ?

the z: drive is a mapped drive with net use off my server

i got the ideas from the other users on the forum btw

very cool forum great source of info for new guy jumping into the gaming cafe world

cheers

____________________________________________________________________________

@echo
for /f "tokens=3 delims=\" %%i in ("%USERPROFILE%") do (set user=%%i)2>&1
for /f "skip=4 tokens=3" %%V in ('reg query HKCU\Environment /v SL_USERNAME') do set SL_USERNAME=%%V
ECHO %SL_USERNAME%

Z:
cd Z:\%SL_USERNAME%\PUF
mkdir crysisWARHEAD
cd crysisWARHEAD


c:

rd "C:\Users\Client9\Documents\My Games\Crysis_WARHEAD" /s /q

CLS

mkdir "C:\Users\Client9\Documents\My Games\Crysis_WARHEAD"


echo Loading your Saved games and configs please wait
echo .
echo .

xcopy "z:\%SL_USERNAME%\PUF\crysisWARHEAD" "C:\Users\Client9\Documents\My Games\Crysis_WARHEAD"/e /y /c


xcopy "Z:\Special files\warhead cfg\game.cfg" "C:\Users\client9\Documents\My Games\Crysis_WARHEAD" /e/y /c


cls


ECHO Loading your game please wait.....this might take sometime

cd\

cd C:\Games\Crysis WARHEAD\Bin32\
crysis.exe

cls

echo SAVING your games and configs please wait.........
echo .
echo .
echo .

ECHO %SL_USERNAME%
pause

xcopy "C:\Users\Client9\Documents\My Games\Crysis_WARHEAD" "Z:\%SL_USERNAME%\PUF\crysisWARHEAD" /e/y/c/d

ECHO %SL_USERNAME%

pause

cd

z@echo
for /f "tokens=3 delims=\" %%i in ("%USERPROFILE%") do (set user=%%i)2>&1
for /f "skip=4 tokens=3" %%V in ('reg query HKCU\Environment /v SL_USERNAME') do set SL_USERNAME=%%V
ECHO %SL_USERNAME%

Z:
cd Z:\%SL_USERNAME%\PUF
mkdir crysisWARHEAD
cd crysisWARHEAD


c:

rd "C:\Users\Client9\Documents\My Games\Crysis_WARHEAD" /s /q

CLS

mkdir "C:\Users\Client9\Documents\My Games\Crysis_WARHEAD"


echo Loading your Saved games and configs please wait
echo .
echo .

xcopy "z:\%SL_USERNAME%\PUF\crysisWARHEAD" "C:\Users\Client9\Documents\My Games\Crysis_WARHEAD"/e /y /c


xcopy "Z:\Special files\warhead cfg\game.cfg" "C:\Users\client9\Documents\My Games\Crysis_WARHEAD" /e/y /c


cls


ECHO Loading your game please wait.....this might take sometime

cd\

cd C:\Games\Crysis WARHEAD\Bin32\
crysis.exe

cls

echo SAVING your games and configs please wait.........
echo .
echo .
echo .

ECHO %SL_USERNAME%
pause

xcopy "C:\Users\Client9\Documents\My Games\Crysis_WARHEAD" "Z:\%SL_USERNAME%\PUF\crysisWARHEAD" /e/y/c/d

ECHO %SL_USERNAME%

pause

cd

z:

I have learned to use the word 'impossible' with the greatest caution.
- Wernher von Braun

NETCORE.24 MONTREAL
QUEBEC, CANADA

ONLY FOR THE HARDCORE

Post #19401
Posted 13-11-2008 01:19:09
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 13-11-2008 01:22:59
Posts: 1, Visits: 12
Your script seems close but, your script is attempting to fetch SL_USERNAME from the registry, the only issue is the Smartlaunch Client DOES NOT set those values in the registry by default. What you can do however is make the client execute a script at login to set those registry values. You'll want to edit UserLogin.bat on the server, the script will automatically get pushed down to the clients.

C:\Program Files\Smartlaunch\Server\Data\Files\Client\Data\Batch\UserLogin.bat
reg add HKCU\Environment /f /t REG_SZ /v SL_USERNAME /d %1
reg add HKCU\Environment /f /t REG_SZ /v SL_PASSWORD /d %2


Please keep in mind that if you decide later to use the %SL_PASSWORD% entry, that it will be stored in the registry as a md5 hash and NOT in plaintext.
Post #19462
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Michael [SL], Ralf [SL], infidel [GIZMO], TINDEV, Thomas [SL], Daniel [SL], Edwin [SL], Ayuning [SL], Mike Ziarko [SL]

PermissionsExpand / Collapse

All times are GMT +8:00, Time now is 5:05

Powered by InstantForum.NET v4.1.4 © 2014
Execution: 0,063. 12 queries. Compression Enabled.