d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Abducts Electronics/project/development Thread
Prev14567826Next
Add Reply New Topic New Poll
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Feb 7 2014 10:37pm
Revised my code a bit and fixed a few bugs in my Day/Night cycle scripts. Also modified the script to keep track of multiple objects so I can have moons and stars and other suns moving around the game level.

Still need to tweak my algros to the level darkening and the skybox blending, they are still a little out of sync.

http://www.youtube.com/watch?v=EWh6Ta5Of4c

This post was edited by AbDuCt on Feb 7 2014 10:38pm
Member
Posts: 5,105
Joined: Apr 10 2008
Gold: 1,680.00
Feb 8 2014 09:41am
Quote (AbDuCt @ Feb 8 2014 12:37am)
Revised my code a bit and fixed a few bugs in my Day/Night cycle scripts. Also modified the script to keep track of multiple objects so I can have moons and stars and other suns moving around the game level.

Still need to tweak my algros to the level darkening and the skybox blending, they are still a little out of sync.

http://www.youtube.com/watch?v=EWh6Ta5Of4c




:love:
Member
Posts: 35,454
Joined: Jan 25 2009
Gold: 1,173.00
Feb 8 2014 11:32am
I had my google play books start speaking French last night instead of English. My dad said his phone did it too. Not sure what happened with Google but it was fucking annoying.
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Feb 9 2014 04:46am
Went and bought my adapter for my SDR so that's coming in a few weeks.

Although a few weeks ago I installed a sandbox game called planet arkadia which was popular a few years ago and still is. It's based off a real money economy and you can actually offer services and convert in game currency to USD (much like second life). Anyways I installed it, massive missing textures and shit, so I attempted to use its install fixer in its launcher. It scanned said it needed to download a few things to fix its files and I clicked okay. What I didn't see when I clicked okay, was that it also wanted to delete a bunch of files including MS C++ redistribution files which games and other programs use to run. Low and behold my computer was a complete mess and I sort of fixed it, although many programs are still crashing due to lack of dependencies and some wont open.

So I decided to reformat tomorrow. So far I made a list of all my applications, and backed up almost all my data that I need (was pretty simple I keep everything on my desktop). Still trying to back up my steam games, but overall it's moving pretty smoothly. Still got a few more hours of prep to make sure I documented and saved everything yet though.

Hopefully I will not have to reinstall for another 4 years.

This is how my computer is going to feel once it's over with:



This post was edited by AbDuCt on Feb 9 2014 04:47am
Member
Posts: 35,454
Joined: Jan 25 2009
Gold: 1,173.00
Feb 9 2014 11:32am
Lol
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Feb 9 2014 11:53pm
Quote (NinjaSushi2 @ Feb 9 2014 01:32pm)
Lol


Don't worry I'm back. After over 6 hours of installing shit I am about 60% done. It's mainly games and development software that I have to install now.

My face when friends IM me saying lets play a game after knowing I just reformatted and just got online.

Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Feb 10 2014 01:14pm
Whipped up this simple batch script because many applications I run cause the Windows 7 Aero desktop to crash, mostly after requesting elevated permissions to run or install.

What this does is first issues a harmless elevated administer command and sends output to nul land, which is nothing (essentially in simple terms it doesn't make it output to the screen). If the command did not return an error it jumps to the :gotPrivileges label and issues the stop command to the Aero desktop service, uses ping with a timer as a delay (outputting to nul again to prevent output) and then restarts the service resulting in your pretty Aero desktop to come back. If it does error though it jumps to :getPrivileges and creates a VBS script to start UAC and elevate the command prompts privileges. When this script is ran it opens a new command prompted and checks its privileges again, this time it will pass the check and restart the services.

This script can be modified to be used with anything that needs administer privileges, just remove the commands under :start and replace with your commands.

Code
:::::::::::::::::::::::::::::::::::::::::
:: Automatically check & get admin rights
:::::::::::::::::::::::::::::::::::::::::
@echo off
CLS
ECHO.
ECHO =============================
ECHO Running Admin shell
ECHO =============================

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )

:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************

setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B

:gotPrivileges
::::::::::::::::::::::::::::
:START
::::::::::::::::::::::::::::
setlocal & pushd .

Net Stop uxsms
ping 127.0.0.1 -n 1 -w 5000 > nul
Net Start uxsms
Member
Posts: 35,454
Joined: Jan 25 2009
Gold: 1,173.00
Feb 10 2014 01:31pm
I know what some of that code means but not all. So why do you ping home? Or could you just break the VBS down line by line? Thanks.
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Feb 10 2014 01:38pm
Quote (NinjaSushi2 @ Feb 10 2014 03:31pm)
I know what some of that code means but not all. So why do you ping home? Or could you just break the VBS down line by line? Thanks.


I used ping as a sleep in that script. Batch doesn't have a real sleep instruction so there are a few ways around it, in this case using ping.

As for the VBS script, it simple writes

Code
Set UAC = CreateObject^("Shell.Application"^)
UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1


to a file named "OEgetPrivileges.vbs" located in the temp directory. > denotes writing/creating to the file as well as writing over everything if text already resides in it. >> denotes appending to the end of a file without destroying previous contents. From there it launches the script.

As for the actual VBS code, it creates a variable called UAC and initiates it with an object of type "shell application,", and from there tells it to execute itself with elevated permissions.
Member
Posts: 35,454
Joined: Jan 25 2009
Gold: 1,173.00
Feb 10 2014 03:05pm
And that keeps your desktop from crashing?
Go Back To Computers & IT Topic List
Prev14567826Next
Add Reply New Topic New Poll