PDA

View Full Version : CSIDL_Printers



NewsArchive
07-21-2008, 03:17 AM
Hi Friedrich

Sorry to interupt your German Grand Prix day <G> Go Webber! ( but as usual, he will
probably crash out on the first corner)

I am trying to use SB6 to see if a certain printer is installed. ( PDF-XChange 3.0 )

So I tried using the CSIDL_PRINTERS that is mentioned in the help...

I used Get Special Folders and in the drop-down I selected CSIDL_PRINTERS

BUT when compiling I get an error msg that %_CSIDL_PRINTERS% "has not been previously
defined"


Is there some other way to determine if a certain printer IS installed witin SB6.
Otherwise I guess I could do it in a DLL and call that but I am experimenting first
from within SB6

Thanks

JohnG

NewsArchive
07-21-2008, 03:17 AM
Hi John,

> Sorry to interupt your German Grand Prix day <G> Go Webber! ( but as
> usual, he will probably crash out on the first corner)

<BG> I think you are right :)

> I am trying to use SB6 to see if a certain printer is installed. (
> PDF-XChange 3.0 )
>
> So I tried using the CSIDL_PRINTERS that is mentioned in the help...
>
> I used Get Special Folders and in the drop-down I selected
> CSIDL_PRINTERS
>
> BUT when compiling I get an error msg that %_CSIDL_PRINTERS% "has not
> been previously defined"
>
>
> Is there some other way to determine if a certain printer IS installed
> witin SB6. Otherwise I guess I could do it in a DLL and call that but I
> am experimenting first from within SB6

The following works fine here:

Set Variable %_CSIDL_PRINTERS% to FUNCTION:Get Special
Folder("CSIDL_PRINTERS")

Display Message Box "%_CSIDL_PRINTERS%" -- ""

Did you set your custom %_CSIDL_PRINTERS% variable to the CSIDL_PRINTERS
value?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
07-21-2008, 03:18 AM
Thanks Friedrich.

>The following works fine here:

>Set Variable %_CSIDL_PRINTERS% to FUNCTION:Get SpecialFolder("CSIDL_PRINTERS")

That runs fine here now, but my variable comes up empty. (Win XP Pro and SB6.8.2266)

>Display Message Box "%_CSIDL_PRINTERS%" -- ""

Displays empty msg box. I would expect something like "Printers and Faxes"

(Patiently waiting for delayed telecast of F1 race - another 2 hours )

JohnG

NewsArchive
07-21-2008, 03:18 AM
Hi John,

>>Set Variable %_CSIDL_PRINTERS% to FUNCTION:Get
>>SpecialFolder("CSIDL_PRINTERS")
>
> That runs fine here now, but my variable comes up empty. (Win XP Pro and
> SB6.8.2266)
>
>>Display Message Box "%_CSIDL_PRINTERS%" -- ""
>
> Displays empty msg box. I would expect something like "Printers and Faxes"

That value is what the SHGetSpecialFolderLocation Windows API returns.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
07-21-2008, 03:18 AM
OK, I got the printer search solved by using the Registry funcs.

Still could not get a value returned from call to
FUNCTION:Get Special Folder("CSIDL_PRINTERS")

JohnG

NewsArchive
07-22-2008, 02:15 AM
John,

Randy Rogers included a great little "view the CSIDLs" utility in his
clarionmag article a while back:
http://www.clarionmag.com/cmag/v9/v9n03vistaini.html

On my 64-bit Vista machine, that CSIDL returns an empty string (see attached
screen shot using Randy's program).

Friedrich does work miracles, no doubt. But even HE can't make a silk purse
out of.....
<g>

Jane

NewsArchive
07-22-2008, 02:16 AM
Hi Jane,

> On my 64-bit Vista machine, that CSIDL returns an empty string (see
> attached
> screen shot using Randy's program).

All my computers (XP Home/Pro and Vista Home Premium) return an empty string
on CSIDL_PRINTERS, so I don't think this is being used by MS - maybe in
older OSs... I have a few empty ones also on all my computers - this is
from my XP Home machine:

CSIDL_INTERNET
CSIDL_CONTROLS
CSIDL_PRINTERS
CSIDL_BITBUCKET
CSIDL_DRIVES
CSIDL_NETWORK
CSIDL_ALTSTARTUP
CSIDL_COMMON_ALTSTARTUP
CSIDL_PROGRAM_FILESX86
CSIDL_PROGRAM_FILES_COMMONX86

using my Special Folders program.

--
Arnor Baldvinsson
Icetips Creative, Inc

NewsArchive
07-22-2008, 02:17 AM
Hi John,

>>Set Variable %_CSIDL_PRINTERS% to FUNCTION:Get SpecialFolder("CSIDL_PRINTERS")
>
> That runs fine here now, but my variable comes up empty. (Win XP Pro and SB6.8.2266)
>
>>Display Message Box "%_CSIDL_PRINTERS%" -- ""
>
> Displays empty msg box. I would expect something like "Printers and Faxes"

If you use my SpecialFolder utility from:

http://www.icetips.com/downloadfile.php?FileID=71

Then you can see exactly what folder is being returned. When I run it on my
XP and Vista machines, CSIDL_PRINTERS is indeed empty.

OTOH, CSIDL_PRINTHOOD contains
"C:\Users\Arnor\AppData\Roaming\Microsoft\Windows\P rinter Shortcuts"

I don't know why CSIDL_PRINTERS is empty.

--
Arnór Baldvinsson - Icetips Creative, Inc.
www.icetips.com - www.buildautomator.com

Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
07-22-2008, 02:18 AM
Thanks Arnor and Jane

I guess MS has/had decided to not implement it yet within XP, or not let anyone see
it. Like one of those 'Forked' folders...

I did not try it on my Vista PC. I keep that one locked in a cupboard so I am not
tempted to try using it <G>.

JohnG