SyntaxHighlighter

Showing posts with label Vista. Show all posts
Showing posts with label Vista. Show all posts

Wednesday, March 11, 2009

TexnicCenter DDE Commands for Acrobat Reader

Not really a dev related post, but I had to re-install Vista due to an epic fail on MS's part. My pc went into sleep mode and wrote the files from the C:\ProgramData\Microsoft directory to the C:\ProgramData\Microso~1 dir.

If this ever happens to you, I'm sorry to say you'll have to re-install your OS. I tried everything to get the files back to where they were supposed to be, but it looks like MS tightened security on FS and its impossible to move some of the Crypto files to where they belong. Even if you boot up in Linux...

Anyhow, I have to get latex running again and I'm using TexnicCenter as an editor. I forgot the DDE commands and had to figure it out again. Joy.

Here's the basic setup:
  1. In TexnicCenter, hit Alt+F7 and click on the viewer tab.
  2. In the "View project output" and "Forward search" options, select the "DDE Command" radio button and fill in the following: Command = [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")], Server = acroview, Topic = control
  3. For the "Close document before running Latex" , select DDE with the same settings as above, but change the command to be [DocClose("%bm.pdf")]

One can also fool around with some other commands. Here's the snippet on DDE from the Adobe Interapplication Communication document:

Acrobat Application DDE Messages
This section lists all DDE messages. For complete descriptions of the parameters associated with DDE messages, see the DDE sections of the Acrobat Interapplication Communication Reference.

Application Configuration
  • AppExit — Exits Acrobat.
  • AppHide — Iconifies or hides Acrobat.
  • AppShow — Shows Acrobat.
  • CloseAllDocs — Closes all open documents.
  • HideToolbar — Hides the toolbar.
  • MenuitemExecute — Invokes a menu item, given its language-independent name.
  • ShowToolbar — Shows the toolbar.

Document Manipulation
  • DocClose — Closes the file without saving it and without prompting the user to save the document if it has been modified.
  • DocDeletePages — Deletes a specified range of pages in a document. It cannot delete all pages in a document.
  • DocInsertPages — Inserts specified pages from one file into another.
  • DocOpen — Opens a document and adds it to the list of documents known to DDE, allowing it to be manipulated by other DDE messages (for example, FileOpen).
  • DocReplacePages — Replaces specified pages using pages from another file.
  • DocSave — Saves the specified file.
  • DocSaveAs — Saves an open file into a new file, without warning the user if there is a problem saving.
  • DocSetViewMode — Controls whether bookmarks or thumbnail images are shown in addition to the document content.
  • FileOpen — Opens and displays a file, making it the current document and bringing it to the front if it is already open.
  • FileOpenEx — Opens and displays a file, making it the current document and bringing it to the front if it is already open. The file is opened during an idle loop to allow DDE messages to continue flowing during the opening of large documents.
Document Printing
  • DocPrint — Prints a specified range of pages from a document, without displaying a modal Print dialog box to the user.
  • FilePrint — Prints all pages in a document, displaying a modal Print dialog box to the user.
  • FilePrintEx — Prints all pages in a document, displaying a modal Print dialog box to the user. Only PostScript Level 1 operators are used for PostScript printing. Printing is performed during an idle loop to allow DDE messages to continue flowing during the printing of large documents.
  • FilePrintSilent — Prints all pages in a document, displaying no print dialog box to the user.
  • FilePrintSilentEx — Prints all pages in a document, displaying no print dialog box to the user. Only PostScript Level 1 operators are used for PostScript printing. Printing is performed during an idle loop to allow DDE messages to continue flowing during the printing of large documents.
  • FilePrintTo — Prints all pages in a document to a specified printer, using a specified driver and port, displaying a modal Print dialog box to the user.
  • FilePrintToEx — Prints all pages in a document to a specified printer, using a specified driver and port, displaying a modal Print dialog box to the user. Only PostScript Level 1 operators are used for PostScript printing. Printing is performed during an idle loop to allow DDE messages to continue flowing during the printing of large documents.
View Manipulation
  • DocGoTo — Goes to the specified page.
  • DocGoToNameDest — Goes to the specified name destination within the document.
  • DocPageDown — Scrolls forward through the document by one screen area.
  • DocPageLeft — Scrolls to the left by a small amount.
  • DocPageRight — Scrolls to the right by a small amount.
  • DocPageUp — Scrolls backward through the document by one screen area.
  • DocScrollTo — Scrolls the view of the current page to a specified location.
  • DocZoomTo — Sets the zoom for a specified document.
Search-related
  • DocFind — Finds a string in a specified file.

Monday, June 30, 2008

The infamous "\\computer is not accessible. You might not have permission to use this network" error

I must have come across this stupid error a dosen times and it is often solved by simply changing the Windows machine's Network ID or by running the Network Connection Wizard thingy in the Control Panel -> Connections page.

This time though, we had a computer playing hardball and was only solved by doing the following (from PChuck's Network):

Download and install the Windows 2003 Server Resource Kit Tools.

Click Start | All Programs | Windows Resource Kit Tools | Command Shell.

Type these three lines, one at a time, at the command prompt. The ntrights
commands are case-sensitive, so type them exactly as shown. Note the "+r" in
the second one and the "-r" in the third one:

net user guest /active:yes
ntrights +r SeNetworkLogonRight -u Guest
ntrights -r SeDenyNetworkLogonRight -u Guest

And that solved our problems. Well for most guys. For some reason my Vista still did not want to connect. I changed my Network ID to be same, and whala! It worked! This is a bit peculiar considering that I was able to connect across different Network ID's on my previous XP machine. I don't have time to double check and validate that now though.

Sunday, June 29, 2008

Vista administrator woes

Ok if you're a Vista user you're undoubtely also sick and tired of being bombarded with security pop-ups, which are aimed at keeping the average user from destroying the system with malware.

So you want to be a real administor? Follow these steps:
First, turn off UAC warnings.
1. Go into Control Panel.
2. Open up User Accounts (in classic view) and User Accounts and Family Safety -> User Accounts (in standard view).
3. Click Turn User Account Control on or off and follow the rest of the instructions.

Ok now you got rid of most of the issues, but Vista still with give you a hard time with Services and applications such as SQL Server and Visual Studio. It still won't think you are a full blown administrator and prompt you with the odd warning. Quite annoying.

Finally, Turn off "Run all administrators in Admin Approval Mode"
1. Open a run window, and type in secpol.msc and hit enter.
2. Expans Local Policies -> Security Options.
3. Scroll down to User Account Control: Run all administrators in Admin Approval Mode and disable the damned thing.
4. Restart and all should be well.

Visual Studio 2005 and IIS 7: Unable to open the Web

I recently upgraded to a new workstation, which came with Vista Ultra SP1. I tried to open my previous web apps and got this message:

"Unable to open the Web 'http://localhost/...'. The Web server does not appear to have the FrontPage server extensions installed."

A quick google search came up with this article on the MS Knoweldge Base:
http://support.microsoft.com/kb/936857

I followed the instructions and enabled the IIS Metabase and IIS 6 configuration compatibility component. I went back into VS Studio, clicked Reload Project, but no luck.

Next I went into IIS 7's management console. I noticed that the web apps were not added to an application pool yet. Just right-click the folder and choose Convert to Application. Reloaded the project again, and nothing...

Trying to solve the issue, I got a bit side-tracked and sorted out some annoying administrator issues.

I rebooted my system and my web app is working!! Whoop whoop!