?
Solved

PDFCreator script to see what user is printing and place them in a specific folder

Posted on 2011-03-09
7
Medium Priority
?
870 Views
Last Modified: 2012-06-27
Hi, I'm using PDFCreator to print my documents as PDF's. But I got a lot of users, and each PDF made by a users needs to be stored automaticly in a different folder.

e.g. User = Frank
it needs to be stored in c:\Files\Lectors\Frank

User = Kristof
it needs to be stored in C:\Files\User\Kristof

Can this be done with a .vbs script? I've tried making multiple printers of PDFCreator but it failed.
I would appreciate this.
0
Comment
Question by:Silencer001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 8

Expert Comment

by:jawa29
ID: 35082823
Hi Silencer001

Do you have a way to distinguish the difference between a User and a Lector?

PDFCreator has an Autosave facility that can be enabled via the options page. However it can also be set via the registry.

Keys can be found under HKEY_CURRENT_USER\Software\PDFCreator\Program

UseAutoSave = 1
AutoSaveDirectory = C:\Files\User\Frank
AutoSaveFilename = <DateTime>

I believe you can achieve what you are asking by setting these keys as above on logon.

I have included a simple registry editing script that will set the above values. If you can distinguish between a User and a Lector then you could write a section before this to determine where the files will be saved to.

Jawa29

Const HKEY_CURRENT_USER = &H80000001

Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")

sKeyPath = "SOFTWARE\PDFCreator\Program"
sValueName = "UseAutoSave"
sValue = "1"
oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath, sValueName, sValue

sValueName = "AutosaveDirectory"
sValue = "C:\Files\User\Frank"
oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath, sValueName, sValue

sValueName = "AutosaveFilename"
sValue = "<DateTime>"
oReg.SetStringValue HKEY_CURRENT_USER, sKeyPath, sValueName, sValue

Open in new window

0
 

Author Comment

by:Silencer001
ID: 35083230
Hi Jawa29

The Autosave facility doesn't work. When I save it, in PDFCreator itself, it just changes itself back. And when I use regedit to change the there, it doesn't update.

They need to login through SAP, so don't think that the usergroups can be read out of it.
But I was thinking about making an array with all the users who belong to Lector and all the ones who belong to User.

But my programming in vbscript isn't as good as I thought, so that's why I'm asking here.

I'm going to try your registry editing script now, and I'll edit this if it works or not.
Thank you for your fast response.

Silencer001
0
 

Author Comment

by:Silencer001
ID: 35083270
The registry editor script works, but due to some strange reason, the PDFCreator doesn't use these settings. Don't know why, I've already added a question on there site, a couple of days ago, but no response.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 8

Expert Comment

by:jawa29
ID: 35083363
Hi Silencer001

I have just installed PDFCreator on a test PC and run the PDFCreator1.2.0 installer. Before opening up the PDF printer or trying to use it I applied my VBScript.

All worked, outputted a PDF to C:\Files\User\Frank. Even created the folder for me!

Jawa29
0
 

Author Comment

by:Silencer001
ID: 35083371
I've found out what's wrong with PDFCreator. Need to go back to version 1.1.0 instead of using 1.2.0. Now it works.
0
 

Accepted Solution

by:
Silencer001 earned 0 total points
ID: 35083395
Instead of making a VBScript, what will automaticly change the settings of the printer. I've made multiple printers, each printer has a different folder to save the files in.

But the profiles, I neaded to create, weren't saved. But by downgrading to PFDCreator 1.1.0, it works. Guess it's a bug of the new version, found a couple of others who had the same problem.

Thank Jawa29
0
 

Author Closing Comment

by:Silencer001
ID: 35178892
Did what I wanted to do
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome back!  My apologies for taking so long to write part two of this series; it's been a long time coming!  As I promised in Part 1, this article will focus on how to locate those elusive AD properties that you are searching for.  Why is this us…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question