MSFN Forum: Small problem with moving desktop .. - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Small problem with moving desktop .. Rate Topic: -----

#1 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 23 January 2005 - 01:24 PM

Hi Benjamin,

sorry for yet another problem I just found out today regarding moving the Windows Desktop location when creating a new user in Wihu. It does work, and Wihu creates a new folder at the proper location. The problem however is that the content of the default folder "Desktop" inside the userprofile does not get copied to the new location. I think Wihu should check if that folder contains data and copy it to the newly created folder or to the folder existing at the new location.

I have a few lnk files etc inside the "Default User\Desktop" directory that I want to be placed on every desktop but those files donīt appear on the desktop if the desktop is moved.

One other thing ...

I just found out today that some people who I gave my unattended DVD put their systemfolders into the strangest places. Folders like Font location, local settings, startmenu etc etc ...

As a suggestion ... could you maybe add a switch to install.ini to make it possible to prevent users from seeing (and possible changing) systemfolders that I donīt want them to see/change ? I think itīs ok if they change the music, video, picture, favorites and personal folders, maybe even the desktop ... but all the other folders should be invisible to the user if I set it so ...

Something like a whitelist or blacklist .. whatever you prefer ...

Thanks !
Alex


I think users should be able


#2 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 23 January 2005 - 06:26 PM

Desktop Problem: Really strange, shouldn't be. All files and directories from "Default User" profile will be copied here. Which directories or files else are not copied? How does the permission rights for this file(s) look like?

midiboy said:

could you maybe add a switch to install.ini to make it possible to prevent users from seeing (and possible changing)


I added a new [settings] keyword.
ShellFolderModify.Disallow


install.ini said:

; Formula: ShellFolderModify.Disallow = SUM(PowerOf2(Index)) = SUM(2^Index) = 2^Index1 + 2^Index2 ...
;
; Index 0: "%USERPROFILE%\\My Documents\\My Music"
; Index 1: "%USERPROFILE%\\My Documents\\My Pictures"
; Index 2: "%USERPROFILE%\\My Documents\\My Videos"
; ... "%USERPROFILE%\\My Documents"
; "%USERPROFILE%\\Start Menu\\Programs\\Administrative Tools"
; "%USERPROFILE%\\Local Settings\\Temporary Internet Files"
; "%USERPROFILE%\\Local Settings\\Application Data\\Microsoft\\CD Burning"
; "%USERPROFILE%\\Cookies"
; "%USERPROFILE%\\Desktop"
; "%USERPROFILE%\\Favorites"
; "%SystemRoot%\\Fonts"
; "%USERPROFILE%\\Local Settings\\History"
; "%USERPROFILE%\\Local Settings\\Application Data"
; "%USERPROFILE%\\Local Settings"
; "%USERPROFILE%\\NetHood"
; "%USERPROFILE%\\PrintHood"
; "%USERPROFILE%\\Start Menu\\Programs"
; "%USERPROFILE%\\Recent"
; "%USERPROFILE%\\SendTo"
; "%USERPROFILE%\\Start Menu"
; "%USERPROFILE%\\Start Menu\\Programs\\StartUp"
; "%USERPROFILE%\\Templates"
; To disallow only changes of "My Music" and "My Pictures" for instance,
; Index 0 and 1 have to be combined
; ShellFolderModify.Disallow = 2^0 + 2^1 = 3


Benjamin Kalytta

This post has been edited by BenjaminKalytta: 24 January 2005 - 06:17 AM


#3 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 24 January 2005 - 03:56 AM

Hi Benjamin,

thanks for your quick reply ! :thumbup



1. The desktop moving thing:



If I set the desktop to be on a different location as the default, Wihu will create an EMPTY folder named Desktop there. However, in the profile directory of the user, there will be another Desktop directory and THIS ONE will have all the files in it that were in the "Default User\Desktop" directory.

So, Wihu copies the Default directory but not to the new location!



2. The Index thing ...

Thanks for creating this. However, I am at a loss here right now ... "Power of 2" means "hoch 2" in german, right ? Figured that one out by myself :w00t:

However, in your example ...


; Index 1 and 2 have to be combined
; ShellFolderModifyFlags = 2^1 + 2^2 = 3
; ShellFolderModifyFlags = 3


2^2 = 4 right ? So how can 2^1 + 2^2 be 3 then ?

Anyway, I tried this with my own example:

I added this to the [settings] :

Index 1: "%USERPROFILE%\\My Documents\\My Music"
Index 2: "%USERPROFILE%\\My Documents\\My Pictures"
Index 3: "%USERPROFILE%\\My Documents\\My Videos"
Index 4: "%USERPROFILE%\\My Documents"
Index 5: "%USERPROFILE%\\Favorites"
Index 6: "%USERPROFILE%\\Desktop"

