Author Topic: Goddamn work, goddamn Ghost AutoInstall packages, goddamn PATH variable!  (Read 1246 times)

0 Members and 1 Guest are viewing this topic.

Ecrofirt

  • Heavy Metal Jesus
  • Senior Member
Fuck.

We made a Ghost AutoInstall package for Quicktime this past summer and deployed it to all of the new PCs that hit our campus (300 or thereabouts).

I just tracked down what's been causing weird issues on these PCs since the summer, and I'm pissed. The goddamn Quicktime AI package I made fucks up the system PATH variable by not properly adding a semi colon before its entry.

So what's the big deal, you say? Fine then, I'll tell you what the fucking big deal is. Here's a typical path variable from one of the affected PCs:
Quote
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\WbemC:\Program Files\QuickTime\QTSystem\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Roxio Shared\DLLShared\

Completely fucks up the Wbem entry, which then fucks up WMI and Computer Management and remote system management and a whole host of other fucking things. Adobe Acrobat doesn't even install correctly because of this fucked up variable shit.

Now I've got to fuck around with the registry to fix everything. I am NOT excited about this.

Here's my hastily-thrown-together code:
Code: [Select]
Dim objShell
Dim strPath

set objShell = WScript.CreateObject("Wscript.Shell")

strPath = lcase(objShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path"))
objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Old_Path", strPath, "REG_SZ"

Dim intPos
intPos = 1
Do
intPos = Instr(intPos+1,strPath,"c:")
If intPos > 0 Then
If Mid(strPath,intPos-1,1) <> ";" Then
strPath = left(strPath,intPos-1)+";"+right(strPath,len(strPath)-intPos+1)
End If
End If
Loop While intPos <> 0

objShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path", strPath, "REG_SZ"
8=D

Joe Molotov

  • I'm much more humble than you would understand.
  • Administrator
Re: Goddamn work, goddamn Ghost AutoInstall packages, goddamn PATH variable!
« Reply #1 on: January 05, 2009, 11:43:01 PM »
Does it make you feel better to know that Steve Jobs is dying of AIDS?
©@©™

Ecrofirt

  • Heavy Metal Jesus
  • Senior Member
Re: Goddamn work, goddamn Ghost AutoInstall packages, goddamn PATH variable!
« Reply #2 on: January 05, 2009, 11:48:40 PM »
Does it make you feel better to know that Steve Jobs is dying of AIDS?

I'd feel better if Swayze would up and fucking die already. I lost a dollar betting that he'd have been dead months ago.
8=D

Fragamemnon

  • Excel 2008 GOTY
  • Icon
Re: Goddamn work, goddamn Ghost AutoInstall packages, goddamn PATH variable!
« Reply #3 on: January 06, 2009, 02:43:57 AM »
in an ideal world apple-produced software never is put anywhere near windows PCs. :(
hex