Search This Blog

Saturday, September 25, 2010

Generate RDP Files for Remote Desktop

Barebones RDP File (3 lines)
full address:s:
username:s:
password 51:b:

Group Policy: Run his CMD script at beginning of user login to generate the RDP file for Remote Desktop.

VBS:
Set oExec = WshShell.Exec("cryptRDP5.exe password")
pwdhash = oExec.StdOut.readall

To prevent dialog box from coming up, decimal 76

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\LocalDevices]
"XXX.XXX.XXX"=dword:0000004c

Script below will encrypt the password into the RDP code, generate a RDP file on the desktop, and run the RDP file. Run script at user login.
-----

Set WshShell = CreateObject("WScript.Shell")
computername = WshShell.ExpandEnvironmentStrings("%COMPUTERNAME%")
Select Case computername
Case "COMPUTER1"
user = "user1"
Case "COMPUTER2"
user = "user2"
End Select
Set oExec = WshShell.Exec("\\server\cryptRDP5.exe password")
pwdhash = oExec.StdOut.readall
outputfile = WshShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Desktop\Remote.rdp"
Set fso = CreateObject("Scripting.FileSystemObject")
Set fsofile = fso.CreateTextFile(outputfile)
fsofile.WriteLine("full address:s:remoteaddress")
fsofile.WriteLine("username:s:" & user)
fsofile.WriteLine("password 51:b:" & pwdhash)
fsofile.Close
WshShell.Run("mstsc " & outputfile), 1, true

Wednesday, September 8, 2010

HP Web Jetadmin Deploy using MSI

Use Orca and open the MSI.
Not enought ram?
1) In "LaunchCondition", drop row "PhysicalMemory>=1024"
Accept the EULA
2) In "Property", change value of "WJA_EULA" to "ACCEPT"
Confirm that the database is backed up
3) In "Property", add row of "WJA_BACKUP_CONFIRM" to "YES"

Monday, September 6, 2010

Virtual PC Console Window Missing When Launched

Virtual PC Console went missing, caused by a setting in,
C:\Users\XXX\AppData\Roaming\Microsoft\Virtual PC\Options.xml

< console>
< height type="integer">27< /height>
< left_position type="integer">4294935296< /left_position>
< top_position type="integer">4294935296< /top_position>
< visible type="boolean">true< /visible>
< width type="integer">160< /width>
< /console>

Change the gigantic numbers to something more sensible and save