ShellFolderModifyFlags =91


But it is not working. I can change the Administrative tools but not the video folder.

Anyway,

as a bonus ... would you be able to completely get rid of the "not changable " folders from the contact list instead of just making them uneditible ? This would make the list much more transparent and easier for the user ?

Thanks !

Bye,
Alex

#4 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 24 January 2005 - 04:05 AM

Ok,

I then thought, maybe the index number is not random but fixed so I tried with this list:

Index 1: "%USERPROFILE%\\My Documents\\My Music"
Index 2: "%USERPROFILE%\\My Documents\\My Pictures"
Index 3: "%USERPROFILE%\\My Documents\\My Videos"
Index 4: "%USERPROFILE%\\My Documents"
Index 9: "%USERPROFILE%\\Desktop"
Index 10: "%USERPROFILE%\\Favorites"

ShellFolderModifyFlags =211


But still, it is not working. I can change administrative tools but not the video folder. Mhh .. I hope I am not doing something wrong ...


Bye,
Alex

#5 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 24 January 2005 - 05:37 AM

Sorry for my stupidness. Each indizes are 0 based.

However, I renamed the keyword and added a new one:

ShellFolderModify.Disallow = <value>
ShellFolderModify.Hide = <value>


To disallow following folders, you should do:

Index 0: "%USERPROFILE%\\My Documents\\My Music"
Index 1: "%USERPROFILE%\\My Documents\\My Pictures"
Index 2: "%USERPROFILE%\\My Documents\\My Videos"
Index 3: "%USERPROFILE%\\My Documents"
Index 8: "%USERPROFILE%\\Desktop"
Index 9: "%USERPROFILE%\\Favorites"

ShellFolderModify.Disallow = 2^0 + 2^1 + 2^2 + 2 ^3 + 2^8 + 2^9 = 783
ShellFolderModify.Hide = 1 will hide "My Music" folder from within UI

Benjamin Kalytta

This post has been edited by BenjaminKalytta: 24 January 2005 - 05:57 AM


#6 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 24 January 2005 - 06:21 AM

midiboy said:

If I set the desktop to be on a different location as the default, Wihu will create an EMPTY folder named Desktop there. However, in the profile directory of the user, there will be another Desktop directory and THIS ONE will have all the files in it that were in the "Default User\Desktop" directory.


Hmm, Im a bit confused now.

"Default User" Profile Desktop is always in %USERPROFILE%\Default User\Desktop, isn't it? How can you change this default location?
Or did you change the "Default User" profile directly? If yes, then I should read "Default User" profile shell folders and also copy them.

Benjamin Kalytta

#7 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 24 January 2005 - 06:36 AM

Hi Benjamin,

I will try the new index thing shortly and let you know if it works ...

Quote

Hmm, Im a bit confused now.

"Default User" Profile Desktop is always in %USERPROFILE%\Default User\Desktop, isn't it? How can you change this default location?
Or did you change the "Default User" profile directly? If yes, then I should read "Default User" profile shell folders and also copy them.


No, I did not move the Default Profile. It is still at the default location at C:\Dokumente und Einstellungen\Default User. The Desktop folder is inside that. That is not the problem.

The problem is: if I change the location of a users desktop from within Wihu from the default location %PROFILE%\Desktop to lets say, D:\%ThisUser%\Desktop, then Wihu will create an empty folder named Desktop inside D:\%ThisUser%\ AND a folder named Desktop at the default location for this user: D:\Dokumente und Einstellungen\%ThisUser%\Desktop.

Everything that was in the Default User\Desktop directory will be copied to this folder: D:\Dokumente und Einstellungen\%ThisUser%\Desktop

but it should be copied to this folder: D:\%ThisUser%\Desktop

Everything clear now ? :)

I am not sure how this works for all the other folders you can change in Wihu. Maybe this "bug" (if it is one) does not only happen with the Desktop folder but also with other folders you can change in Wihu

BYe,
Alex

#8 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 24 January 2005 - 07:09 AM

Hi Benjamin,

I still donīt get it or it still does not work ...

According to your explanation the following should disable and hide all the folder except Pictures, Video, Music, Personal, Favorites and Desktop, right ?

Index 4: "%USERPROFILE%\\Start Menu\\Programs\\Administrative Tools"
Index 5: "%USERPROFILE%\\Local Settings\\Temporary Internet Files"
Index 6: "%USERPROFILE%\\Local Settings\\Application Data\\Microsoft\\CD Burning"
Index 7: "%USERPROFILE%\\Cookies"
Index 10: "%SystemRoot%\\Fonts"
Index 11: "%USERPROFILE%\\Local Settings\\History"
Index 12: "%USERPROFILE%\\Local Settings\\Application Data"
Index 13: "%USERPROFILE%\\Local Settings"
Index 14: "%USERPROFILE%\\NetHood"
Index 15: "%USERPROFILE%\\PrintHood"
Index 16: "%USERPROFILE%\\Start Menu\\Programs"
Index 17: "%USERPROFILE%\\Recent"
Index 18: "%USERPROFILE%\\SendTo"
Index 19: "%USERPROFILE%\\Start Menu"
Index 20: "%USERPROFILE%\\Start Menu\\Programs\\StartUp"
Index 21: "%USERPROFILE%\\Templates"

ShellFolderModify.Disallow =3152

ShellFolderModify.Hide = 4 
ShellFolderModify.Hide = 5 
ShellFolderModify.Hide = 6 
ShellFolderModify.Hide = 7 
ShellFolderModify.Hide = 10 
ShellFolderModify.Hide = 11 
ShellFolderModify.Hide = 12 
ShellFolderModify.Hide = 13 
ShellFolderModify.Hide = 14 
ShellFolderModify.Hide = 15 
ShellFolderModify.Hide = 16 
ShellFolderModify.Hide = 17 
ShellFolderModify.Hide = 18 
ShellFolderModify.Hide = 19 
ShellFolderModify.Hide = 20 
ShellFolderModify.Hide = 21


But it does not work. Not only are all the folders visible but I can also change some of them.

:whistle:

But maybe itīs me who is too dumb here ... I also tried this:



ShellFolderModify.Hide = 3152

or this

ShellFolderModify.Hide = 4 , 5 , 6, 7 etc ...


but nothing worked ....

Sorry,
Bye,
Alex

#9 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 24 January 2005 - 08:52 AM

No no, your value is wrong.

Correct value would be ShellFolderModify.Disallow = 4193520
and also ShellFolderModify.Hide = 4193520

Some hints:

Just use the Windows calculator, set BIN mode, and enter 1 for each Disallowed folder and 0 for allowed folder.
In your case you would enter 1111111111110011110000, then set back to DEC Mode and you'll get the number.
To set allowed folders just enter a 1 for each allowed folder and then negate the value by pressing NOT button.

Benjamin

#10 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 24 January 2005 - 10:58 AM

Hi Benjamin,

I am sorry I still donīt understand, on the contrary I have no idea what you are doing here. Maybe I should study some math ? :rolleyes:

No, so those are binary values now ? Why did you write about taking the power of 2 of each index then ? I am very confused. I though I should do this:

4 ^ 2 (=16) +
5 ^ 2 (=25) +
etc.

now, you are saying that I simply add a few ones and zeroīs in binary mode ?

Also, if I do the latter, does it matter where I put the zeroīs and oneīs ? Because this:
1111111111110011110000

does not seem to resemble this:


Index 4: "%USERPROFILE%\\Start Menu\\Programs\\Administrative Tools"
Index 5: "%USERPROFILE%\\Local Settings\\Temporary Internet Files"
Index 6: "%USERPROFILE%\\Local Settings\\Application Data\\Microsoft\\CD Burning"
Index 7: "%USERPROFILE%\\Cookies"
Index 10: "%SystemRoot%\\Fonts"
Index 11: "%USERPROFILE%\\Local Settings\\History"
Index 12: "%USERPROFILE%\\Local Settings\\Application Data"
Index 13: "%USERPROFILE%\\Local Settings"
Index 14: "%USERPROFILE%\\NetHood"
Index 15: "%USERPROFILE%\\PrintHood"
Index 16: "%USERPROFILE%\\Start Menu\\Programs"
Index 17: "%USERPROFILE%\\Recent"
Index 18: "%USERPROFILE%\\SendTo"
Index 19: "%USERPROFILE%\\Start Menu"
Index 20: "%USERPROFILE%\\Start Menu\\Programs\\StartUp"
Index 21: "%USERPROFILE%\\Templates"


?

So I have no idea how you came to that number you gave me, even though it does work ... :whistle:

One can clearly see that I never liked math at school :rolleyes:

Sorry for being slow ...



As for the desktop moving thing ... any news ?
Thanks,
Alex

#11 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 24 January 2005 - 11:03 AM

Oh ....

Quote

Also, if I do the latter, does it matter where I put the zeroīs and oneīs ? Because this:
CODE

1111111111110011110000

does not seem to resemble this:


CODE

Index 4: "%USERPROFILE%\\Start Menu\\Programs\\Administrative Tools"
Index 5: "%USERPROFILE%\\Local Settings\\Temporary Internet Files"
Index 6: "%USERPROFILE%\\Local Settings\\Application Data\\Microsoft\\CD Burning"
Index 7: "%USERPROFILE%\\Cookies"
Index 10: "%SystemRoot%\\Fonts"
Index 11: "%USERPROFILE%\\Local Settings\\History"
Index 12: "%USERPROFILE%\\Local Settings\\Application Data"
Index 13: "%USERPROFILE%\\Local Settings"
Index 14: "%USERPROFILE%\\NetHood"
Index 15: "%USERPROFILE%\\PrintHood"
Index 16: "%USERPROFILE%\\Start Menu\\Programs"
Index 17: "%USERPROFILE%\\Recent"
Index 18: "%USERPROFILE%\\SendTo"
Index 19: "%USERPROFILE%\\Start Menu"
Index 20: "%USERPROFILE%\\Start Menu\\Programs\\StartUp"
Index 21: "%USERPROFILE%\\Templates"



it is the line but starting with Index 21, not with Index 0.

Ok, I know how to do this now, but I have no idea why. But that is not your problem :D

Thanks,
Alex

#12 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 24 January 2005 - 01:20 PM

It's little endian mode ;)
Most left bit represent index 21, most right bit represent index 0. So you have to turn it round.

Benjamin

#13 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 24 January 2005 - 06:37 PM

Well, I donīt have to understand that, right ? :lol:

Little Endian Mode ... reminds me of a movie I once saw about a little Indian :rolleyes:

Anyway ...

do you know whatīs wrong with the Desktop moving feature ?

Thanks,
Alex

#14 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 24 January 2005 - 11:48 PM

Quote

do you know whatīs wrong with the Desktop moving feature ?


Oh, I overread your posting about that, I'll take a look a that next days, maybe this evening.

Benjamin Kalytta

#15 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 25 January 2005 - 01:25 PM

Thanks, looking forward to it !

Bye,
Alex

#16 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 27 January 2005 - 08:41 AM

Ok I fixed the shell folder bug and many others which concerns shell folder depencies, i.e. when renaming "My Documents", also it's subfolders like "My Pictures" will be renamed.
It didn't work as expected.

Benjamin Kalytta

#17 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 27 January 2005 - 12:29 PM

Hi Benjamin,

just tried it out. It still does not work as expected. Sorry to say.

On my machine, the folder

C:\Dokumente und Einstellungen\Default User\Desktop contains the following lnk files:

eMule.lnk
Foobar.lnk
Firefox.lnk
MediaPlayer.lnk
Nero.lnk
Outlook.lnk

Since this is the Default user profile, a newly created user should and normaly also gets those files copied into his new Desktop folder.

But if I create a new user with Wihu and change the shell folder Desktop to for instance D:\%Personal%\Desktop, the resulting folder will be empty. None of the above lnk files are in there anymore.

With your older Wihu versions, Wihu would copy those files if the Desktop folder was left at the default location when creating a new user. With the new version, Wihu does not copy them no matter where the Desktop folder is.

I just tried with two new users. The first user got the Desktop folder on a new location, the second one on the default location. Wihu created the folders as expected but did not copy any files.

Thanks for your help,
Alex

#18 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 27 January 2005 - 03:15 PM

Ok that means I have to rewrite some major things in WIHU.
My source isn't maintenanceable anymore, especially Environment varaible things.
This will take some time. It will be available maybe at weekend next week after my exams.

Benjamin Kalytta

#19 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 27 January 2005 - 03:29 PM

Hi Benjamin,

Oh I am sorry about that ! I hope it wonīt take too long ! Good luck for your exams ! :thumbup

Bye,
Alex

#20 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 15 February 2005 - 10:46 AM

Im currently fixing this bug as promised.

For inconsistence reasons there will some changes:

%ThisProfile% isn't available any more, please use %USERPROFILE% instead, also %ThisUser% should be replaced by %USERNAME%. %ThisHome% isn't available any more either, just use %HOMEDRIVE%%HOMEPATH% instead.
%NewUserName% will be %USERNAME%.
%NewUserPassword% will be %USERPASSWORD%.
Maybe I'll create an auto ini file converter for this purpose.

I'll consider to add the posibility to install certain software under certain different accounts i.e. one software as administrator, one software as primary user and so on.


Benjamin Kalytta

This post has been edited by BenjaminKalytta: 15 February 2005 - 01:11 PM


Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy