Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
PepsiHog
- Automation Wizard
- Posts: 517
- Joined: Wed Apr 08, 2009 4:19 pm
- Location: Florida
Post
by PepsiHog » Sat Mar 02, 2013 4:01 am
Hello Everyone,
Code: Select all
let>ClassInfo={0AFACED1-E828-11D1-9187-B532F1E9575D}
EditIniFile>%Desktop_Dir%\Desktop.ini,.ShellClassInfo,CLSID2,%ClassInfo%
I'd like the above script to actually work. I tried quotes, curly brackets, and both with no luck.
Please help,
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Sat Mar 02, 2013 4:24 am
Desktop.ini is a system, hidden file meaning the system and hidden attributes are on so the file can't be altered or deleted. Turn those attributes off, make the change, then turn the attributes back on.
I haven't tested this but unless I've typo-ed something it should work.
Code: Select all
Let>rp_wait=1
Let>rp_windowmode=0
Run>cmd /c attrib -s -h "%Desktop_Dir%\Desktop.ini"
let>ClassInfo={0AFACED1-E828-11D1-9187-B532F1E9575D}
EditIniFile>%Desktop_Dir%\Desktop.ini,.ShellClassInfo,CLSID2,%ClassInfo%
Run>cmd /c attrib +s +h "%Desktop_Dir%\Desktop.ini"
-
PepsiHog
- Automation Wizard
- Posts: 517
- Joined: Wed Apr 08, 2009 4:19 pm
- Location: Florida
Post
by PepsiHog » Sat Mar 02, 2013 12:41 pm
Hello JRL,
That is what I am doing. It's for creating a hard link in XP. However this script is not attempting to write to an existing one. The attributes have yet to be set. This is one I am creating.
There is a basic problem with writting the clsid. I get an error that states "A is not appropriate". The letter "A" is in the clsid.
Forget about what it is, just try to write the clsid to an INI file.
Keep in mind I am running v12.1.10.
Thanks,
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Sun Mar 03, 2013 8:37 am
{ .. } denotes a complex expression so it is expecting what is inside it to be a valid expression.
So do this:
let>ClassInfo={"{0AFACED1-E828-11D1-9187-B532F1E9575D}"}
EditIniFile>%Desktop_Dir%\Desktop.ini,.ShellClassInfo,CLSID2,ClassInfo
-
PepsiHog
- Automation Wizard
- Posts: 517
- Joined: Wed Apr 08, 2009 4:19 pm
- Location: Florida
Post
by PepsiHog » Wed Mar 13, 2013 12:44 pm
Thanks Marcus.
It works except for one detail, which is interesting. I was first using a var in the writeln command. But when I used a var, like in your example, the quotes were included in the ini file. Which Windows won't recognize. But when I use the expression in the writeln, it doesn't have the quotes.
If you tried your example, did it include the quotes? Or maybe you didn't need to, because you knew the answer. But curious if there is a reason or if it's just one of those things?
Anyway thanks,
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!