Search This Blog

Sunday, May 31, 2009

geturl, C++ code to retrieve the first link to SEP definition

This is a major part of a SEP definition download via batch. Use wget to download the webpage. Read page, ignores all text until it reaches "targetUrl[]", then reads the rest of the url and saves as file "sep".

#include
#include
using namespace std;

int main()
{
char c;
int i = 0;
char targetUrl[] = "http://definitions.symantec.com/defs/";
char url[100];
ifstream inStream("sep");

while (!inStream.eof())
{
inStream.get(c);
while ((i != 37) && (c == targetUrl[i]))
{
url[i] = c;
i++;
inStream.get(c);
}

if (i != 37) //url not found
{
url[0] = '\0';
i = 0;
}
else
{
while (c != '\"')
{
url[i++] = c;
inStream.get(c);
}
url[i] = '\0';
inStream.close();
ofstream outStream("sep");
outStream << url;
outStream.close();
return 0;
}
}
return 0;
}

Saturday, May 30, 2009

Parse Date in Batch

FOR /F "tokens=2-4 delims=/ " %%1 IN ('DATE /T') DO (
SET MONTH=%%1
SET DAY=%%2
SET YEAR=%%3
)

Friday, May 8, 2009

Remove Saved Passwords

Run "rundll32.exe keymgr.dll, KRShowKeyMgr"

Monday, March 2, 2009

InstallRite

InstallRite keeps track of what happens to your computer before and after an installation, and it can create an installer to install on other computers.

Monday, January 26, 2009

Dual monitor with Citrix

Source: http://forums.citrix.com/thread.jspa?messageID=74778&fromSearchPage=true

Swapping the primary monitors worked for me too to fix the seamless app issue.

It looks like the citrix client wants the primary monitor to be on the logical left. If the primary monitor is on the logical right then the client displays the a full window with the app inside instead of just the seamless app.