Follow-up question regarding shortcut creation/change

Follow-up question regarding shortcut creation/change

am 30.08.2007 21:48:57 von Deane.Rothenmaier

This is a multipart message in MIME format.
--===============1972044364==
Content-Type: multipart/alternative;
boundary="=_alternative 006CDA3386257347_="

This is a multipart message in MIME format.
--=_alternative 006CDA3386257347_=
Content-Type: text/plain; charset="US-ASCII"

Okay, gurus, you've helped me get this far, now....

Is there a WMI method to edit a desktop shortcut? Specifically, I need to
change the argument string from an IP address to the DNS name the IP
resolves to. For example, if the Target text of the shortcut is

c:\foo\foo.exe 255.255.255.255 1024

I need to change the "argument" part so the Target text becomes (if that
IP resolves to FOO15)

c:\foo\foo.exe FOO15 1024

Is there a way to do this? Or is it possible to edit the .lnk file in
Perl? It seems to be in binmode (I think?), and the argument part is
interspersed with CHR(0)'s between every character...

Thanks again,

Deane Rothenmaier
Programmer/Analyst
Walgreens Corp.
847-914-5150

My goal is simple. It is complete understanding of the universe, why it is
as it is and why it exists at all. -- Stephen Hawking
--=_alternative 006CDA3386257347_=
Content-Type: text/html; charset="US-ASCII"



Okay, gurus, you've helped me get this
far, now....




Is there a WMI method to edit a desktop
shortcut? Specifically, I need to change the argument string from an IP
address to the DNS name the IP resolves to. For example, if the Target
 text of the shortcut is




        c:\foo\foo.exe
255.255.255.255 1024




I need to change the "argument"
part so the Target text becomes (if that IP resolves to FOO15)




        c:\foo\foo.exe
FOO15 1024




Is there a way to do this?  Or
is it possible to edit the .lnk file in Perl?  It seems to be in binmode
(I think?), and the argument part is interspersed with CHR(0)'s between
every character...




Thanks again,



Deane Rothenmaier

Programmer/Analyst

Walgreens Corp.

847-914-5150



My goal is simple. It is complete understanding of the universe, why it
is as it is and why it exists at all. -- Stephen Hawking

--=_alternative 006CDA3386257347_=--


--===============1972044364==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1972044364==--

RE: Follow-up question regarding shortcut creation/change

am 30.08.2007 22:18:24 von Jan Dubois

This is a multipart message in MIME format.

--===============1898830095==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_09B8_01C7EB08.3F476DE0"
Content-language: en-ca

This is a multipart message in MIME format.

------=_NextPart_000_09B8_01C7EB08.3F476DE0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Win32::Shortcut is part of ActivePerl on Windows.



It won't give you anything than what you got from your WSH implementation, so I may not understand the real issue behind your
question.



Cheers,

-Jan



PS: Could you please use plain text messages on the mailing list? Makes it much easier to reply to individual parts of messages.



From: activeperl-bounces@listserv.ActiveState.com [mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of
Deane.Rothenmaier@walgreens.com
Sent: August 30, 2007 12:49 PM
To: activeperl@listserv.ActiveState.com
Subject: Follow-up question regarding shortcut creation/change




Okay, gurus, you've helped me get this far, now....

Is there a WMI method to edit a desktop shortcut? Specifically, I need to change the argument string from an IP address to the DNS
name the IP resolves to. For example, if the Target text of the shortcut is

c:\foo\foo.exe 255.255.255.255 1024

I need to change the "argument" part so the Target text becomes (if that IP resolves to FOO15)

c:\foo\foo.exe FOO15 1024

Is there a way to do this? Or is it possible to edit the .lnk file in Perl? It seems to be in binmode (I think?), and the argument
part is interspersed with CHR(0)'s between every character...

Thanks again,

Deane Rothenmaier
Programmer/Analyst
Walgreens Corp.
847-914-5150

My goal is simple. It is complete understanding of the universe, why it is as it is and why it exists at all. -- Stephen Hawking


------=_NextPart_000_09B8_01C7EB08.3F476DE0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">









style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Win32::Shortcut is part of ActivePerl on =
Windows.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>It won’t give =
you anything
than what you got from your WSH implementation, so I may not understand =
the
real issue behind your question.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Cheers,



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>-Jan



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>PS: Could you please use plain text messages on the =
mailing
list?  Makes it much easier to reply to individual parts of =
messages.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



0cm 4.0pt'>



0cm 0cm 0cm'>

style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' >From:=
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' >
activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of =
Deane.Rothenmaier@walgreens.com

Sent: August 30, 2007 12:49 PM

To: activeperl@listserv.ActiveState.com

Subject: Follow-up question regarding shortcut =
creation/change







 





Okay, =
gurus,
you've helped me get this far, now....




Is =
there a WMI
method to edit a desktop shortcut? Specifically, I need to change the =
argument
string from an IP address to the DNS name the IP resolves to. For =
example, if
the Target  text of the shortcut is




  =
 
    c:\foo\foo.exe 255.255.255.255 1024




I need =
to
change the "argument" part so the Target text becomes (if that =
IP
resolves to FOO15)




  =
 
    c:\foo\foo.exe FOO15 1024




Is =
there a way
to do this?  Or is it possible to edit the .lnk file in Perl? =
 It
seems to be in binmode (I think?), and the argument part is interspersed =
with
CHR(0)'s between every character...




Thanks =
again,





Deane
Rothenmaier

Programmer/Analyst

Walgreens Corp.

847-914-5150



My goal is simple. It is complete understanding of the universe, why it =
is as
it is and why it exists at all. -- Stephen Hawking











------=_NextPart_000_09B8_01C7EB08.3F476DE0--


--===============1898830095==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1898830095==--

RE: Follow-up question regarding shortcut creation/change

am 30.08.2007 22:59:49 von Wayne Simmons

>and the argument part is interspersed with CHR(0)'s between every
>character...

Sounds like Unicode to me. Unicode uses 16bit wide characters, and if
you're using English, you wouldn't use the second byte (making them all
zeros). =


-Wayne Simmons

--
Software Engineer
InterSystems USA, Inc.
303-858-1000
=A0 =

________________________________________
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Jan Dubois
Sent: Thursday, August 30, 2007 2:18 PM
To: Deane.Rothenmaier@walgreens.com; activeperl@listserv.ActiveState.com
Subject: RE: Follow-up question regarding shortcut creation/change

Win32::Shortcut is part of ActivePerl on Windows.

It won=92t give you anything than what you got from your WSH implementation,
so I may not understand the real issue behind your question.

Cheers,
-Jan

PS: Could you please use plain text messages on the mailing list?=A0 Makes =
it
much easier to reply to individual parts of messages.

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of
Deane.Rothenmaier@walgreens.com
Sent: August 30, 2007 12:49 PM
To: activeperl@listserv.ActiveState.com
Subject: Follow-up question regarding shortcut creation/change


Okay, gurus, you've helped me get this far, now.... =


Is there a WMI method to edit a desktop shortcut? Specifically, I need to
change the argument string from an IP address to the DNS name the IP
resolves to. For example, if the Target =A0text of the shortcut is =


=A0 =A0 =A0 =A0 c:\foo\foo.exe 255.255.255.255 1024 =


I need to change the "argument" part so the Target text becomes (if that IP
resolves to FOO15) =


=A0 =A0 =A0 =A0 c:\foo\foo.exe FOO15 1024 =


Is there a way to do this? =A0Or is it possible to edit the .lnk file in Pe=
rl?
=A0It seems to be in binmode (I think?), and the argument part is intersper=
sed
with CHR(0)'s between every character... =


Thanks again, =


Deane Rothenmaier
Programmer/Analyst
Walgreens Corp.
847-914-5150

My goal is simple. It is complete understanding of the universe, why it is
as it is and why it exists at all. -- Stephen Hawking


_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs